簡體   English   中英

反應本機任務:應用程序:安裝調試失敗

[英]React Native Task :app:installDebug FAILED

我正在嘗試使用本機反應創建一個新應用程序。 我正在使用 android 工作室模擬器,現在我安裝了 genymotion。 無論何時啟動應用程序,我都遇到了錯誤。 反應原生版本是0.69.4

> Task :app:installDebug FAILED
Skipping device 'Custom - 4.4.4' for 'app:debug': minSdkVersion [21] > deviceApiLevel [19]

Deprecated Gradle features were used in this build, making it incompatible with Gradle 8.0.

You can use '--warning-mode all' to show the individual deprecation warnings and determine if they come from your own scripts or plugins.

See https://docs.gradle.org/7.3.3/userguide/command_line_interface.html#sec:command_line_warnings
147 actionable tasks: 2 executed, 145 up-to-date

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':app:installDebug'.
> java.util.concurrent.ExecutionException: org.gradle.api.GradleException: Failed to install on any devices.

* 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

BU?LD FAILED in 31s

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

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':app:installDebug'.
> java.util.concurrent.ExecutionException: org.gradle.api.GradleException: Failed to install on any devices.

* 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

BU?LD FAILED in 31s

    at makeError (C:\Users\Egehan Berker\Desktop\poemtra\poemtra\node_modules\@react-native-community\cli-platform-android\node_modules\execa\index.js:174:9)
    at C:\Users\Egehan Berker\Desktop\poemtra\poemtra\node_modules\@react-native-community\cli-platform-android\node_modules\execa\index.js:278:16
    at processTicksAndRejections (node:internal/process/task_queues:96:5)
    at async runOnAllDevices (C:\Users\Egehan Berker\Desktop\poemtra\poemtra\node_modules\@react-native-community\cli-platform-android\build\commands\runAndroid\runOnAllDevices.js:109:5)
    at async Command.handleAction (C:\Users\Egehan Berker\Desktop\poemtra\poemtra\node_modules\@react-native-community\cli\build\index.js:192:9)

最小 sdk 版本為21compileSdkVersion31 我應該怎么辦?

您的應用程序的 minSdkVersion 是 API 級別 21 ( Android 5.0 )。 它導致了錯誤,因為您嘗試在 API 級別 19 (Andriod 4.4.4) 的設備上安裝應用程序

您可以嘗試在android/build.gradle您的 minSdkVersion 降低到 API 級別 19 (Android 4.4.4) 或在模擬器 Android > 5.0 上安裝您的應用程序。

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM