2016-03-15 48 views
0

注意:我實際上剛剛解決了這個問題,因此我在這裏發佈我的解決方案,因爲這是一個模糊的錯誤消息,需要一些時間來解決。希望我能幫助另一個人!如何使用Linux上的ReactNative中的gradle解決此錯誤?

> react-native run-android Starting JS server... Building and installing the app on the device (cd android && ./gradlew installDebug)... 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

環顧四周網上,我看到類似的錯誤消息,但更詳細和以其他方式解決。我的解決方案非常簡單,它在下面的答案中!

回答

1

只是讓./android/gradlew一個可執行文件。 (chmod +x android/gradlew

您可以測試它的工作與cd android && ./gradlew

這是eventualy通過只是想./gradlew和獲得它需要可執行的更能說明問題的錯誤信息解決。

祝好運,您的項目的其餘部分,如果你偶然發現這個錯誤!

0

您是否連接了實際設備或仿真器?如果您沒有參考GenyMotion的設置(https://www.genymotion.com/download/),並且一旦完成創建一個模擬器。這應該可以解決你的問題。如果您仍然遇到問題,請告知我