【发布时间】:2021-10-01 11:22:33
【问题描述】:
我需要帮助才能在我的手机上运行这个 React 本机应用程序。 https://github.com/minhtc/audiobookapp Expo Go 安装在我的安卓手机上。 当我运行以下命令时:
- npm 安装
- npx react-native run-android
这就是我得到的。 你能帮帮我吗?
D:\GIT Hub\audiobookapp>npx react-native run-android
info Running jetifier to migrate libraries to AndroidX. You can disable it using "--no-jetifier" flag.
Jetifier found 960 file(s) to forward-jetify. Using 8 workers...
info JS server already running.
info Installing the app...
Starting a Gradle Daemon, 1 incompatible and 1 stopped Daemons could not be reused, use --status for details
> Task :app:processDebugManifest FAILED
See http://g.co/androidstudio/manifest-merger for more information about the manifest merger.
Deprecated Gradle features were used in this build, making it incompatible with Gradle 7.0.
Use '--warning-mode all' to show the individual deprecation warnings.
See https://docs.gradle.org/6.5/userguide/command_line_interface.html#sec:command_line_warnings
51 actionable tasks: 3 executed, 48 up-to-date
D:\GIT Hub\audiobookapp\android\app\src\debug\AndroidManifest.xml Error:
uses-sdk:minSdkVersion 16 cannot be smaller than version 21 declared in library [com.facebook.react:react-native:0.64.2] C:\Users\olinga\.gradle\caches\transforms-2\files-2.1\766c9672dfddf764e285b6ee68a73930\jetified-react-native-0.64.2\AndroidManifest.xml as the library might be using APIs not available in 16
Suggestion: use a compatible library with a minSdk of at most 16,
or increase this project's minSdk version to at least 21,
or use tools:overrideLibrary="com.facebook.react" to force usage (may lead to runtime failures)
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':app:processDebugManifest'.
> Manifest merger failed : uses-sdk:minSdkVersion 16 cannot be smaller than version 21 declared in library [com.facebook.react:react-native:0.64.2] C:\Users\olinga\.gradle\caches\transforms-2\files-2.1\766c9672dfddf764e285b6ee68a73930\jetified-react-native-0.64.2\AndroidManifest.xml as the library might be using APIs not available in 16
Suggestion: use a compatible library with a minSdk of at most 16,
or increase this project's minSdk version to at least 21,
or use tools:overrideLibrary="com.facebook.react" to force usage (may lead to runtime failures)
* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.
* Get more help at https://help.gradle.org
BUILD FAILED in 1m 37s
error Failed to install the app. Make sure you have the Android development environment set up: https://reactnative.dev/docs/environment-setup.
Error: Command failed: gradlew.bat app:installDebug -PreactNativeDevServerPort=8081
D:\GIT Hub\audiobookapp\android\app\src\debug\AndroidManifest.xml Error:
uses-sdk:minSdkVersion 16 cannot be smaller than version 21 declared in library [com.facebook.react:react-native:0.64.2] C:\Users\olinga\.gradle\caches\transforms-2\files-2.1\766c9672dfddf764e285b6ee68a73930\jetified-react-native-0.64.2\AndroidManifest.xml as the library might be using APIs not available in 16
Suggestion: use a compatible library with a minSdk of at most 16,
or increase this project's minSdk version to at least 21,
or use tools:overrideLibrary="com.facebook.react" to force usage (may lead to runtime failures)
FAILURE: Build failed with an exception.
【问题讨论】:
标签: android reactjs react-native native