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.

compileSdkVersion not specified

See original GitHub issue

Bug description:

This error occurred after running ./gradlew clean

Build file '/file/to/project/node_modules/react-native-webview/android/build.gradle' line: 26
    (No message provided)
    > org.gradle.api.internal.file.DefaultSourceDirectorySet.<init>(java.lang.String,org.gradle.api.internal.file.FileResolver,org.gradle.api.internal.file.collections.DirectoryFileTreeFactory)
    
    View exception
    A problem occurred configuring project :react-native-webview.
    compileSdkVersion is not specified.

To Reproduce:

https://github.com/ldco2016/RNapp

Expected behavior:

gradle should clean successfully

Environment:

  • OS:
  • OS version: MacOS 10.14
  • react-native version: 0.60.4
  • react-native-webview version: 5.12.1

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Reactions:15
  • Comments:9

github_iconTop GitHub Comments

5reactions
adifdwimaulanacommented, Jun 6, 2020

@SuhairZain @EhteshamAnwar @rpelorosso

I solved this issue by clearing the cache and re-install react-native-webview. The steps shown as below:

  1. reset cache
  2. npm install react-native-webview --save
  3. edit compileSdkVersion in build.gradle to 29 and buildToolsVersion to “29.0.3”
  4. cd android && gradlew clean && gradlew build
  5. run with react-native run-android
5reactions
SuhairZaincommented, May 27, 2020

@EhteshamAnwar @rpelorosso I got it fixed by upgrading to the latest version (9.4.0). I was on 6.0.2

Read more comments on GitHub >

github_iconTop Results From Across the Web

Gradle sync failed: Cause: compileSdkVersion is not specified
In my case , I fixed it by setting the Android gradle plugin version and gradle version to the latest.
Read more >
compileSdkVersion is not specified. Please add it to build.gradle
Describe the bug I am having build error on the latest ver 12.0.0 * What went wrong: A problem occurred configuring project ......
Read more >
compileSdkVersion is not specified. Please add it to build.gradle
I'm new to the ionic world and working with Capacitor, Android Studio etc. I've been trying to build an android APK for my...
Read more >
react native compilesdkversion is not specified. please add it ...
compileSdkVersion is not specified error in React Native Android ... Add a comment. 1. Go to node_module>@react-native-firebase>messaging>android>build.gradle.
Read more >
Android – Error: Cause: compileSdkVersion is not specified
Android – Error: Cause: compileSdkVersion is not specified. androidandroid-studioimage-processingopencv. I have problem with project in github ...
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