ignite: React Native 0.64.x - unable to resolve class com.android.build.OutputFile

What’s going on?

Could not compile build file ‘XXXXXXXXXXX\android\app\build.gradle’.

startup failed: build file ‘XXXXXXXXXXX\android\app\build.gradle’: 3: unable to resolve class com.android.build.OutputFile @ line 3, column 1. import com.android.build.OutputFile

Steps to reproduce

  1. yarn android

ignite doctor results:

About this issue

  • Original URL
  • State: closed
  • Created 3 years ago
  • Comments: 16

Most upvoted comments

solved :

removed gradle plugin from vscode

I have fixed it by replacing com.android.tools.build:gradle:4.1.0 to com.android.tools.build:gradle:3.5.3

 dependencies {
        classpath("com.android.tools.build:gradle:3.5.3")
 }

I changed it like this. but not working.

where did you change it ? I cannot find com.android.tools.build:gradle:4.1.0

I mean remove the vscode extension for gradle @nrooban

removing gradle plugin from vscode simply do the job, thanks @ysumiit005

HI.

I tried: npx ignite-cli AwesomeApp npx react-native run-android Which worked 👍

Hope this helps.

same problem

changed to 3.5.3 it dont work i checked other projects which were not showing that error on vscode but when i opened that file in other projects , that file also started showing error. its like when you deal with that build,gradle then only it shows error on import line of code.

i was using react native documentation to create apk
https://reactnative.dev/docs/signed-apk-android

before this recently installed vscode gradle plugin which was automatically notified by vscode to me