Status Update
Comments
pi...@gmail.com <pi...@gmail.com> #2
Okay. I tried a bunch of agp+android studio versions
The last working version was classpath("com.android.tools.build:gradle:7.4.0-alpha06")
once I moved to
classpath("com.android.tools.build:gradle:7.4.0-alpha07")
then things start breaking on firebase app dist.
xa...@google.com <xa...@google.com> #3
Scott, assigning to you as it seem to complain the zip is not aligned while packaging which is very puzzling considering the steps...
cm...@google.com <cm...@google.com> #4
OP, when you build the APK with AGP, are you doing any post-processing on the APK and/or do you have any custom tasks that are modifying the APK?
Can you try to verify the alignment of your APK with zipalign
locally (zipalign
is included in build-tools
):
zipalign -c -v 4 foo.apk
cm...@google.com <cm...@google.com> #5
Not doing any post processing. No custom tasks. I will try to verify alignment now. Give me a sec.
am...@google.com <am...@google.com> #6
Scenario 1:
built my apk with agp alpha09, but didn't update firebase (bom = 30.2.0)
/Users/idle/Library/Android/sdk/build-tools/31.0.0/zipalign -c -v 4 app-release.apk
"Verification succesful"
Scenario 2:
built my apk with agp alpha09, but I DID update firebase (bom = 30.3.1)
/Users/idle/Library/Android/sdk/build-tools/31.0.0/zipalign -c -v 4 app-release.apk
"Verification FAILED"
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
Scenario 3:
built my apk with agp alpha09, with androidx.splash rc01
/Users/idle/Library/Android/sdk/build-tools/31.0.0/zipalign -c -v 4 app-release.apk
"Verification succesful"
Scenario 4:
built my apk with agp alpha09, with androidx.splash 1.0.0
/Users/idle/Library/Android/sdk/build-tools/31.0.0/zipalign -c -v 4 app-release.apk
"Verification FAILED"
In both failed cases if I do | grep BAD
I get
7216334 junit/runner/logo.gif (BAD - 2)
7217354 junit/runner/smalllogo.gif (BAD - 2)
sa...@google.com <sa...@google.com> #8
In the cases where zipalign
verification fails, is the APK generated by a clean build (e.g., ./gradlew clean :app:assembleRelease
)?
Does verification succeed if you add this to your build.gradle?
android {
packagingOptions {
exclude 'junit/runner/logo.gif'
exclude 'junit/runner/smalllogo.gif'
}
}
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