question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

App Crashing when running it 'Could not find method compile()'

See original GitHub issue

Hello,

I have a React Native App where I just installed react-native-video, I followed the steps and added compile project(':react-native-video') implementation "androidx.appcompat:appcompat:1.0.0" to the android/app/build.gradle file inside dependencies, when I do npx react-native run-android it crashes and throws this error: `A problem occurred evaluating project ‘:app’.

Could not find method compile() for arguments [project ‘:react-native-video’] on object of type org.gradle.api.internal.artifacts.dsl.dependencies.DefaultDependencyHandler. `

The two lines I showed are located inside the build.gradle file (android/app/build.gradle) and are at the very end of dependencies {}

Help with this would be very much appreciated, thanks! 🙌

Issue Analytics

  • State:closed
  • Created a year ago
  • Comments:7 (1 by maintainers)

github_iconTop GitHub Comments

7reactions
song2parkcommented, Aug 23, 2022

compile has been deprecated since gradel 7.0. try ‘implementation’ instead of ‘compile’.

0reactions
song2parkcommented, Aug 23, 2022

Plus, if you have an error that failed to resolve scalablevideoview after that above, add jcenter() in allprojects/repositories in android/build.gradle. refer to this

Read more comments on GitHub >

github_iconTop Results From Across the Web

Could not find method compile() for arguments [com.android ...
I recently upgraded my Android Support Repository and it worked after the upgrade. My Android Support Repository is version 41. Error Log: 2017- ......
Read more >
[SOLVED] [1.14.4] build.gradle "Could not find method ...
Hi. Whenever I try and add a mod to the source the build instantly crashes. ... dependencies { classpath group: 'net.minecraftforge.gradle', ...
Read more >
Known issues with Android Studio and Android Gradle Plugin
To fix the issue for all future projects, click File > Close Project. You should see the welcome screen. Then click Configure >...
Read more >
Could not find method buildFeatures() for arguments [] on ...
[Solved]-Could not find method buildFeatures() for arguments [] on object of type com.android.build.gradle.LibraryExtension-kotlin.
Read more >
Could not find method compile() for arguments [com.android ...
In my android studio build gradle is failed i dont know how so then i check the log and i saw this error...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found