2

FAILURE: Build failed with an exception.

  • What went wrong: Execution failed for task ':app:preDebugBuild'.

Could not resolve all files for configuration ':app:debugCompileClasspath'. Failed to transform artifact 'activity.aar (androidx.activity:activity:1.6.0-beta01)' to match attributes {artifactType=android-manifest} > Execution failed for JetifyTransform: C:\Users\ADMIN.gradle\caches\modules-2\files-2.1\androidx.activity\activity\1.6.0-beta01\d888a4569f3c67638afc7aa0d778acd7f41cedb5\activity-1.6.0-beta01.aar. > Failed to transform 'C:\Users\ADMIN.gradle\caches\modules-2\files-2.1\androidx.activity\activity\1.6.0-beta01\d888a4569f3c67638afc7aa0d778acd7f41cedb5\activity-1.6.0-beta01.aar' using Jetifier. Reason: null. (Run with --stacktrace for more details.) Failed to transform artifact 'activity.aar (androidx.activity:activity:1.6.0-beta01)' to match attributes {artifactType=android-manifest} > Execution failed for JetifyTransform: C:\Users\ADMIN.gradle\caches\modules-2\files-2.1\androidx.activity\activity\1.6.0-beta01\d888a4569f3c67638afc7aa0d778acd7f41cedb5\activity-1.6.0-beta01.aar. > Failed to transform 'C:\Users\ADMIN.gradle\caches\modules-2\files-2.1\androidx.activity\activity\1.6.0-beta01\d888a4569f3c67638afc7aa0d778acd7f41cedb5\activity-1.6.0-beta01.aar' using Jetifier. Reason: null. (Run with --stacktrace for more details.)

jaroos
  • 41
  • 3

2 Answers2

2

I fixed the problem by upgrading to the latest Gradle and compile version.

In Android/build.gradle Update

ext.kotlin_version = '1.6.0'

dependencies{
        classpath 'com.android.tools.build:gradle:4.2.0'
}

In app/build.gradle

Update

compileSdkVersion 33

In gradle.wrapper.properties, update

distributionUrl=https\://services.gradle.org/distributions/gradle-6.7.1-all.zip
karmelcorn
  • 512
  • 1
  • 5
  • 12
-1

When you get an error like this it's hard to pinpoint what the issue is, but it provides a clue at the end (Run with --stacktrace for more details.)

You can do so using the command below or several different ways explained here

./gradlew assembleMyBuild --stacktrace

Give it a try and post the actual error that's preventing the build.

David Aleksanyan
  • 2,953
  • 4
  • 29
  • 39
  • could you argument what isn't an answer in my post, according to this link, this qualifies as an answer https://meta.stackoverflow.com/questions/297066/meta-meta-stack-overflow-when-should-i-answer-or-comment – David Aleksanyan Sep 05 '22 at 10:39
  • 1
    deleted my comment. thank you for your input to me. @david-a – Fran Na Jaya Sep 05 '22 at 10:42