We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
unable to load script from assets 'index.android.bundle'.Make sure your bundle ispackged correctly or you are running a packger server.
解决方法: 1.在android\app\src\main下新建assets文件 2.在项目根目录下执行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/ 执行成功会在android\app\src\main\assets下生成如下文件
index.android.bundle
解决方法:
netstat -aon|findstr '8081'
如果有进程占用可以选择杀死进程
taskkill -PID *** -F
如果杀不死,那就换端口吧。。。,前提条件下先保证新的端口是没有被占用的
react-native start --port 8083 react-native run-android
在这个目录下**/node_modules/react-native/react.gradle** file 在doFirst后面手工添加doLast
doFirst { ... } doLast { def moveFunc = { resSuffix -> File originalDir = file("$buildDir/generated/res/react/release/drawable-${resSuffix}"); if (originalDir.exists()) { File destDir = file("$buildDir/../src/main/res/drawable-${resSuffix}"); ant.move(file: originalDir, tofile: destDir); } } moveFunc.curry("ldpi").call() moveFunc.curry("mdpi").call() moveFunc.curry("hdpi").call() moveFunc.curry("xhdpi").call() moveFunc.curry("xxhdpi").call() moveFunc.curry("xxxhdpi").call() }
The text was updated successfully, but these errors were encountered:
No branches or pull requests
1. window上运行时react-native run-android出现
解决方法:
1.在android\app\src\main下新建assets文件
2.在项目根目录下执行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/
执行成功会在android\app\src\main\assets下生成如下文件
2. 403 Forbidden错误
解决方法:
如果有进程占用可以选择杀死进程
如果杀不死,那就换端口吧。。。,前提条件下先保证新的端口是没有被占用的
应该是要保证真机和PC是在统一网段下
3. 打包 Duplicate resources 错误
在这个目录下**/node_modules/react-native/react.gradle** file
在doFirst后面手工添加doLast
The text was updated successfully, but these errors were encountered: