Could not find transform-api.jar (com.android.tools.build:transform-api:2.0.0-deprecated-use-gradle-api)

Viewed 1533

I get this error When I run my app in android studio 3.2.1:

Could not find transform-api.jar 
(com.android.tools.build:transform-api:2.0.0-deprecated-use-gradle-api).

Questions:

  1. What is the transform-api.jar?
  2. How do I use the transform-api.jar in my app?
  3. Should i update my android studio? I updated all of the sdk.

All messages in the build:

Could not find transform-api.jar (com.android.tools.build:transform-api:2.0.0-deprecated-use-gradle-api).
Searched in the following locations:
    https://dl.google.com/dl/android/maven2/com/android/tools/build/transform-api/2.0.0-deprecated-use-gradle-api/transform-api-2.0.0-deprecated-use-gradle-api.jar
2 Answers

in my case, i solved with add google maven to build.gradle like this:

repositories {
        maven { url "https://jitpack.io" }
        mavenCentral()
        google()
        jcenter()
    }

and after that, if you receive "lifecycle runtime" error add this dependencies :

implementation 'androidx.lifecycle:lifecycle-extensions:2.2.0'

I solved this with a trick. open settings.gradle and disable -> include ':app' Then select from File -> Sync Project With Gradle File and re-enable the line -> include ':app' I hope this helps

Related