2018.11.08
更新到sdk 31.0.0后启动应用报错:
App.js: Cannot read property ‘filename’ of undefined
解决办法:
修改项目根目录下.babelrc文件(+号为添加此行,-号为删去此行)
{
"presets": ["babel-preset-expo"],
- "env": {
- "development": {
- "plugins": [ "transform-react-jsx-source" ]
- }
- }
}
之前遇到的问题
Android Studio编译配置
- Aapt2相关报错
解决办法:
项目下settings.gradle文件添加一行:
android.enableAapt2=false
gradle sync时会有警告(warning),不影响(提示截止2018将弃用此配置)
2. 一些编译错误
需要在Android Studio设置->Build, Execution, Deployment->Instant Run下,取消勾选Enable Instant Run to hot swap…设置项