记录实习期间react-native项目的错误,实习期间一直没空写博客~~~现在把笔记上还记着的一些错误发出来
1.development return response error 500
:引用文件组件等的路径错误,找不到
2.cannot excute importjavascriptexception
:写错变量名称等
3.导入图片资源时,需要重新打包
4.Application has not been registered the error often happens when you're running a wrong folder
:运行react-native run-native的目录和npm start的目录不一样导致
5.can't find \node_modules\react-native\local-cli\cli.js
:npm install
安装丢失模块
6.outDexFolder must be a folder
:忽略
7.Failed to <br/>create...android/app/build/intermediates/debug/mergin
:忽略
8.更新state后,使用state的值,提示null
:重新刷新应用
9.The SDK Build Tools revision (23.0.1) is too low for project ':react-native-vector-icons'. Minimum
:更改react-native-vector-icons 的android/app/build.gradle 的buildToolsVersion为 “25.0.0”
10.error while updating property 'src' of a view managed by:RCTImageView
: Image组件的图片源得不到或者格式有误
11.UnableToResolveerror undefined
:npm安装新的模块后,需要重新react-native start
12.Execution failed for task ':app:compileDebugJavaWithJavac'. \> Compilation failed; see the compiler error output for details.
:
更改了java代码没法编译,使用AS打开项目进行安装即可
13.Could not find property'JIMU_RELEASE_STORE_FILE' on SigningConfig_Decorated{name=release, storeFile=null,storePassword=null, keyAlias=null, keyPassword=null , storeType=null}.
:
删除掉android/app/build.gradle
里的:
storeFile file(MYAPP_RELEASE_STORE_FILE)
storePassword MYAPP_RELEASE_STORE_PASSWORD
keyAlias MYAPP_RELEASE_KEY_ALIAS
keyPassword MYAPP_RELEASE_KEY_PASSWORD