开发运行之时
一、
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" //这个改大
}