Verified
Status Update
Updated by @
PSA (May 13, 2024)
In mid-May, Google maps in the Android Emulator Extended Controls will NO LONGER WORK in emulator versions before 34.2.13. Please update your emulator to avoid this issue.
For more into, see
Comments
gi...@google.com <gi...@google.com>
bo...@google.com <bo...@google.com>
mu...@gmail.com <mu...@gmail.com> #2
Thank you for this feedback. The team may reach out for more information on triaging or reproducing this issue.
pa...@getpackage.com <pa...@getpackage.com> #3
I have tried the example project you've provided, it does not reproduce.
Could you please try running with -Pandroid.useDexArchive=false? This disables the new dexing pipeline, and fallbacks to the old one.
Could you please try running with -Pandroid.useDexArchive=false? This disables the new dexing pipeline, and fallbacks to the old one.
lu...@gmail.com <lu...@gmail.com> #4
@Mario Did you get a chance to try the build with -Pandroid.useDexArchive=false flag?
ar...@drlinux.no <ar...@drlinux.no> #5
I'm the college of @Mario and I make it work without issues and without using -Pandroid.useDexArchive=false by using alpha6 and removing retrolambda
ju...@gmail.com <ju...@gmail.com> #6
Sorry my comment from Apr 21, 2017 12:41PM was wrong.
With -Pandroid.useDexArchive=false it looks like this
:app:transformClassesWithDesugarForNonpayItalyCompatDebugAndroidTest
:app:transformClassesWithPreDexForNonpayItalyCompatDebugAndroidTest
Dex: warning: Ignoring InnerClasses attribute for an anonymous inner class
(org.ccil.cowan.tagsoup.Parser$1) that doesn't come with an
associated EnclosingMethod attribute. This class was probably produced by a
compiler that did not target the modern .class file format. The recommended
solution is to recompile the class from source, using an up-to-date compiler
and without specifying any "-target" type options. The consequence of ignoring
this warning is that reflective operations on this class will incorrectly
indicate that it is *not* an inner class.
:app:transformDexWithDexForNonpayItalyCompatDebugAndroidTest FAILED
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':app:transformDexWithDexForNonpayItalyCompatDebugAndroidTest'.
> com.android.build.api.transform.TransformException: com.android.ide.common.process.ProcessException: java.util.concurrent.ExecutionException: com.android.dex.DexIndexOverflowException: method ID not in [0, 0xffff]: 65536
With -Pandroid.useDexArchive=false it looks like this
:app:transformClassesWithDesugarForNonpayItalyCompatDebugAndroidTest
:app:transformClassesWithPreDexForNonpayItalyCompatDebugAndroidTest
Dex: warning: Ignoring InnerClasses attribute for an anonymous inner class
(org.ccil.cowan.tagsoup.Parser$1) that doesn't come with an
associated EnclosingMethod attribute. This class was probably produced by a
compiler that did not target the modern .class file format. The recommended
solution is to recompile the class from source, using an up-to-date compiler
and without specifying any "-target" type options. The consequence of ignoring
this warning is that reflective operations on this class will incorrectly
indicate that it is *not* an inner class.
:app:transformDexWithDexForNonpayItalyCompatDebugAndroidTest FAILED
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':app:transformDexWithDexForNonpayItalyCompatDebugAndroidTest'.
> com.android.build.api.transform.TransformException: com.android.ide.common.process.ProcessException: java.util.concurrent.ExecutionException: com.android.dex.DexIndexOverflowException: method ID not in [0, 0xffff]: 65536
an...@gmail.com <an...@gmail.com> #7
We updated our example repo https://github.com/originx/Gradle_troubles_android_enteprise where you can see the issue.
Just run
./gradlew spoonGermanyDebugAndroidTest
or
./gradlew spoonGermanyDebugAndroidTest -Pandroid.useDexArchive=false
and you will see the issue
Just run
./gradlew spoonGermanyDebugAndroidTest
or
./gradlew spoonGermanyDebugAndroidTest -Pandroid.useDexArchive=false
and you will see the issue
ij...@gmail.com <ij...@gmail.com> #8
Your tests do not fit into a single dex file. I've tried plugin 2.3.0 (I've also had to enable retrolambda for app, core, and pay modules), and the number of references that are generated is higher than 64k.
Please note that if you are using plugin's internal or Retrolamba support for Java 8 language features, for each lambda expression you will generate 3 additional references, so it might affect your reference count quite significantly.
Please note that if you are using plugin's internal or Retrolamba support for Java 8 language features, for each lambda expression you will generate 3 additional references, so it might affect your reference count quite significantly.
me...@gmail.com <me...@gmail.com> #9
Hello and thank you for the reply. What is the expected fix for this the ticket status was moved to "verified (fixed)" it is rather confusing for me. Do you suggest we have too many tests and that's it?
Could you please clarify?
Thank you for your time
Could you please clarify?
Thank you for your time
mu...@gmail.com <mu...@gmail.com> #10
Your test sources and test-only dependencies are generating too many references. Java 8 language features are not related to this, as even when I remove compileOptions from all modules, the test dependencies cannot fit into a single dex file.
I suggest you take a look at Proguard rules that you can specify when running the tests -https://google.github.io/android-gradle-dsl/current/com.android.build.gradle.internal.dsl.ProductFlavor.html#com.android.build.gradle.internal.dsl.ProductFlavor:testProguardFile(java.lang.Object) . I've also updated the bug status, not to be confusing.
I suggest you take a look at Proguard rules that you can specify when running the tests -
mu...@gmail.com <mu...@gmail.com> #11
Hello,
Thank you for the link and clarification.
Pardon my many questions I just want to understand the problem better.
We use proguard for the app and define proguard rules which classes to keep for the test runner that we need early on in the start of the test run.
Why did it work with older build tools?
Also why doesnt multidex work for the test app or proguard rules from the debug builds?
Thank you for the quick response
Thank you for the link and clarification.
Pardon my many questions I just want to understand the problem better.
We use proguard for the app and define proguard rules which classes to keep for the test runner that we need early on in the start of the test run.
Why did it work with older build tools?
Also why doesnt multidex work for the test app or proguard rules from the debug builds?
Thank you for the quick response
bo...@google.com <bo...@google.com> #12
No worries Mario, I would also like to understand where the issue is coming from :)
The fact that it worked with 2.3.0 and not with 2.4.0-alpha4 is worrying. Because I am unable to reproduce with the test project you've provided, can you please compare the contents of build/intermediates/transforms/preDex/androidTest/ when building tests:
- from clean, with 2.3.0
- from clean, with 2.4.0-alpha4, with -Pandroid.useDexArchive=false
The content of these 2 directories should be the same. Please report any differences.
The support in the test runner is missing to be able to run test apk with multiple DEX files. I don't have much more info on it, sorry.
The fact that it worked with 2.3.0 and not with 2.4.0-alpha4 is worrying. Because I am unable to reproduce with the test project you've provided, can you please compare the contents of build/intermediates/transforms/preDex/androidTest/ when building tests:
- from clean, with 2.3.0
- from clean, with 2.4.0-alpha4, with -Pandroid.useDexArchive=false
The content of these 2 directories should be the same. Please report any differences.
The support in the test runner is missing to be able to run test apk with multiple DEX files. I don't have much more info on it, sorry.
bo...@gmail.com <bo...@gmail.com> #13
Hello,
sorry I am a bit restricted in the work environment so I cannot build the demo project from this location but I executed a diff on a real project where the issue happens for dex folders (predex is not available in 2.3.0) its disabled for our project.
this is for 2.3.0 and 2.4.0-alpha4 in location build/intermediates/transforms/dex/androidTest/nonPayMexicoBleeding for following command:
./gradlew clean connectedNonpayMexicoBleedingDebugAndroidTest
I used flag -Pandroid.useDexArchive=false for 2.4.0 only.
diff -rq nonpayMexicoBleeding\ 2.3.0/ nonpayMexicoBleeding\ 2.4.0-alpha4/
Result:
Only in nonpayMexicoBleeding 2.3.0/debug/folders/1000: 1
Only in nonpayMexicoBleeding 2.3.0/debug/folders/1000: 10
Only in nonpayMexicoBleeding 2.4.0-alpha4/debug/folders/1000: 1f
Does this help?
sorry I am a bit restricted in the work environment so I cannot build the demo project from this location but I executed a diff on a real project where the issue happens for dex folders (predex is not available in 2.3.0) its disabled for our project.
this is for 2.3.0 and 2.4.0-alpha4 in location build/intermediates/transforms/dex/androidTest/nonPayMexicoBleeding for following command:
./gradlew clean connectedNonpayMexicoBleedingDebugAndroidTest
I used flag -Pandroid.useDexArchive=false for 2.4.0 only.
diff -rq nonpayMexicoBleeding\ 2.3.0/ nonpayMexicoBleeding\ 2.4.0-alpha4/
Result:
Only in nonpayMexicoBleeding 2.3.0/debug/folders/1000: 1
Only in nonpayMexicoBleeding 2.3.0/debug/folders/1000: 10
Only in nonpayMexicoBleeding 2.4.0-alpha4/debug/folders/1000: 1f
Does this help?
to...@gmail.com <to...@gmail.com> #14
I updated the demo project so you have reproducable example:
https://github.com/originx/Gradle_troubles_android_enteprise
./gradlew clean connectedNonpayMexicoBleedingDebugAndroidTest
Gradle 3.4.0-alpha7 breaks
Commit: ca9e7f7134e5418f9e27e3164efe25521a324a46
Gradle 3.1.2 works
Commit: cfa48cf0b25427d48b328ef6cf80d51fc4e5933b
Cheers
./gradlew clean connectedNonpayMexicoBleedingDebugAndroidTest
Gradle 3.4.0-alpha7 breaks
Commit: ca9e7f7134e5418f9e27e3164efe25521a324a46
Gradle 3.1.2 works
Commit: cfa48cf0b25427d48b328ef6cf80d51fc4e5933b
Cheers
ij...@gmail.com <ij...@gmail.com> #15
Thanks for creating a repro project. I'll try it asap.
ha...@gmail.com <ha...@gmail.com> #16
It works with 2.3.1 because we do not merge the individual dex files, so every test dependency gets dexed individually, and packaged in the test APK. In 2.4.0-alpha7, we are merging all test dependencies to a DEX file, and in this case, they do not fit.
bo...@gmail.com <bo...@gmail.com> #17
so we would need to turn on multidex on the test APK to make this work ?
ca...@sprout.co.id <ca...@sprout.co.id> #18
I think we can do the following:
- If the tested app is mono-dex, test will be mono dex for < 21, and multidex for 21+.
- If the tested app is native multidex, test is as well.
- And if the tested app is legacy multidex, test is mono dex (because currently the test runner does not support pre 21 test multidex apks).
WDYT?
- If the tested app is mono-dex, test will be mono dex for < 21, and multidex for 21+.
- If the tested app is native multidex, test is as well.
- And if the tested app is legacy multidex, test is mono dex (because currently the test runner does not support pre 21 test multidex apks).
WDYT?
so...@gmail.com <so...@gmail.com> #19
Hello,
Sounds like a solution that would make it work on gradle 3.4.0>= ?
What are the side effects from the architecture point of view, performance etc, depending on the effort there would it pay off to bring full multidex support to test runner and test apk both?
I always find it confusing what is the difference between:
-multidex test apk
-multidex test runner
I thought that multidex apk is already supported by MultidexInstrumentationTestRunner
https://developer.android.com/reference/com/android/test/runner/MultiDexTestRunner.html
so that should work, or are you suggesting to introduce the multidex support to the test runner also (what is less effort and more benefit from your side? )
Best regards & thanks for your time
Sounds like a solution that would make it work on gradle 3.4.0>= ?
What are the side effects from the architecture point of view, performance etc, depending on the effort there would it pay off to bring full multidex support to test runner and test apk both?
I always find it confusing what is the difference between:
-multidex test apk
-multidex test runner
I thought that multidex apk is already supported by MultidexInstrumentationTestRunner
so that should work, or are you suggesting to introduce the multidex support to the test runner also (what is less effort and more benefit from your side? )
Best regards & thanks for your time
mr...@gmail.com <mr...@gmail.com> #20
I am not sure when the fix would land (hopefully in the next 1-2 canary releases).
For api levels 21+, ART supports multidex for both the test apk and tested apk, so nothing needs to be done there, and there is no performance penalty. However, multidex for < 21 requires patching the class loader, which is done by the test runner for the tested APK. The test runner is unable to patch the class loader for the test apk though, and we this change is not going to change that. So if you are testing your application with min sdk below 21, you will still have to make sure that the test apk contains a single DEX file.
For api levels 21+, ART supports multidex for both the test apk and tested apk, so nothing needs to be done there, and there is no performance penalty. However, multidex for < 21 requires patching the class loader, which is done by the test runner for the tested APK. The test runner is unable to patch the class loader for the test apk though, and we this change is not going to change that. So if you are testing your application with min sdk below 21, you will still have to make sure that the test apk contains a single DEX file.
he...@gmail.com <he...@gmail.com> #21
Hello,
thank you for the explanation. But I still dont understand why did it work before for api <21, what broke it?
Will that be fixed?
Thank you for your time.
thank you for the explanation. But I still dont understand why did it work before for api <21, what broke it?
Will that be fixed?
Thank you for your time.
vi...@gmail.com <vi...@gmail.com> #22
You might have been able to build a multidex test apk for api < 21, but I am pretty sure you were not able to run all tests on a device < 21 unless you've written your own test runner that patches the class loader. I'd like to avoid this runtime failure scenario. We should break the build until the support for legacy multidex test apk is added.
ca...@gmail.com <ca...@gmail.com> #23
Hello,
If this is a decision from the Android team, could you at least give us instructions how to do this patching on our own. I am amazed that we did not see so much breaking problems up until now, but you are telling us that technically we had a bug/s that is now exposed with the change you guys did now.
Is there a way to add this manual patching by ourselves then, and how to do it?
Thx for the support.
If this is a decision from the Android team, could you at least give us instructions how to do this patching on our own. I am amazed that we did not see so much breaking problems up until now, but you are telling us that technically we had a bug/s that is now exposed with the change you guys did now.
Is there a way to add this manual patching by ourselves then, and how to do it?
Thx for the support.
co...@sandrosantos.net <co...@sandrosantos.net> #24
There is a work in progress to add the support for the legacy multidex test apks, but I am not sure when it might land - https://android-review.googlesource.com/#/c/276561/ .
co...@sandrosantos.net <co...@sandrosantos.net> #25
I understand I will take a look at the commits and try to understand what was done there.
Is there a way to connect this bug to that commit and somehow get an ETA, we rely heavily on our instrumentation for a safety net and this is a show stopper for us so I need to relay and prioritize this information accordingly in the company.
To be honest the biggest worry for me here is that some of the classes you have there are package protected e.g. MultidexExtractor (from the first glance) so I would have to find a way to find proper list of dex files created from test apk, instrumentation and the app and sum them together in the test runner, not sure can I duplicate this behaviour but I will take a look in it in more detail starting next work week.
Is there a way to connect this bug to that commit and somehow get an ETA, we rely heavily on our instrumentation for a safety net and this is a show stopper for us so I need to relay and prioritize this information accordingly in the company.
To be honest the biggest worry for me here is that some of the classes you have there are package protected e.g. MultidexExtractor (from the first glance) so I would have to find a way to find proper list of dex files created from test apk, instrumentation and the app and sum them together in the test runner, not sure can I duplicate this behaviour but I will take a look in it in more detail starting next work week.
cs...@gmail.com <cs...@gmail.com> #26
Comment has been deleted.
br...@gmail.com <br...@gmail.com> #27
ag/I6425e061a2d5e97e36c56fc01c009475af62c086 allows native multidex test apks. Legacy multidex tested app still requires mono-dex test apk. It should be released in the next canary release of the plugin.
@Mario The change is part of the multidex support library, and that is released as part of the SDK (not plugin nor Android Studio). Once the change is in, I will work on adding the support in the plugin. Unfortunately, I cannot provide any ETA. The owner of that change is aware of this bug (it is referenced from an internal bug report that is assigned to him).
@Mario The change is part of the multidex support library, and that is released as part of the SDK (not plugin nor Android Studio). Once the change is in, I will work on adding the support in the plugin. Unfortunately, I cannot provide any ETA. The owner of that change is aware of this bug (it is referenced from an internal bug report that is assigned to him).
jo...@gmail.com <jo...@gmail.com> #28
So the TL;DR is:
1. using native multidex, the fix will be available in the next gradle plugin releases (after 2.4.0-alpha7)
2. using legacy (i.e. support) multidex, we'll have to wait until a new release of com.android.support:multidex:1.0.x library
Do I have that right?
1. using native multidex, the fix will be available in the next gradle plugin releases (after 2.4.0-alpha7)
2. using legacy (i.e. support) multidex, we'll have to wait until a new release of com.android.support:multidex:1.0.x library
Do I have that right?
ji...@gmail.com <ji...@gmail.com> #29
Yes, that is correct.
sp...@gmail.com <sp...@gmail.com> #30
"We should break the build until the support for legacy multidex test apk is added."
This causes quite a bit of pain for my team. We currently have a test apk with more than 65k referenced methods (we're already running proguard on the test apk), and we're depending on it building properly. Our minSdkVersion is 18, but we only run our instrumentation tests on API 21+, so the old behavior allowed us to continue running our tests.
With the new behavior in AGP 3.0, our test apk fails to even build. It seems like my only options are:
1) Reduce the number of referenced methods
2) Create a new variant or flavor with minSdk 21+ and use that for running tests
3) Use minSdk 21 for all debug builds
The first option isn't really feasible, and the second is massively painful because it requires us to retrain 50+ devs on which gradle commands to use to run tests (since the commands change when adding a variant or flavor). The third option also isn't ideal because then we lose lint validation for our real minSdkVersion and lose the ability to easily run debug builds on older android versions manually.
Is there any way to keep the behavior from AGP 2.3.x for building test apks until a proper solution for legacy multidex is available?
This causes quite a bit of pain for my team. We currently have a test apk with more than 65k referenced methods (we're already running proguard on the test apk), and we're depending on it building properly. Our minSdkVersion is 18, but we only run our instrumentation tests on API 21+, so the old behavior allowed us to continue running our tests.
With the new behavior in AGP 3.0, our test apk fails to even build. It seems like my only options are:
1) Reduce the number of referenced methods
2) Create a new variant or flavor with minSdk 21+ and use that for running tests
3) Use minSdk 21 for all debug builds
The first option isn't really feasible, and the second is massively painful because it requires us to retrain 50+ devs on which gradle commands to use to run tests (since the commands change when adding a variant or flavor). The third option also isn't ideal because then we lose lint validation for our real minSdkVersion and lose the ability to easily run debug builds on older android versions manually.
Is there any way to keep the behavior from AGP 2.3.x for building test apks until a proper solution for legacy multidex is available?
[Deleted User] <[Deleted User]> #31
@dr... for your specific situation, why not just stay on 2.3 until 2.4 (or 3.0) is out of alpha? Having 50 devs on alpha anything seems really iffy.
aj...@gmail.com <aj...@gmail.com> #32
Yeah, definitely. We're not planning to upgrade until 3.0 is stable, but I'm worried that it will get to the stable channel without this being fixed. If legacy multidex support for test apks is ready before 3.0 is stable, then I don't have a problem :)
ra...@gmail.com <ra...@gmail.com> #33
Hello,
since the multidex 1.0.2 is live I would expect that multidex works fine on api <21 for test apks, but this is not the case.
Did I misunderstand something when you said this will be backported to legacy multidex so test apk can contain multiple dex files also or?
classpath 'com.android.tools.build:gradle:3.0.0-alpha7'
multidex : '1.0.2',
Android Studio 3.0 Canary 7
Build #AI-171.4182969, built on July 14, 2017
JRE: 1.8.0_152-release-884-b01 x86_64
JVM: OpenJDK 64-Bit Server VM by JetBrains s.r.o
Mac OS X 10.12.4
since the multidex 1.0.2 is live I would expect that multidex works fine on api <21 for test apks, but this is not the case.
Did I misunderstand something when you said this will be backported to legacy multidex so test apk can contain multiple dex files also or?
classpath 'com.android.tools.build:gradle:3.0.0-alpha7'
multidex : '1.0.2',
Android Studio 3.0 Canary 7
Build #AI-171.4182969, built on July 14, 2017
JRE: 1.8.0_152-release-884-b01 x86_64
JVM: OpenJDK 64-Bit Server VM by JetBrains s.r.o
Mac OS X 10.12.4
ar...@gmail.com <ar...@gmail.com> #34
The support for legacy multidex test apks has been merged in AOSP, but a new version of com.android.support:multidex has not been published yet. We need this artifacts published in order to add support for legacy multidex test apks in the Android plugin for Gradle.
sa...@gmail.com <sa...@gmail.com> #35
Hello,
Thank you for the answer but I don't understand what is inside multidex 1.0.2 then.
in support lib Revision 25.4.0 it is stated:
Concurrent with this support library release, we are also releasing multidex version 1.0.2. This version includes the following important changes:
Allows multidexing of instrumentation APK.
Deprecates MultiDexTestRunner (AndroidJUnitRunner should be used instead).
We use multidex 1.0.2. Does this mean this fix will come out in 1.0.3, do you have any eta window on this topic?
Cheers
Thank you for the answer but I don't understand what is inside multidex 1.0.2 then.
in support lib Revision 25.4.0 it is stated:
Concurrent with this support library release, we are also releasing multidex version 1.0.2. This version includes the following important changes:
Allows multidexing of instrumentation APK.
Deprecates MultiDexTestRunner (AndroidJUnitRunner should be used instead).
We use multidex 1.0.2. Does this mean this fix will come out in 1.0.3, do you have any eta window on this topic?
Cheers
sa...@gmail.com <sa...@gmail.com> #36
Indeed, 1.0.2 contains all the necessary support, but the support in the plugin is missing. I will try to get the plugin changes published in the next few preview releases, but I cannot give any hard guarantees when it will happen.
da...@gmail.com <da...@gmail.com> #37
Thank you for the clarification. Could you please update the documentation that the new support/ multidex lib is not integrated in tooling yet. Also in gradle build files lint recommends removing the "dev" flavor since it is not needed anymore but then it would break tests, instant run etc. also an important thing to note.
Looking forward to the integration let us know when you manage to merge it.
Have a nice weekend!
Looking forward to the integration let us know when you manage to merge it.
Have a nice weekend!
mo...@gmail.com <mo...@gmail.com> #38
I am reopening this, as we have too many reports. It is blocked on internal issue b/62286076 .
mu...@gmail.com <mu...@gmail.com> #39
hello, what is the current progress of this issue?
thank you
thank you
ar...@gmail.com <ar...@gmail.com> #40
@39 The support in the plugin is ready, however we need a new version of build tools published. Hopefully that will happen soon.
ji...@gmail.com <ji...@gmail.com> #41
this is amazing news, could you please update the status of this ticket when this happens?
does this mean this will come out with beta4?
does this mean this will come out with beta4?
ch...@lovefurniture.ie <ch...@lovefurniture.ie> #42
Build tools are published independently of the plugin and Android Studio, but I hope that will happen in the next week or two. I'll update the bug once it happens.
qw...@gmail.com <qw...@gmail.com> #43
@42 1.0.2 does provide support for multidex android test APKs.
Simply create a "CustomerTestRunner" and override "onCreate" to call "MultiDex.installInstrumentation(context, targetContext)". See this example:https://github.com/jaredsburrows/android-gif-example/blob/master/src/androidTest/kotlin/test/CustomTestRunner.kt#L12 .
Simply create a "CustomerTestRunner" and override "onCreate" to call "MultiDex.installInstrumentation(context, targetContext)". See this example:
lb...@gmail.com <lb...@gmail.com> #44
Comment has been deleted.
jo...@google.com <jo...@google.com>
ca...@gmail.com <ca...@gmail.com> #45
#44 Make sure you use ATSL runner 1.0.1 or later.
jo...@google.com <jo...@google.com>
mo...@gmail.com <mo...@gmail.com> #47
We discovered this problem too. It's quite annoying for us and we will have to reverse switching to GAP 3 if there is no fix in the next 2 days...
Can anyone give us an update and an ETA for this ?
We use build tools 26.0.1, gap 3 beta 5, ASTL runner 1.0.1.
Can anyone give us an update and an ETA for this ?
We use build tools 26.0.1, gap 3 beta 5, ASTL runner 1.0.1.
ro...@gmail.com <ro...@gmail.com> #48
As a workaround, how can we run proguard on the instrumentation apk, when it is not enabled in our debug variant for the main app ?
jo...@gmail.com <jo...@gmail.com> #49
You do not want to proguard a debug apk. It would take forever to write and
run new tests.
Jared Burrows
*jaredsburrows@gmail.com <jaredsburrows@gmail.com>*
LinkedIn:https://www.linkedin.com/in/jaredsburrows
On Thu, Sep 14, 2017 at 12:14 PM, <buganizer-system@google.com> wrote:
run new tests.
Jared Burrows
*jaredsburrows@gmail.com <jaredsburrows@gmail.com>*
LinkedIn:
On Thu, Sep 14, 2017 at 12:14 PM, <buganizer-system@google.com> wrote:
se...@gmail.com <se...@gmail.com> #50
Until this issue is fixed, many apps will have no choice but to proguard their test apk :)
se...@gmail.com <se...@gmail.com> #51
I agree, this workaround is not a good solution.
er...@gmail.com <er...@gmail.com> #52
On our side, we fixed the issue by cutting down on our dependencies in the instrumentation apk. Though the dex count is still in the red zone and we will be happy to see the issue fix, but there is no more emergency on our side.
le...@gmail.com <le...@gmail.com> #54
I see it is tracked in Moma. Is this set for marked release for 3.0.0-beta7? or release?
le...@yahoo.com <le...@yahoo.com> #55
was the fix included in the latest release of build tools 26.1? I think the link to track the release is not public.
al...@gmail.com <al...@gmail.com> #56
It still doesn't work for me on 3.0.0-beta7 and Build tools 26.0.2 - I still get the error.
as...@gmail.com <as...@gmail.com> #57
Status says fixed but could we get instructions on how to make it work? Is this already included in Build tools 26.0.2 and AGP 3.0.0-beta7?
ph...@gmail.com <ph...@gmail.com> #58
Comment has been deleted.
pa...@gmail.com <pa...@gmail.com> #59
The issue has not been fixed in beta7, as build tools 26.0.2 are missing some of the pieces to have this working. Re-opening.
mu...@gmail.com <mu...@gmail.com> #60
Thank you.
sa...@gmail.com <sa...@gmail.com> #61
Is there an ETA? Looks like build tools 27.0.0 shipped without this fix.
cl...@gmail.com <cl...@gmail.com> #62
Any ETA on this? Or which components we should watch for updates? Is the the build tools 2x.0.y? Is it a new multidex support lib 1.0.3? 3.1 plugin?
ib...@newhorizonsnigeria.com <ib...@newhorizonsnigeria.com> #63
Comment has been deleted.
le...@gmail.com <le...@gmail.com> #64
Could you consider releasing the fix under 3.0.x (if that's even possible)?
Doing it in 3.1 will require everyone who wants to have multidex for test APK working to start using unstable version of AS and AGP.
Doing it in 3.1 will require everyone who wants to have multidex for test APK working to start using unstable version of AS and AGP.
mi...@gmail.com <mi...@gmail.com> #65
Please update documentation to reflect that legacy multidex IS supported, except broken by this bug (known issue) in AGP 3.0.
https://developer.android.com/studio/build/multidex.html#testing
> `Using multidex to create a test APK is not currently supported.`
> `Using multidex to create a test APK is not currently supported.`
fr...@csistemi.it <fr...@csistemi.it> #66
This is fixed starting with 3.1.0-alpha04. Please try it out, and let us know if you are facing any issues. Thanks!
br...@gmail.com <br...@gmail.com> #67
Is it not "MultiDex.installInstrumentation(getContext(), getTargetContext());" in the AndroidJUnitRunner?
sa...@gmail.com <sa...@gmail.com> #68
3.1.0-alpha04 worked for me. Thanks for the fix.
jo...@google.com <jo...@google.com>
ni...@gmail.com <ni...@gmail.com> #69
I just trying with 3.1.0-alpha06 and the problem seams to still be there =/
jo...@google.com <jo...@google.com> #70
This isn't working for me either with 3.1.0-alpha06. Can you clarify what was fixed, and what combination of Gradle, Android Gradle Plugin, Multidex library and Android Build Tools we should test against?
jo...@google.com <jo...@google.com> #71
Folks, any news in this issue? Could you explain how to make this work? Simply using AGP 3.1.0-alpha04 doesn't solve the problem
mi...@gmail.com <mi...@gmail.com> #72
Never mind. It does solve the problem
hl...@gmail.com <hl...@gmail.com> #73
Re #70:
You need to use Android plugin for Gradle 3.1.0-alpha04+, any compatible version of Gradle (e.g. 4.4) and BuildTools (e.g. 27.0.3). Multidex library 1.0.2 will be added by the plugin as a dependency automatically. With this, your build will be successful.
To run tests successfully, the test runner needs to support legacy test APK. AndroidJUnitRunner supports that, so you can use that.
You need to use Android plugin for Gradle 3.1.0-alpha04+, any compatible version of Gradle (e.g. 4.4) and BuildTools (e.g. 27.0.3). Multidex library 1.0.2 will be added by the plugin as a dependency automatically. With this, your build will be successful.
To run tests successfully, the test runner needs to support legacy test APK. AndroidJUnitRunner supports that, so you can use that.
sa...@gmail.com <sa...@gmail.com> #74
Looks much better but I still get an issue with multiDexKeepProguard file, it somehow feels it is not respected which classes should be added to the main dex file.
For example following your suggestion of tl;dr version the test crashes because some files are not found in the main dex file during the app start:
01-09 10:31:06.965 4861-4861/? W/dalvikvm: Class resolved by unexpected DEX: Ltimber/log/Timber$Tree;(0xa75def58):0x99f02000 ref [Lcom/google/devtools/build/android/desugar/runtime/ThrowableExtension;] Lcom/google/devtools/build/android/desugar/runtime/ThrowableExtension;(0xa75def58):0x99caf000
01-09 10:31:06.965 4861-4861/? W/dalvikvm: (Ltimber/log/Timber$Tree; had used a different Lcom/google/devtools/build/android/desugar/runtime/ThrowableExtension; during pre-verification)
01-09 10:31:06.965 4861-4861/? D/AndroidRuntime: Shutting down VM
01-09 10:31:06.965 4861-4861/? W/dalvikvm: threadid=1: thread exiting with uncaught exception (group=0xa66de228)
01-09 10:31:06.975 4861-4861/? E/InstrumentationResultPrinter: Failed to mark test No Tests as finished after process crash
01-09 10:31:06.975 4861-4861/? E/MonitoringInstr: Exception encountered by: Thread[main,5,main]. Dumping thread state to outputs and pining for the fjords.
java.lang.IllegalAccessError: Class ref in pre-verified class resolved to unexpected implementation
at timber.log.Timber$Tree.getStackTraceString(Timber.java:569)
at timber.log.Timber$Tree.prepareLog(Timber.java:544)
at timber.log.Timber$Tree.i(Timber.java:452)
at timber.log.Timber$1.i(Timber.java:288)
at timber.log.Timber.i(Timber.java:63)
Do you have any idea where does this pops out from?
For example following your suggestion of tl;dr version the test crashes because some files are not found in the main dex file during the app start:
01-09 10:31:06.965 4861-4861/? W/dalvikvm: Class resolved by unexpected DEX: Ltimber/log/Timber$Tree;(0xa75def58):0x99f02000 ref [Lcom/google/devtools/build/android/desugar/runtime/ThrowableExtension;] Lcom/google/devtools/build/android/desugar/runtime/ThrowableExtension;(0xa75def58):0x99caf000
01-09 10:31:06.965 4861-4861/? W/dalvikvm: (Ltimber/log/Timber$Tree; had used a different Lcom/google/devtools/build/android/desugar/runtime/ThrowableExtension; during pre-verification)
01-09 10:31:06.965 4861-4861/? D/AndroidRuntime: Shutting down VM
01-09 10:31:06.965 4861-4861/? W/dalvikvm: threadid=1: thread exiting with uncaught exception (group=0xa66de228)
01-09 10:31:06.975 4861-4861/? E/InstrumentationResultPrinter: Failed to mark test No Tests as finished after process crash
01-09 10:31:06.975 4861-4861/? E/MonitoringInstr: Exception encountered by: Thread[main,5,main]. Dumping thread state to outputs and pining for the fjords.
java.lang.IllegalAccessError: Class ref in pre-verified class resolved to unexpected implementation
at timber.log.Timber$Tree.getStackTraceString(Timber.java:569)
at timber.log.Timber$Tree.prepareLog(Timber.java:544)
at timber.log.Timber$Tree.i(Timber.java:452)
at timber.log.Timber$1.i(Timber.java:288)
at timber.log.Timber.i(Timber.java:63)
Do you have any idea where does this pops out from?
jo...@google.com <jo...@google.com>
br...@gmail.com <br...@gmail.com> #75
Re #74:
This seems to be Java 8 specific bug, and I've filledhttps://issuetracker.google.com/71737186 to track this. Can we please continue discussion there?
This seems to be Java 8 specific bug, and I've filled
ni...@gmail.com <ni...@gmail.com> #76
We would love to use this fix, but we need a stable version of the gradle android plugin. When will Gradle Android Plugin 3.1.0 be released ?
le...@gmail.com <le...@gmail.com> #77
"Please " help me i want update oreo 8.0 without computer
se...@gmail.com <se...@gmail.com> #78
The release note for 3.1.0 doesn't mention this issue, is it fixed ?
le...@gmail.com <le...@gmail.com> #79
We are trying it and it looks like it's not working (though it used to be working in alpha04)
ks...@gmail.com <ks...@gmail.com> #80
There is a bug of a new kind in 3.1 + related to instrumented APKs & multidex
Until recently we had a big module, with all our code + all our instrurmentation tests code. Then we could check and the plugin (3.1.alpha and 3.1) work well to enable multidex in tests apks.
But we recently dissociated this big module: one contains the production code, the other one contains the instrumentation code. And then, the new plugin breaks: we can still a multidex production app, but the instrumentation test apk is not generated. We hit the 65K limit and the build reports this as an issue. Also, the android test don't have a task: transformClassesWithMultidexlistFor<variant>AndroidTest
What can go wrong ?
Until recently we had a big module, with all our code + all our instrurmentation tests code. Then we could check and the plugin (3.1.alpha and 3.1) work well to enable multidex in tests apks.
But we recently dissociated this big module: one contains the production code, the other one contains the instrumentation code. And then, the new plugin breaks: we can still a multidex production app, but the instrumentation test apk is not generated. We hit the 65K limit and the build reports this as an issue. Also, the android test don't have a task: transformClassesWithMultidexlistFor<variant>AndroidTest
What can go wrong ?
le...@gmail.com <le...@gmail.com> #81
To be more precise: we have one module named module_apk that contains:
* a few classes in production code
* quite a lot of classes of instrumentation tests
The module_apk wires together all other modules that are all library modules.
When adding multidexEnabled to module_apk, the production apk is multidexed, but not the test apk. There is no transform / task for the AndroidTest variant related to multidex.
When adding multidexEnabled to all default configuration of all modules, all of them have both instrumentation and production multidex tasks & transformations, all except module_apk...
We have no idea what is going wrong.
* a few classes in production code
* quite a lot of classes of instrumentation tests
The module_apk wires together all other modules that are all library modules.
When adding multidexEnabled to module_apk, the production apk is multidexed, but not the test apk. There is no transform / task for the AndroidTest variant related to multidex.
When adding multidexEnabled to all default configuration of all modules, all of them have both instrumentation and production multidex tasks & transformations, all except module_apk...
We have no idea what is going wrong.
ck...@gmail.com <ck...@gmail.com> #82
Re #81:
I've filledhttps://issuetracker.google.com/77183226 , let's please continue discussion there. Thanks.
I've filled
ca...@gmail.com <ca...@gmail.com> #83
What went wrong:
Execution failed for task ':app:transformClassesWithMultidexlistForLive'.
> com.android.build.api.transform.TransformException: Error while generating the main dex list.
Execution failed for task ':app:transformClassesWithMultidexlistForLive'.
> com.android.build.api.transform.TransformException: Error while generating the main dex list.
jo...@google.com <jo...@google.com> #84
Re #83: Please file a new issue, as that is error indicates there is a main dex list task error for the application, not for the test.
ca...@gmail.com <ca...@gmail.com> #85
Echoing #78. Our instrumented tests using multidex worked using the 3.0.0 version of the Android Plugin for gradle. Updated to 3.1.1 and it would just say empty test suite. I found this bug then reverted back to 3.1.0-alpha04 and the tests work again. Should this be working in 3.1.1?
da...@gmail.com <da...@gmail.com> #86
We (whoever has a repro) should probably file a new issue against 3.1.1 referencing this issue. This has been "marked as Fixed" 3 times... so it's possible the current problems are far from the original.
am...@gmail.com <am...@gmail.com> #87
Re #85, #86:
Yes, please file a new bug, and paste the link here. Issue in #78 was due to a custom plugin which would disable multidex. Thanks!
Yes, please file a new bug, and paste the link here. Issue in #78 was due to a custom plugin which would disable multidex. Thanks!
ro...@gmail.com <ro...@gmail.com> #88
Comment has been deleted.
ri...@gmail.com <ri...@gmail.com> #89
white screen 😩
Android Studio Giraffe | 2022.3.1 Patch 4
Build #AI-223.8836.35.2231.11090377, built on November 13, 2023
Runtime version: 17.0.6+0-17.0.6b829.9-10027231 x86_64
VM: OpenJDK 64-Bit Server VM by JetBrains s.r.o.
macOS 13.3.1
GC: G1 Young Generation, G1 Old Generation
Memory: 5096M
Cores: 8
Metal Rendering is ON
Registry:
external.system.auto.import.disabled=true
ide.text.editor.with.preview.show.floating.toolbar=false
ide.instant.shutdown=false
Android Studio Giraffe | 2022.3.1 Patch 4
Build #AI-223.8836.35.2231.11090377, built on November 13, 2023
Runtime version: 17.0.6+0-17.0.6b829.9-10027231 x86_64
VM: OpenJDK 64-Bit Server VM by JetBrains s.r.o.
macOS 13.3.1
GC: G1 Young Generation, G1 Old Generation
Memory: 5096M
Cores: 8
Metal Rendering is ON
Registry:
external.system.auto.import.disabled=true
ide.text.editor.with.preview.show.floating.toolbar=false
ide.instant.shutdown=false
gu...@gmail.com <gu...@gmail.com> #90
Having the same issue since today
cl...@gmail.com <cl...@gmail.com> #91
Comment has been deleted.
ta...@gmail.com <ta...@gmail.com> #92
Same issue. Emulator version 32.1.12
ch...@gmail.com <ch...@gmail.com> #93
I solved this problem upgrading the emulator version to 32.1.15
jm...@gmail.com <jm...@gmail.com> #94
Fix: Updating the Android SDK Platform-Tools and Android Emulator to latest
sv...@gmail.com <sv...@gmail.com> #95
Comment has been deleted.
ma...@gmail.com <ma...@gmail.com> #96
Confirming the fix !
You probably need to update the emulator and sdk tools (go to Tools > SDK Manager > SDK Tools and update both)
You probably need to update the emulator and sdk tools (go to Tools > SDK Manager > SDK Tools and update both)
ce...@info-sync.com <ce...@info-sync.com> #97
Confirmed. Thank you. Fix: Updating the Android SDK Platform-Tools and Android Emulator to latest
po...@gmail.com <po...@gmail.com> #98
Fix Confirmed. Thank you!
ga...@gmail.com <ga...@gmail.com> #99
Thanks for this thread!, I was having the same issue and I was able to solve by updating SDK manager -> SDK tools.... I had several updates there.
ei...@gmail.com <ei...@gmail.com> #100
for my "Ubuntu 20.04.6 LTS (Focal Fossa)"
i just create new emulator with API level 33 and it works
may the issue with API level 30
Thank You
M.G.Chouhan
i just create new emulator with API level 33 and it works
may the issue with API level 30
Thank You
M.G.Chouhan
wj...@gmail.com <wj...@gmail.com> #101
Comment has been deleted.
mh...@futureproof.tn <mh...@futureproof.tn> #102
Comment has been deleted.
mh...@futureproof.tn <mh...@futureproof.tn> #103
Comment has been deleted.
jo...@google.com <jo...@google.com> #104
PSA (May 13, 2024)
In mid-May, Google maps in the Android Emulator Extended Controls will NO LONGER WORK in emulator versions before 34.2.13. Please update your emulator to avoid this issue.
For more into, see
mi...@gmail.com <mi...@gmail.com> #105
Fixed by updating the Emulator in Android Studio
Description
When trying to add GPS coordinates to Android Emulator, the Google Map instance that should appear on the left of the extended settings shows a white window that disappears after a while.
STEPS TO REPRODUCE:
1. Open Android Studio (without a project opened)
2. Click in More Actions
3. Open Virtual Device Manager
4. Run a Virtual Device
5. Click on the three dots at the bottom of the control bar to open the extended settings
6. Click on location
7. The map doesn't appear
Studio Build: #AI-211.7628.21.2111.8193401
Version of Gradle Plugin: 211.7628.26
Version of Gradle: 7.2
Version of Java: 11.0.11+0-b60-7590822
OS: Fedora Linux 35 (Workstation Edition) Kernel 5.16.18-200