Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

React-native Awesome project not building android project

Tags:

I am trying to learn react-native but am not able to build the demo AwesomeProject. I have set the $ANDROID_HOME variable in ~/.bash_profilefile. But every time I build it I get following error.

What went wrong:

 A problem occurred configuring project ':app'.  Could not resolve all dependencies for configuration ':app:_debugCompile'.  Could not find com.android.support:appcompat-v7:23.0.1.  Searched in the following locations:      file:/Users/<username>/.m2/repository/com/android/support/appcompat-v7/23.0.1/appcompat-v7-23.0.1.pom      file:/Users/<username>/.m2/repository/com/android/support/appcompat-v7/23.0.1/appcompat-v7-23.0.1.jar      https://jcenter.bintray.com/com/android/support/appcompat-v7/23.0.1/appcompat-v7-23.0.1.pom      https://jcenter.bintray.com/com/android/support/appcompat-v7/23.0.1/appcompat-v7-23.0.1.jar  Required by:      AwesomeProject:app:unspecified  Could not find com.android.support:appcompat-v7:23.0.1.  Searched in the following locations:      file:/Users/<username>/.m2/repository/com/android/support/appcompat-v7/23.0.1/appcompat-v7-23.0.1.pom      file:/Users/<username>/.m2/repository/com/android/support/appcompat-v7/23.0.1/appcompat-v7-23.0.1.jar      https link     Required by:      AwesomeProject:app:unspecified > com.facebook.react:react-native:0.11.0  Could not find com.android.support:support-v4:21.0.3.  Searched in the following locations:      file:/Users/<username>/.m2/repository/com/android/support/support-v4/21.0.3/support-v4-21.0.3.pom      file:/Users/<username>/.m2/repository/com/android/support/support-v4/21.0.3/support-v4-21.0.3.jar      https link  Required by:      AwesomeProject:app:unspecified > com.facebook.react:react-native:0.11.0 > com.facebook.fresco:fresco:0.6.1 > com.facebook.fresco:drawee:0.6.1      AwesomeProject:app:unspecified > com.facebook.react:react-native:0.11.0 > com.facebook.fresco:fresco:0.6.1 > com.facebook.fresco:imagepipeline:0.6.1 

I don't know why it's looking in this folder file:

/Users/<username>/.m2/repository/com/android/support/appcompat-v7/23.0.1 

Installed sdk version is 23.0.1 still I am getting this error.

I have a dotnet background trying to learn react-native.

like image 857
gaurav thakur Avatar asked Oct 08 '15 18:10

gaurav thakur


1 Answers

Finally got it. You have to install Android Support Repository in Extras, in the Android SDK manager

Open the SDK, scroll down to the last part, open the extras, select android support repository, and click on "install packages" here is a screenshot

android sdk manager installing android support repository

like image 59
gaurav thakur Avatar answered Oct 25 '22 15:10

gaurav thakur