[email protected]:~/Desktop/sxtbdemo2$ react-native run-android
Scanning folders for symlinks in /Users/apple/Desktop/sxtbdemo2/node_modules (8ms)
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 root project 'sxtbdemo2'.
Could not resolve all files for configuration ':classpath'.
Could not find com.android.tools.build:gradle:3.0.1.
Searched in the following locations:
https://jcenter.bintray.com/com/android/tools/build/gradle/3.0.1/gradle-3.0.1.pom
https://jcenter.bintray.com/com/android/tools/build/gradle/3.0.1/gradle-3.0.1.jar
Required by:
project :
Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.
Get more help at https://help.gradle.org
BUILD FAILED in 12s
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
26
A
答えて
75
これは通常、あなたのレポジトリに問題があります。それが動作するはずです)(あなたがグーグルを追加するときに
buildscript {
repositories {
mavenLocal()
google()
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:3.0.1'
}
}
:私のために
はこのようにbuild.gradleを修正するために働きました。
15
buildscript {
repositories {
jcenter()
google()
mavenCentral()
}
dependencies {
classpath 'com.android.tools.build:gradle:3.0.1'
}
}
buildscript()
と同期プロジェクト内google()
を追加します。
参考:https://developer.android.com/studio/build/gradle-plugin-3-0-0-migration.html#apply_plugin
+1
私の一日を節約するために@ ketan Ramaniありがとう... –
関連する問題
- 1. Reactnative Issue
- 2. ユニットテストReactNative with Jest
- 3. ReactNative ScrollViewビュー内
- 4. ReactNative with reCATPCHA
- 5. ReactNative Set EXPO_DEBUG
- 6. ReactNative:適切
- 7. TouchableXXXアプリがreactnative
- 8. ReactNative:画像
- 9. ReactNative iOS Spotify SDK
- 10. ReactNative - SSLExceptionビルドムービー例
- 11. Reactnative $ JAVA_HOMEパスエラー
- 12. ReactNativeとNativeBase Radio
- 13. ReactNative drawer:blank screen
- 14. NativeBase - ReactNative - Dropdown
- 15. ReactNative - IOSクラッシュ - シンボルクラッシュレポート -
- 16. ReactNative - Googleの音声
- 17. Androidパッケージサーバー上のReactNative
- 18. ReactNative本物のネイティブナビゲーション
- 19. Webview not loading poupup - ReactNative
- 20. MapView airbnb ReactNative no visual
- 21. ReactNativeコンポーネントへのリダイレクト
- 22. ReactNative ListView with Json Api
- 23. DrawerNavigatorをカスタマイズする - ReactNative
- 24. ReactNative - エラー:産卵cmd.exeのENOENT
- 25. ReactNative:カスタムコンポーネントのrefとonLayout
- 26. ReactNativeの取得FacebookSDKの作業
- 27. ハイブリッドモバイルアプリケーション:Phonegap/cordovaとReactNativeの違いは?
- 28. reactnativeのUUIDの作成方法
- 29. Reactnative Fetching JSバンドル提供前のバンドル
- 30. ReactNativeのNativeModules.RNDeviceInfo with Jestを設定する
あなたの質問をフォーマットしてください –
あなたは解決として答えを選択する気でしょうか?ありがとうございました。 –