開發運行之時
一、
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:
解決辦法:
react-native項目進入到android目錄後,執行gradle clean命令
打包android的apk時
一、
* What went wrong:
Execution failed for task ':app:bundleReleaseJsAndAssets'.
> Process 'command 'cmd'' finished with non-zero exit value 1
分析原因:
分配的內存太小
解決辦法:
把build.gradle中的
dexOptions {
preDexLibraries = false
javaMaxHeapSize "4g" //這個改大
}