- 错误描述:
error Failed to install the app. Make sure you have the Android development environment set up: https://reactnative.dev/docs/environment-setup. Run CLI with --verbose flag for more details.
Error: spawn EACCES
at _errnoException (util.js:992:11)
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
解决办法:
cd android && chmod -R 777 ./gradlew && cd ..
-
错误描述
Native module RNSVGSvgViewManager tried to override SvgViewModule. Check the getPackages() method in MainApplication.java, it might be that module is being created twice. if the was your intention, set canOverrideExistingModule=ture
解决办法:
去掉getPackages中的add添加
-
问题描述
Execution failed for task ':app:multiDexListRelease'.
A failure occurred while executing com.android.build.gradle.internal.tasks.Workers$ActionFacade
GC overhead limit exceeded
-
错误描述
Execution failed for task ':react-native-orientation:verifyReleaseResources'.
解决办法
由于版本太旧,所以修改对应库的targetSdkVersion版本号,targetSdkVersion版本修改成最新就可以
- 问题描述
安装 react-native-video 后,正常配置后会出现如下报错
Could not find com.yqritc:android-scalablevideoview:1.0.4.
这里其实是因为jCenter不允许更新包,所有其他包应该从mavenCentral获取。因此还需要配置
android/build.gradle文件,allprojects下添加如下配置:
allprojects {
repositories {
.... # rest of your code
jcenter() {
content {
includeModule("com.yqritc", "android-scalablevideoview")
}
}
}
}