react-native android genymotion
mac
下 搭建 react-native android
开发环境
react-native run-android
想知道 run 之后 就会找 genymotion模拟器
吗
$ react-native run-android
JS server already running.
Building and installing the app on the device (cd android && ./gradlew installDebug)...
FAILURE: Build failed with an exception.
* What went wrong:
A problem occurred configuring project ':app'.
> failed to find Build Tools revision 23.0.1
* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.
BUILD FAILED
Total time: 2.478 secs
Could not install the app on the device, read the error above for details.
Make sure you have an Android emulator running or a device connected and have
set up your Android development environment:
https://facebook.github.io/react-native/docs/android-setup.html
安装 Build Tools revision 23.0.1
运行如下
$ react-native run-android
JS server already running.
Building and installing the app on the device (cd android && ./gradlew installDebug...
FAILURE: Build failed with an exception.
* 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/julaud/.m2/repository/com/android/support/appcompat-v7/23.0.1/appcompat-v7-23.0.1.pom
file:/Users/julaud/.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
file:/Users/julaud/www/Frontend/javascript/react/react-native/AwesomeProject/node_modules/react-native/android/com/android/support/appcompat-v7/23.0.1/appcompat-v7-23.0.1.pom
file:/Users/julaud/www/Frontend/javascript/react/react-native/AwesomeProject/node_modules/react-native/android/com/android/support/appcompat-v7/23.0.1/appcompat-v7-23.0.1.jar
Required by:
AwesomeProject:app:unspecified
AwesomeProject:app:unspecified > com.facebook.react:react-native:0.24.1
> Could not find com.android.support:recyclerview-v7:23.0.1.
Searched in the following locations:
file:/Users/julaud/.m2/repository/com/android/support/recyclerview-v7/23.0.1/recyclerview-v7-23.0.1.pom
file:/Users/julaud/.m2/repository/com/android/support/recyclerview-v7/23.0.1/recyclerview-v7-23.0.1.jar
https://jcenter.bintray.com/com/android/support/recyclerview-v7/23.0.1/recyclerview-v7-23.0.1.pom
https://jcenter.bintray.com/com/android/support/recyclerview-v7/23.0.1/recyclerview-v7-23.0.1.jar
file:/Users/julaud/www/Frontend/javascript/react/react-native/AwesomeProject/node_modules/react-native/android/com/android/support/recyclerview-v7/23.0.1/recyclerview-v7-23.0.1.pom
file:/Users/julaud/www/Frontend/javascript/react/react-native/AwesomeProject/node_modules/react-native/android/com/android/support/recyclerview-v7/23.0.1/recyclerview-v7-23.0.1.jar
Required by:
AwesomeProject:app:unspecified > com.facebook.react:react-native:0.24.1
> Could not find com.android.support:support-v4:21.0.3.
Searched in the following locations:
file:/Users/julaud/.m2/repository/com/android/support/support-v4/21.0.3/support-v4-21.0.3.pom
file:/Users/julaud/.m2/repository/com/android/support/support-v4/21.0.3/support-v4-21.0.3.jar
https://jcenter.bintray.com/com/android/support/support-v4/21.0.3/support-v4-21.0.3.pom
https://jcenter.bintray.com/com/android/support/support-v4/21.0.3/support-v4-21.0.3.jar
file:/Users/julaud/www/Frontend/javascript/react/react-native/AwesomeProject/node_modules/react-native/android/com/android/support/support-v4/21.0.3/support-v4-21.0.3.pom
file:/Users/julaud/www/Frontend/javascript/react/react-native/AwesomeProject/node_modules/react-native/android/com/android/support/support-v4/21.0.3/support-v4-21.0.3.jar
Required by:
AwesomeProject:app:unspecified > com.facebook.react:react-native:0.24.1 > com.facebook.fresco:fresco:0.8.1 > com.facebook.fresco:imagepipeline:0.8.1
AwesomeProject:app:unspecified > com.facebook.react:react-native:0.24.1 > com.facebook.fresco:fresco:0.8.1 > com.facebook.fresco:drawee:0.8.1
* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.
BUILD FAILED
Total time: 9.433 secs
Could not install the app on the device, read the error above for details.
Make sure you have an Android emulator running or a device connected and have
set up your Android development environment:
https://facebook.github.io/react-native/docs/android-setup.html
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
1.adb devices看下有没有在线的设备
2.执行react-native start运行打包服务器没?
你这报错不是genymotion的问题,而是Build Tools revision 23.0.1 你没有该版本所致。
另外只要你打开了genymotion模拟器,run之后就会自动寻找该模拟器,并安装。