I am running my application on Android with React-Native and its appear the next error :
"build file 'C:\Users........\android\app\build.gradle': 3: unable to resolve class com.android.build.OutputFile"
I ve tried with Android Studio and GenyMotion but the problem is the same.
Anybody has an idea of what happen ?
Thanks !!
Make sure in the section:
buildscript { dependencies { ... } }
From file:
android / build.gradle
Has the line:
classpath("com.android.tools.build:gradle:3.4.2")
I got a similar error
FAILURE: Build failed with an exception.
* Where:
Build file '/Users/mick/Codes/git/projects/alerto-balita/AlertoBalitaApp/android/app/build.gradle' line: 3
* What went wrong:
Could not compile build file '/Users/mick/Codes/git/projects/alerto-balita/AlertoBalitaApp/android/app/build.gradle'.
> startup failed:
build file '/Users/mick/Codes/git/projects/alerto-balita/AlertoBalitaApp/android/app/build.gradle': 3: unable to resolve class com.android.build.OutputFile
@ line 3, column 1.
import com.android.build.OutputFile
^
1 error
In my case I accidentally removed classpath 'com.android.tools.build:gradle:2.3.3'
in the project build.gradle
returning it solved the compilation problem
buildscript {
repositories {
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:2.3.3'
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
}
}
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