Reputation: 1473
I'm trying to build native code in my react native project named AwesomeProject on Mac OS X El Capitan. Things work fine till react-native init.
Upon doing react-native run-android on the terminal, I get this error -
* What went wrong:
A problem occurred configuring root project 'AwesomeProject'. >
Could not resolve all dependencies
for configuration ':classpath'. >
Could not resolve com.android.tools.build: transform - api: 2.0 .0 - deprecated - use - gradle - api.
Required by:
: AwesomeProject: unspecified > com.android.tools.build: gradle: 2.2 .3 > com.android.tools.build: gradle - core: 2.2 .3 >
Could not resolve com.android.tools.build: transform - api: 2.0 .0 - deprecated - use - gradle - api. >
Could not get resource 'https://jcenter.bintray.com/com/android/tools/build/transform-api/2.0.0-deprecated-use-gradle-api/transform-api-2.0.0-deprecated-use-gradle-api.pom'. >
org.apache.http.ssl.SSLInitializationException: /Library/Java / JavaVirtualMachines / 1.6 .0.jdk / Contents / Home / lib / security / cacerts(No such file or directory) >
Do I need to install anything else ? Has anyone found this issue ? If I try to use gradle:2.2.3 on Android Studio to make a native Android app, it works fine.
Upvotes: 0
Views: 201
Reputation: 1473
It looks like Using JDK 6 was the issue. I have now installed Java SE Development Kit 8 and it works fine. React native needs JDK 8 or more.
Upvotes: 2