Fixed
Status Update
Comments
pi...@gmail.com <pi...@gmail.com> #2
[Comment deleted]
cm...@google.com <cm...@google.com> #4
Also of note is the adb error when trying to install bad APK: INSTALL_FAILED_DEXOPT
cm...@google.com <cm...@google.com> #5
load dex files over 5Gb. -> load dex files over 5Mb.
am...@google.com <am...@google.com> #6
Same here! Looking forward to a solution :)
Android Studio version: 0.8.12
buildToolsVersion 21.0.1
Gradle 1.11
Android Studio version: 0.8.12
buildToolsVersion 21.0.1
Gradle 1.11
uc...@google.com <uc...@google.com>
ga...@google.com <ga...@google.com>
an...@google.com <an...@google.com>
an...@google.com <an...@google.com>
pi...@gmail.com <pi...@gmail.com> #7
There is already an option in dx allowing to force generation of smaller dex files:
--set-max-idx-number=<value>
Unfortunately changing the default is not a solution since the linearAlloc limit can be reached at very different levels depending on the classes hierarchy and other criteria.
In addition for most applications, moving to multidex will only help to workaround the linearalloc limit for the installation. But the application will still crash against the same limit at execution. The only working use case where I know multidex can help with linearalloc is when the apk does not contains one application but distinct pieces running in separate process.
--set-max-idx-number=<value>
Unfortunately changing the default is not a solution since the linearAlloc limit can be reached at very different levels depending on the classes hierarchy and other criteria.
In addition for most applications, moving to multidex will only help to workaround the linearalloc limit for the installation. But the application will still crash against the same limit at execution. The only working use case where I know multidex can help with linearalloc is when the apk does not contains one application but distinct pieces running in separate process.
sa...@google.com <sa...@google.com> #8
Thanks for your quick response.
It's nice to know about that command line option. I do not see it in the output of 'dx --help', might be good to add that.
I'm not very familiar with the 'linearAlloc limit' issue outside of the context of the dexopt step. My sample app is able to run once the lower idx value is set, although I do not actually call into any of the library code that is bundled with the app. I assume it's undefined when/if the 'linearAlloc limit' will be hit in a large application on gb.
I'm a bit confused as to the platform compatibility of multidex given the 'linearAlloc limit' bug. What specific versions of Android are supported? The multidex code implies back to v4 (https://android.googlesource.com/platform/frameworks/multidex/+/master/library/src/android/support/multidex/MultiDex.java ) but it would seem that ICS is the earliest supported platform. Is this correct?
It's nice to know about that command line option. I do not see it in the output of 'dx --help', might be good to add that.
I'm not very familiar with the 'linearAlloc limit' issue outside of the context of the dexopt step. My sample app is able to run once the lower idx value is set, although I do not actually call into any of the library code that is bundled with the app. I assume it's undefined when/if the 'linearAlloc limit' will be hit in a large application on gb.
I'm a bit confused as to the platform compatibility of multidex given the 'linearAlloc limit' bug. What specific versions of Android are supported? The multidex code implies back to v4 (
Description
DESCRIBE THE ISSUE IN DETAIL:
I maintain a Gradle plugin that, among other things, depends on:
On AGP 7.4.0-alpha08, my project builds without warnings or errors. When I update it to alpha09, I see the following build failure (due to enabling warnings-as-errors):
This enum comes from
sdk-commons
. I don't explicitly depend on this, and interestingly, none of my code seems to reference it, either. Adding a compileOnly dependency onsdk-commons
resolves the error; it appears to me as if AGP transitively depends onsdk-commons
, and between alpha08 and alpha09 something in that transitive chain changed from anapi
dependency to animplementation
dependency.STEPS TO REPRODUCE:
git clone https://github.com/keepsafe/dexcount-gradle-plugin
git checkout agp-7.4.0-alpha09
./gradlew compileJava
ATTACH SCREENSHOTS/RECORDINGS OF THE ISSUE
ATTACH LOG FILES (Select Help > Show Log in Files, or Show Log in Finder on a Mac)
IMPORTANT: Please readhttps://developer.android.com/studio/report-bugs.html carefully and supply
all required information.
Studio Build: N/A Version of Gradle Plugin: 7.4.0-alpha09 Version of Gradle: 7.5 Version of Java: 11.0.15 (Azul Systems, Inc. 11.0.15+10-LTS) OS: Mac OS X 12.4 aarch64