React-Native笔记--INSTALL_FAILED_VERSION_DOWNGRADE

 

Failed to install the app. Make sure you have the Android development environment set up: https://facebook.github.io/react-native/docs/getting-started.html#android-development-environment. Run CLI with --verbose flag for more details.
Error: Command failed: gradlew.bat app:installDebug -PreactNativeDevServerPort=8081
Note: D:\RNWorkSpace\12\xx\node_modules\react-native-device-info\android\src\main\java\com\learnium\RNDeviceInfo\RNDeviceModule.java uses or overrides a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
Note: D:\RNWorkSpace\12\xx\node_modules\react-native-video\android\src\main\java\com\android\vending\expansion\zipfile\APEZProvider.java uses or overrides a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
Note: D:\RNWorkSpace\12\xx\node_modules\react-native-video\android\src\main\java\com\brentvatne\react\ReactVideoViewManager.java uses unchecked or unsafe operations.
Note: Recompile with -Xlint:unchecked for details.
Note: D:\RNWorkSpace\12\xx\node_modules\rn-fetch-blob\android\src\main\java\com\RNFetchBlob\RNFetchBlobUtils.java uses or overrides a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
Note: D:\RNWorkSpace\12\xx\node_modules\react-native-webview\android\src\main\java\com\reactnativecommunity\webview\RNCWebViewManager.java uses or overrides a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
Note: D:\RNWorkSpace\12\xx\node_modules\react-native-webview\android\src\main\java\com\reactnativecommunity\webview\RNCWebViewManager.java uses unchecked or unsafe operations.
Note: Recompile with -Xlint:unchecked for details.
Note: Some input files use or override a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
Note: Some input files use unchecked or unsafe operations.
Note: Recompile with -Xlint:unchecked for details.
Note: Recompile with -Xlint:unchecked for details.
D:\RNWorkSpace\12\xxx\BuildConfig.java:6: error: duplicate class: xxx.xx.xxx.BuildConfig
public final class BuildConfig {
             ^
Note: Some input files use or override a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
Note: Some input files use unchecked or unsafe operations.
Note: Recompile with -Xlint:unchecked for details.
com.android.builder.testing.api.DeviceException: com.android.ddmlib.InstallException: INSTALL_FAILED_VERSION_DOWNGRADE

出现这种异常的原因,1 可能即将安装的apk在设备上已经存在,2 可能apk之间版本的差异,解决办法,将设备上的apk卸载,通过 gradlew clean后,重新 运行RN项目。

你可能感兴趣的:(前端学习)