我試着通過我的React Project運行react-native run-android。之後,我得到了如下錯誤。在cmd中when react-native run-android error
顯示錯誤
C:\Users\ekkawit\Desktop\ReactNative\myapp>react-native run-android Scanning 557 folders for symlinks in C:\Users\ekkawit\Desktop\ReactNative\myapp\node_modules (15ms) Starting JS server... Building and installing the app on the device (cd android && gradlew.bat installDebug)... Error occurred during initialization of VM java/lang/NoClassDefFoundError: java/lang/Object 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
我安裝了Android SDK和Android的設置家庭和路徑環境變量成功。但我仍然遇到同樣的錯誤。
我還在我的電腦上安裝了用於創建虛擬android設備的Gennymotion。