1.错误:Could not expand/create/delete/read
解决:cd android ./gradlew clean
2. Requiring unknown module "490".If you are sure the module is there, try restarting Metro Bundler. You may also want to run `yarn`, or `npm install` (depending on your environment). unknownModuleError
原因:编译成功跑起来之后,手动在项目目录中增删了一些文件, 解决:gradlew clean一下,重新编译
3. com.android.dex.DexIndexOverflowException: Cannot merge new index 66497 into a non-jumbo instruction!问题
解决:到android/app/build.gradle文件中,增加dexOptions:
android: { ...... dexOptios: { jumboMode true } }4. 打包时,报Multiple dex files define {包名}BuildConfig错误 解决: 同上,到dexOptions中添加如下字段:
dexOptions { preDexLibraries = false }详情:https://stackoverflow.com/questions/25103288/multiple-dex-files-define-my-package-buildconfig-cant-find-the-cause