react-native遇到过的错误

时间:2020-12-28 20:11:55

记录下使用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
create…android/app/build/intermediates/debug/mergin

g:不理他 ;

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