Status Update
Comments
je...@google.com <je...@google.com>
je...@google.com <je...@google.com>
je...@google.com <je...@google.com> #2
Based on the ASM changelog:
ASM 8.0 add support for Java 14.
So seems that all we would need to do is to upgrade ASM dependency. AFAIK the ASM version in jetifier needs to be in sync with what AGP / AS is using. Can you Hung confirm if we could make the upgrade happen?
je...@google.com <je...@google.com>
de...@google.com <de...@google.com> #3
Ah yes, this will likely be solved once we upgrade AGP to use ASM 8.
@#1: As a workaround, you can add the following to your root build.gradle
file to upgrade the tools to ASM 8:
buildscript {
repositories {
...
}
dependencies {
classpath 'com.android.tools.build:gradle:4.0.0'
classpath 'org.ow2.asm:asm:8.0'
classpath 'org.ow2.asm:asm-util:8.0'
classpath 'org.ow2.asm:asm-commons:8.0'
}
}
hu...@google.com <hu...@google.com> #4
Disclaimer: there might be breaking API changes, so if it doesn't work we need to update jetifier.
tn...@google.com <tn...@google.com> #5
I'm sorry for the late response.
hu...@google.com <hu...@google.com> #6
I have exactly the same problem as in i.e. org.bouncycastle:bcprov-jdk15on update from 1.65.01 to 1.66
I changed the gradle.build as proposed in
dependencies {
classpath 'com.android.tools.build:gradle:4.1.0-beta05'
classpath 'org.ow2.asm:asm:8.0'
classpath 'org.ow2.asm:asm-util:8.0'
classpath 'org.ow2.asm:asm-commons:8.0'
classpath 'org.anarres.jarjar:jarjar-gradle:1.0.1' // working jarjar.repackage version
}
}
I used 4.1.0-beta05 to resolve problem reported in
But still having problem:
Execution failed for task ':aTalk:compilePlaystoreDebugJavaWithJavac'.
Could not resolve all files for configuration ':aTalk:playstoreDebugCompileClasspath'. Failed to transform bcprov-jdk15on-1.66.jar (org.bouncycastle:bcprov-jdk15on:1.66) to match attributes {artifactType=android-classes-jar, org.gradle.category=library, org.gradle.libraryelements=jar, org.gradle.status=release, org.gradle.usage=java-api}. > Execution failed for JetifyTransform: /home/cmeng/.gradle/caches/modules-2/files-2.1/org.bouncycastle/bcprov-jdk15on/1.66/ed564ade61defca27e26fb1378a70b22831fc5c1/bcprov-jdk15on-1.66.jar. > Failed to transform '/home/cmeng/.gradle/caches/modules-2/files-2.1/org.bouncycastle/bcprov-jdk15on/1.66/ed564ade61defca27e26fb1378a70b22831fc5c1/bcprov-jdk15on-1.66.jar' using Jetifier. Reason: IllegalArgumentException, message: Unsupported class file major version 59. (Run with --stacktrace for more details.) Suggestions: - Check out existing issues at
https://issuetracker.google.com/issues?q=componentid:460323&s=modified_time:desc , it's possible that this issue has already been filed there. - If this issue has not been filed, please report it athttps://issuetracker.google.com/issues/new?component=460323 (run with --stacktrace and provide a stack trace if possible).
hu...@google.com <hu...@google.com> #7
We'll need to use a high enough version of the ASM library that allows parsing the bytecode of the library in question (i.e., JDK 13 for
Workaround 1 (not highly recommended): Add the following to build.gradle
to always use the latest ASM version. (Won't work if the latest ASM version still doesn't support the required JDK version, or if it's incompatible with the current version of AGP/Jetifier.)
buildscript {
repositories {
...
}
dependencies {
classpath 'com.android.tools.build:gradle:<AGP-version>'
classpath 'org.ow2.asm:asm-util:+'
classpath 'org.ow2.asm:asm-commons:+'
}
}
Workaround 2 (recommended): Add the following to gradle.properties
to bypass running Jetifier on the library. (Won't work if the library does require refactoring to support AndroidX via Jetifier.)
android.jetifier.blacklist = mssql-jdbc-8.2.2.jre13.jar # for the failure in comment #1
android.jetifier.blacklist = bcprov-jdk15on-1.66.jar # for the failure in comment #6
# (This property is renamed to `android.jetifier.ignorelist` in AGP 4.2.)
ba...@gmail.com <ba...@gmail.com> #8
hu...@google.com <hu...@google.com> #9
Adding another workaround to
Workaround 3: Disable Jetifier entirely if all the libraries you're using have been migrated to AndroidX:
android.enableJetifier=false
cr...@gmail.com <cr...@gmail.com> #10
Friendly ping on this issue. It just came up again:
I'd be happy to bump the ASM version if you let me know where the code is.
Description
I built a fresh version of AGP and pointed my project to it -- a project which uses the Tiramisu preview.
I get a build warning like this:
We should probably special case previews like this?