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_profile
file. 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.
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
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With