rn 安卓开发报错

1.每次添加新图片打包之前要编译下,否则打包后的apk不显示图片

 react-native bundle --platform android --dev false --entry-file index.js --bundle-output android/app/src/main/assets/index.android.bundle --assets-dest android/app/src/main/res 

2,修改App名字或者App图标

 

三、修改App名字和图标完后编译打包报错,生成新的debug,

0


I use react-native 0.61.5 and android studio 3.6.3, when run app have issue: Task :app:mergeExtDexDebug FAILED 198 actionable tasks: 7 executed, 191 up-to-date java.nio.file.NoSuchFileException: /Users/xxx/Projects/rectnative/xxx/android/app/build/intermediates/external_file_lib_dex_archives/debug/out at sun.nio.fs.UnixException.translateToIOException(UnixException.java:86) at sun.nio.fs.UnixException.rethrowAsIOException(UnixException.java:10

1、进入android/app,删除掉build目录 
2、在根目录,执行react-native run-android
3、把生成的debug版放到模拟器上,就能看到修改后的APP名字还有图标了。

 

Bug:少如下文件自己复制,或者

1 删除app/build下的build文件夹。执行react-native run-android

2 在android文件.gradle夹内部删除文件夹,然后在项目根文件夹上运行以下命令

3 cd android && gradlew clean / ./gradlew assembleRelease  && cd .. && react-native run-android


https://stackoverflow.com/questions/62023371/android-studio-build-failed-debug-out-error

原文地址:https://www.cnblogs.com/lanlanwb/p/14282254.html