Android

来源:互联网 发布:黑暗之光魔翼升阶数据 编辑:程序博客网 时间:2024/06/05 02:53

1.安装时 you have not accepted the license agreements of the followiong sdk components

解决办法:

命令中切换到自己项目下:android update sdk --no-ui --all --filter build-tools-23.0.1,android-23,extra-android-m2repository  输入Y即可


2.. React Native(RN)启动不成功,unable to download js bundle错误解决方案

解决办法:摇动手机或者点击menu 选择Dev Settings->Debug server host & port for device->设置Ip为充当服务器PC的IP地址+8081 如:10.23.30.163:8081

3.

解决办法:终端输入 react-native bundle --platform android --dev false --entry-file index.android.js --bundle-output android/app/src/main/assets/index.android.bundle --assets-dest android/app/src/main/res/  

若出现 not find directory

手动在....\MyProject(工程名)\android\app\src\main 下创建assets文件夹 再执行上述命令。

配置中遇到的一些问题 日后开发中遇到问题后 在与大家分享。

0 0