Fixed
Status Update
Comments
be...@kbc.be <be...@kbc.be> #2
I have the same issue with gradle:3.2.0-rc01 gradle:3.2.0-rc02 & gradle:3.2.0-rc03
Last working version was gradle:3.2.0-beta05
Last working version was gradle:3.2.0-beta05
be...@kbc.be <be...@kbc.be> #3
I managed to fix it by putting the apt dagger part in every module using dagger
and also removing unused classpath stuff (hugo)
and also removing unused classpath stuff (hugo)
nk...@gmail.com <nk...@gmail.com> #4
I also have similar work around
an...@gmail.com <an...@gmail.com> #5
Same issue here:
kotlinVersion 1.2.70'= & gradle:3.2.0-rc03
Android Studio 3.2 RC 3
Build #AI-181.5540.7.32.4987877, built on August 31, 2018
JRE: 1.8.0_152-release-1136-b06 x86_64
JVM: OpenJDK 64-Bit Server VM by JetBrains s.r.o
macOS 10.13.6
kotlinVersion 1.2.70'= & gradle:3.2.0-rc03
Android Studio 3.2 RC 3
Build #AI-181.5540.7.32.4987877, built on August 31, 2018
JRE: 1.8.0_152-release-1136-b06 x86_64
JVM: OpenJDK 64-Bit Server VM by JetBrains s.r.o
macOS 10.13.6
uc...@google.com <uc...@google.com>
je...@google.com <je...@google.com>
hu...@google.com <hu...@google.com> #6
This error is thrown from Jetifier. Filip, could you take a look?
ap...@google.com <ap...@google.com> #7
Project: platform/frameworks/support
Branch: androidx-master-dev
commit 45c87246333e817ca130661539e16e6bf16ba7b9
Author: Filip Pavlis <pavlis@google.com>
Date: Tue Sep 25 13:20:50 2018
Improvements and bug fixes in Jetifier.
** This CL was moved from beta branch. **
PackageMap
- rules are now part of the config file which makes it more intuitive
for editing and also enables to control packages via config file which
is better for standalone jetifier and custom modifications.
Versions
- Removes dual entries of version sets
Dagger reference
- Removes dagger reference from dependencies map so dagger will no
longer be rewritten.
Crash when rewritting const. pool
- Apparently constants pool can also contain entries separates with '.'
as packages and also arrays. Jetifier did not expect such input and
crashed on one specific dependency. This is now improved.
Tests
- Adds a new test running on RxSnackbarKt that compares against expected
file to prevent possible regressions.
Test: Added
Bug: b/115815364
Bug: b/113224601
Change-Id: Id49cf978c69fd86cf149febfc2bcfa899f5f80b6
M buildSrc/jetify.gradle
M buildSrc/src/main/kotlin/androidx/build/LibraryVersions.kt
M jetifier/jetifier/core/src/main/kotlin/com/android/tools/build/jetifier/core/PackageMap.kt
M jetifier/jetifier/core/src/main/kotlin/com/android/tools/build/jetifier/core/config/Config.kt
M jetifier/jetifier/core/src/main/kotlin/com/android/tools/build/jetifier/core/pom/DependencyVersions.kt
M jetifier/jetifier/core/src/main/resources/default.config
M jetifier/jetifier/core/src/main/resources/default.generated.config
M jetifier/jetifier/core/src/test/kotlin/com/android/tools/build/jetifier/core/config/ConfigParserTest.kt
M jetifier/jetifier/processor/src/main/kotlin/com/android/tools/build/jetifier/processor/Processor.kt
M jetifier/jetifier/processor/src/main/kotlin/com/android/tools/build/jetifier/processor/transform/bytecode/asm/CustomRemapper.kt
M jetifier/jetifier/processor/src/test/kotlin/com/android/tools/build/jetifier/processor/transform/bytecode/ClassRewriteTest.kt
A jetifier/jetifier/processor/src/test/kotlin/com/android/tools/build/jetifier/processor/transform/bytecode/asm/CustomRemapperTest.kt
A jetifier/jetifier/processor/src/test/resources/classRewriteTest/RxSnackbarKt-expected-decompiled.txt
A jetifier/jetifier/processor/src/test/resources/classRewriteTest/RxSnackbarKt.class
M jetifier/jetifier/standalone/src/main/kotlin/com/android/tools/build/jetifier/standalone/Main.kt
https://android-review.googlesource.com/766942
https://goto.google.com/android-sha1/45c87246333e817ca130661539e16e6bf16ba7b9
Branch: androidx-master-dev
commit 45c87246333e817ca130661539e16e6bf16ba7b9
Author: Filip Pavlis <pavlis@google.com>
Date: Tue Sep 25 13:20:50 2018
Improvements and bug fixes in Jetifier.
** This CL was moved from beta branch. **
PackageMap
- rules are now part of the config file which makes it more intuitive
for editing and also enables to control packages via config file which
is better for standalone jetifier and custom modifications.
Versions
- Removes dual entries of version sets
Dagger reference
- Removes dagger reference from dependencies map so dagger will no
longer be rewritten.
Crash when rewritting const. pool
- Apparently constants pool can also contain entries separates with '.'
as packages and also arrays. Jetifier did not expect such input and
crashed on one specific dependency. This is now improved.
Tests
- Adds a new test running on RxSnackbarKt that compares against expected
file to prevent possible regressions.
Test: Added
Bug:
Bug:
Change-Id: Id49cf978c69fd86cf149febfc2bcfa899f5f80b6
M buildSrc/jetify.gradle
M buildSrc/src/main/kotlin/androidx/build/LibraryVersions.kt
M jetifier/jetifier/core/src/main/kotlin/com/android/tools/build/jetifier/core/PackageMap.kt
M jetifier/jetifier/core/src/main/kotlin/com/android/tools/build/jetifier/core/config/Config.kt
M jetifier/jetifier/core/src/main/kotlin/com/android/tools/build/jetifier/core/pom/DependencyVersions.kt
M jetifier/jetifier/core/src/main/resources/default.config
M jetifier/jetifier/core/src/main/resources/default.generated.config
M jetifier/jetifier/core/src/test/kotlin/com/android/tools/build/jetifier/core/config/ConfigParserTest.kt
M jetifier/jetifier/processor/src/main/kotlin/com/android/tools/build/jetifier/processor/Processor.kt
M jetifier/jetifier/processor/src/main/kotlin/com/android/tools/build/jetifier/processor/transform/bytecode/asm/CustomRemapper.kt
M jetifier/jetifier/processor/src/test/kotlin/com/android/tools/build/jetifier/processor/transform/bytecode/ClassRewriteTest.kt
A jetifier/jetifier/processor/src/test/kotlin/com/android/tools/build/jetifier/processor/transform/bytecode/asm/CustomRemapperTest.kt
A jetifier/jetifier/processor/src/test/resources/classRewriteTest/RxSnackbarKt-expected-decompiled.txt
A jetifier/jetifier/processor/src/test/resources/classRewriteTest/RxSnackbarKt.class
M jetifier/jetifier/standalone/src/main/kotlin/com/android/tools/build/jetifier/standalone/Main.kt
ti...@gmail.com <ti...@gmail.com> #8
So this was reported in AS 3.2 RC2/RC3. I just installed the released version of AS 3.2 and am still getting this error. How do we get the fixed version?
nk...@gmail.com <nk...@gmail.com> #9
I am still waiting for the fix. No workaround yet.
pa...@google.com <pa...@google.com> #10
This is now fixed in Jetifier beta01 and will be available in future version of AGP.
In the meantime you can work-around this issue by adding this to your gradle script:
buildscript {
dependencies {
classpath 'com.android.tools.build.jetifier:jetifier-processor:1.0.0-beta01'
}
}
In the meantime you can work-around this issue by adding this to your gradle script:
buildscript {
dependencies {
classpath 'com.android.tools.build.jetifier:jetifier-processor:1.0.0-beta01'
}
}
nk...@gmail.com <nk...@gmail.com> #11
Thank you!
pa...@google.com <pa...@google.com> #12
Sorry jetifier beta01 was not binary compatible with alpha10.
Please try:
buildscript {
dependencies {
classpath 'com.android.tools.build.jetifier:jetifier-processor:1.0.0-beta02'
}
}
Please try:
buildscript {
dependencies {
classpath 'com.android.tools.build.jetifier:jetifier-processor:1.0.0-beta02'
}
}
[Deleted User] <[Deleted User]> #13
Just FYI this workaround only works if DataBinding is not enabled. Simply adding the following in the app's build.gradle will throw an exception:
android {
dataBinding {
enabled true
}
}
Exception:
Execution failed for task ':app:kaptGenerateStubsDebugKotlin'.
> Could not resolve all files for configuration ':app:kapt'.
> Failed to transform file 'jetifier-core-1.0.0-alpha10.jar' to match attributes {artifactType=processed-jar} using transform JetifyTransform
> Failed to transform '/Users/nkotula/.gradle/caches/modules-2/files-2.1/com.android.tools.build.jetifier/jetifier-core/1.0.0-alpha10/9eb7027c383061de12f93aae7a22cbeb97832d2a/jetifier-core-1.0.0-alpha10.jar' using Jetifier. Reason: The given artifact contains a string literal with a package reference 'android/support/v4' that cannot be safely rewritten. Libraries using reflection such as annotation processors need to be updated manually to add support for androidx.. (Run with --stacktrace for more details.) To disable Jetifier, set android.enableJetifier=false in your gradle.properties file.
Steps to reproduce:
1. Start new Android project with all the default settings (include Kotlin support)
2. Add the workaround from above into the top-level build.gradle file.
3. Sync & Rebuild the project to confirm it is working.
4. Enable DataBinding as described above. Rebuilding will now fail with this exception.
It looks like it's trying to Jetify the older version of the Jetifier which is strange. I've tried clearing out Gradle cache both in my home directory and in the project directory, invalidating Android Studio cache, and manually wiping out any build artifacts before a rebuild, and none of that worked.
This issue is also present on both the stable and latest canary channels of Android Studio.
My environment (stable channel):
Android Studio 3.2.1
Build #AI-181.5540.7.32.5056338, built on October 8, 2018
JRE: 1.8.0_152-release-1136-b06 x86_64
JVM: OpenJDK 64-Bit Server VM by JetBrains s.r.o
macOS 10.14
My environment (canary channel):
Android Studio 3.3 Beta 2
Build #AI-182.4892.20.33.5078385, built on October 18, 2018
JRE: 1.8.0_152-release-1248-b01 x86_64
JVM: OpenJDK 64-Bit Server VM by JetBrains s.r.o
macOS 10.14
android {
dataBinding {
enabled true
}
}
Exception:
Execution failed for task ':app:kaptGenerateStubsDebugKotlin'.
> Could not resolve all files for configuration ':app:kapt'.
> Failed to transform file 'jetifier-core-1.0.0-alpha10.jar' to match attributes {artifactType=processed-jar} using transform JetifyTransform
> Failed to transform '/Users/nkotula/.gradle/caches/modules-2/files-2.1/com.android.tools.build.jetifier/jetifier-core/1.0.0-alpha10/9eb7027c383061de12f93aae7a22cbeb97832d2a/jetifier-core-1.0.0-alpha10.jar' using Jetifier. Reason: The given artifact contains a string literal with a package reference 'android/support/v4' that cannot be safely rewritten. Libraries using reflection such as annotation processors need to be updated manually to add support for androidx.. (Run with --stacktrace for more details.) To disable Jetifier, set android.enableJetifier=false in your gradle.properties file.
Steps to reproduce:
1. Start new Android project with all the default settings (include Kotlin support)
2. Add the workaround from above into the top-level build.gradle file.
3. Sync & Rebuild the project to confirm it is working.
4. Enable DataBinding as described above. Rebuilding will now fail with this exception.
It looks like it's trying to Jetify the older version of the Jetifier which is strange. I've tried clearing out Gradle cache both in my home directory and in the project directory, invalidating Android Studio cache, and manually wiping out any build artifacts before a rebuild, and none of that worked.
This issue is also present on both the stable and latest canary channels of Android Studio.
My environment (stable channel):
Android Studio 3.2.1
Build #AI-181.5540.7.32.5056338, built on October 8, 2018
JRE: 1.8.0_152-release-1136-b06 x86_64
JVM: OpenJDK 64-Bit Server VM by JetBrains s.r.o
macOS 10.14
My environment (canary channel):
Android Studio 3.3 Beta 2
Build #AI-182.4892.20.33.5078385, built on October 18, 2018
JRE: 1.8.0_152-release-1248-b01 x86_64
JVM: OpenJDK 64-Bit Server VM by JetBrains s.r.o
macOS 10.14
nk...@gmail.com <nk...@gmail.com> #14
Hi @pa...@google.com , Can you look into the above issue. It seem to be blocker at the moment for us too.
hu...@google.com <hu...@google.com> #15
The original issue will be fixed in AGP 3.3.0-beta03 and 3.4.0-alpha03 (released on Nov 7).
@13: I've filed Issue 119135578 , please follow the progress there.
If you still run into issues other than 119135578, please let us know. Thanks!
@13: I've filed
If you still run into issues other than 119135578, please let us know. Thanks!
Description
ERROR: [TAG] Failed to resolve variable '${animal.sniffer.version}'
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':app:kaptGenerateStubsDebugKotlin'.
> Could not resolve all files for configuration ':app:kapt'.
> Failed to transform file 'org.eclipse.jdt.core-3.10.0.jar' to match attributes {artifactType=processed-jar} using transform JetifyTransform
> Failed to transform '/Users/nicklas/.gradle/caches/modules-2/files-2.1/org.eclipse.jdt/org.eclipse.jdt.core/3.10.0/647e19b28c106a63a14401c0f5956289792adf2f/org.eclipse.jdt.core-3.10.0.jar' using Jetifier. Reason: The type does not support '.' as package separator! Received 'java.lang.Object;Ljava.lang.Class'.. (Run with --stacktrace for more details.) To disable Jetifier, set android.enableJetifier=false in your gradle.properties file.
I am getting the above error when migrated to androidX with com.android.tools.build:gradle:3.2.0-rc02.
To reproduce the issue please build the app under
Please use the command line
./gradleW aDebug