Today I was not able to compile my application. This is the error that I obtain if I try to Rebuild my project.
java.lang.NullPointerException: Cannot invoke "String.length()" because "<parameter1>" is null
Execution failed for task ':app:dexBuilderDebug'.
Could not resolve all files for configuration ':app:detachedConfiguration18'.
Failed to transform jetified-appcompat-resources-1.7.0-beta01-runtime.jar to match attributes {artifactType=ext-dex-dexBuilderDebug, org.gradle.libraryelements=jar, org.gradle.usage=java-runtime}.
Execution failed for DexingExternalLibArtifactTransform: C:\Users\John Doe\.gradle\caches\transforms-3\a17cb0bdbb9802eb5b30084992aad901\transformed\jetified-appcompat-resources-1.7.0-beta01-runtime.jar.
Error while dexing.
Failed to transform appcompat-1.7.0-beta01-runtime.jar to match attributes {artifactType=ext-dex-dexBuilderDebug, org.gradle.libraryelements=jar, org.gradle.usage=java-runtime}.
Execution failed for DexingExternalLibArtifactTransform: C:\Users\John Doe\.gradle\caches\transforms-3\cb6538e8f72401bf3ec35fdf09737324\transformed\appcompat-1.7.0-beta01-runtime.jar.
Error while dexing.



Any ideas on what could be wrong?
I added following code in app build.gradle after reviewing error details. Details were as following
Could not resolve all files for configuration ':app:stagingDebugRuntimeClasspath'. > Failed to transform core-1.14.0-alpha01.aar (androidx.core:core:1.14.0-alpha01) to match attributes.
Possible Fix:
configurations.all {
resolutionStrategy {
force("androidx.core:core-ktx:1.9.0")
}
}
No. No. No.
Only the new versions of Android Studio with a service pack magically correct these moronic, incomprehensible errors!
No need to build a garden - adding even more garbage to the project!
Only new versions of Android Studio miraculously fix such errors!
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With