简体   繁体   English

React-Native 项目卡在:app:installDebug

[英]React-Native project stuck on :app:installDebug

Every time I run my react-native project it's stuck in 99%.每次我运行我的 react-native 项目时,它都卡在 99%。 I've tried to run./Gradlew clean and kill adb but nothing works.我试过运行 ./Gradlew clean 并 kill adb 但没有任何效果。 I already used my device via usb, genymotion and android studio emulator and it always the same...我已经通过 usb、genymotion 和 android 工作室模拟器使用了我的设备,它总是一样的……

Building and installing the app on the device (cd android && gradlew.bat install Debug)... Incremental java compilation is an incubating feature.在设备上构建和安装应用程序 (cd android && gradlew.bat install Debug)...增量 java 编译是一项孵化功能。 :app:preBuild UP-TO-DATE:app:preDebugBuild UP-TO-DATE:app:checkDebugManifest:app:preReleaseBuild UP-TO-DATE:react-native-maps:preBuild UP-TO-DATE:react-native-maps:preReleaseBuild UP-TO-DATE:react-native-maps:checkReleaseManifest:react-native-maps:preDebugAndroidTestBuild UP-TO-DATE:react-native-maps:preDebugBuild UP-TO-DATE:react-native-maps:preDebugUnitTestBuild UP-TO-DATE:react-native-maps:preReleaseUnitTestBuild UP-TO-DATE:react-native-maps:prepareComAndroidSupportAppcompatV72301Library UP-TO-DATE:react-native-maps:prepareComAndroidSupportSupportV42400Library UP-TO-DATE:react-native-maps:prepareComFacebookFbuiTextlayoutbuilderTextlayoutbuilder100Library UP-TO-DATE:react-native-maps:prepareComFacebookFrescoDrawee130Library UP-TO-DATE:react-native-maps:prepareComFacebookFrescoFbcore130Library UP-TO-DATE:react-native-maps:prepareComFacebookFrescoFresco130Library UP-TO-DATE:react-native-maps:prepareComFacebookFrescoImagepipeline130Library UP-TO-DATE:react-native-maps:prepareComFacebookFrescoImagepipelineBase130Library UP-TO-DATE:react-native-maps:prepareComFacebookFrescoImagepipelineOkhttp3130Library UP-TO-DATE:react-native-maps:prepareComFacebookReactReactNative0493Library UP-TO-DATE:react-native-maps:prepareComFacebookSoloaderSoloader010Library UP-TO-DATE:react-native-maps:prepareComGoogleAndroidGmsPlayServicesBase1024Library UP-TO-DATE:react-native-maps:prepareComGoogleAndroidGmsPlayServicesBasement1024Library UP-TO-DATE:react-native-maps:prepareComGoogleAndroidGmsPlayServicesMaps1024Library UP-TO-DATE:react-native-maps:prepareComGoogleAndroidGmsPlayServicesTasks1024Library UP-TO-DATE:react-native-maps:prepareOrgWebkitAndroidJscR174650Library UP-TO-DATE:react-native-maps:prepareReleaseDependencies:react-native-maps:compileReleaseAidl UP-TO-DATE:react-native-maps:compileReleaseNdk UP-TO-DATE:react-native-maps:compileLint UP-TO-DATE:react-native-maps:copyReleaseLint UP-TO-DATE:react-native-maps:compileReleaseRenderscript UP-TO-DATE:react-native-maps:generateReleaseBuildConfig UP-TO-DATE:react-native-maps:generateReleaseResValues UP-TO-DATE:react-native-maps:generateReleaseResources UP-TO-DATE:react-native-maps:mergeReleaseResources UP-TO-DATE:react-native-maps:processReleaseManifest UP-TO-DATE:react-native-maps:processReleaseResources UP-TO-DATE:react-native-maps:generateReleaseSources UP-TO-DATE:react-native-maps:incrementalReleaseJavaCompilationSafeguard UP-TO-DATE:react-native-maps:compileReleaseJavaWithJavac UP-TO-DATE:react-native-maps:extractReleaseAnnotations UP-TO-DATE:react-native-maps:mergeReleaseShaders UP-TO-DATE:react-native-maps:compileReleaseShaders UP-TO-DATE:react-native-maps:generateReleaseAssets UP-TO-DATE:react-native-maps:mergeReleaseAssets UP-TO-DATE:react-native-maps:mergeReleaseProguardFiles UP-TO-DATE:react-native-maps:packageReleaseRenderscript UP-TO-DATE:react-native-maps:packageReleaseResources UP-TO-DATE:react-native-maps:processReleaseJavaRes UP-TO-DATE:react-native-maps:transformResourcesWithMergeJavaResForRelease UP-TO-DATE:react-native-maps:transformClassesAndResourcesWithSyncLibJarsForRelease UP-TO-DATE:react-native-maps:mergeReleaseJniLibFolders UP-TO-DATE:react-native-maps:transformNative_libsWithMergeJniLibsForRelease UP-TO-DATE:react-native-maps:transformNative_libsWithSyncJniLibsForRelease UP-TO-DATE:react-native-maps:bundleRelease UP-TO-DATE:app:prepareComAndroidSupportAppcompatV72301Library UP-TO-DATE:app:prepareComAndroidSupportSupportV42400Library UP-TO-DATE:app:prepareComFacebookFbuiTextlayoutbuilderTextlayoutbuilder100Library UP-TO-DATE:app:prepareComFacebookFrescoDrawee130Library UP-TO-DATE:app:prepareComFacebookFrescoFbcore130Library UP-TO-DATE:app:prepareComFacebookFrescoFresco130Library UP-TO-DATE:app:prepareComFacebookFrescoImagepipeline130Library UP-TO-DATE:app:prepareComFacebookFrescoImagepipelineBase130Library UP-TO-DATE:app:prepareComFacebookFrescoImagepipelineOkhttp3130Library UP-TO-DATE:app:prepareComFacebookReactReactNative0493Library UP-TO-DATE:app:prepareComFacebookSoloaderSoloader010Library UP-TO-DATE:app:prepareComGoogleAndroidGmsPlayServicesBase1024Library UP-TO-DATE:app:prepareComGoogleAndroidGmsPlayServicesBasement1024Library UP-TO-DATE:app:prepareComGoogleAndroidGmsPlayServicesMaps1024Library UP-TO-DATE:app:prepareComGoogleAndroidGmsPlayServicesTasks1024Library UP-TO-DATE:app:prepareOrgWebkitAndroidJscR174650Library UP-TO-DATE:app:prepareSAGEReactNativeMapsUnspecifiedLibrary UP-TO-DATE:app:prepareDebugDependencies:app:compileDebugAidl UP-TO-DATE:app:compileDebugRenderscript UP-TO-DATE:app:generateDebugBuildConfig UP-TO-DATE:app:mergeDebugShaders UP-TO-DATE:app:compileDebugShaders UP-TO-DATE:app:generateDebugAssets UP-TO-DATE:app:mergeDebugAssets UP-TO-DATE:app:generateDebugResValues UP-TO-DATE:app:generateDebugResources UP-TO-DATE:app:mergeDebugResources UP-TO-DATE:app:bundleDebugJsAndAssets SKIPPED:app:copyDebugIconFonts UP-TO-DATE:app:processDebugManifest UP-TO-DATE:app:processDebugResources UP-TO-DATE:app:generateDebugSources UP-TO-DATE:app:incrementalDebugJavaCompilationSafeguard UP-TO-DATE:app:compileDebugJavaWithJavac UP-TO-DATE:app:compileDebugNdk UP-TO-DATE:app:compileDebugSources UP-TO-DATE:app:transformClassesWithDexForDebug UP-TO-DATE:app:mergeDebugJniLibFolders UP-TO-DATE:app:transformNative_libsWithMergeJniLibsForDebug UP-TO-DATE:app:processDebugJavaRes UP-TO-DATE:app:transformResourcesWithMergeJavaResForDebug UP-TO-DATE:app:validateSigningDebug:app:packageDebug UP-TO-DATE:app:assembleDebug UP-TO-DATE:app:installDebug Installing APK 'app-debug.apk' on 'LG-D690n - 5.0.2' for app:debug :app:preBuild 最新:app:preDebugBuild 最新:app:checkDebugManifest:app:preReleaseBuild 最新:react-native-maps:preBuild 最新:react-native-maps :preReleaseBuild 最新:react-native-maps:checkReleaseManifest:react-native-maps:preDebugAndroidTestBuild 最新:react-native-maps:preDebugBuild 最新:react-native-maps:preDebugUnitTestBuild UP -最新:react-native-maps:preReleaseUnitTestBuild 最新:react-native-maps:prepareComAndroidSupportAppcompatV72301Library 最新:react-native-maps:prepareComAndroidSupportSupportV42400Library 最新:react-native-maps: prepareComFacebookFbuiTextlayoutbuilderTextlayoutbuilder100Library UP-TO-DATE:react-native-maps:prepareComFacebookFrescoDrawee130Library UP-TO-DATE:react-native-maps:prepareComFacebookFrescoFbcore130Library UP-TO-DATE:react-native-maps:prepareComFace bookFrescoFresco130Library UP-TO-DATE:react-native-地图:prepareComFacebookFrescoImagepipeline130Library UP-TO-DATE:react-native-maps:prepareComFacebookFrescoImagepipelineBase130Library UP-TO-DATE:react-native-maps:prepareComFacebookFrescoImagepipelineOkhttp3130Library UP-TO-DATE:react-native-maps:pre pareComFacebookReactReactNative0493Library UP-TO-DATE:react-本机地图:prepareComFacebookSoloaderSoloader010Library UP-TO-DATE:react-native-maps:prepareComGoogleAndroidGmsPlayServicesBase1024Library UP-TO-DATE:react-native-maps:prepareComGoogleAndroidGmsPlayServicesBasement1024Library UP-TO-DATE:react-native-maps:prepareCom GoogleAndroidGmsPlayServicesMaps1024Library 最新: react-native-maps:prepareComGoogleAndroidGmsPlayServicesTasks1024Library UP-TO-DATE:react-native-maps:prepareOrgWebkitAndroidJscR174650Library UP-TO-DATE:react-native-maps:prepareReleaseDependencies:react-native-maps:compileReleaseAidl UP-TO-DATE:re原住民-maps:compileReleaseNdk 最新:react-native-maps:compileLint 最新:react-native-maps:copyReleaseLint 最新:react-native-maps:compileReleaseRenderscript 最新:react -native-maps:generateReleaseBuildConfig 最新:react-native-maps:generateReleaseResValues 最新:react-native-maps:generateReleaseResources 最新:react-native-maps:mergeReleaseResources 最新:react-native-maps:processReleaseManifest 最新:react-native-maps:processReleaseResources 最新:react-native-maps:generateReleaseSources 最新:react-native-maps:incrementalReleaseJavaCompilationSafeguard 最新-DATE:react-native-maps:compileReleaseJavaWithJavac 最新:react-native-maps:extractReleaseAnnotations 最新:react-native-maps:mergeReleaseShaders 最新:react-native-maps:compileReleaseShaders UP -最新:反应本机地图:生成发布资产最新:反应本机地图:合并发布资产最新:反应本机地图:合并释放ProguardFiles最新:反应本机地图: packageReleaseRenderscript 最新:react-native-maps:packageReleaseResources 最新:react-native-maps:processReleaseJavaRes 最新:react-native-maps:transformResourcesWithMergeJavaResForRelease 最新:react-native-地图:transformClassesAndResourcesWithSyncLibJarsForRelease 最新:react-native-maps:mergeReleaseJniLibFolders 最新:react-native-maps:transformNative_libsWithMergeJniLibsForRelease 最新:react-native-maps:transformNative_libsWithSyncJniLibsForRelease最新:反应-本机地图:bundleRelease UP-TO-DATE:app:prepareComAndroidSupportAppcompatV72301Library UP-TO-DATE:app:prepareComAndroidSupportSupportSupportV42400Library UP-TO-DATE:app:prepareComFacebookFbuiTextlayoutbuilderTextlayoutbuilder100Library UP-TO-DATE:app:prepare ComFacebookFrescoDrawee130Library UP-TO-DATE:app:prepareComFacebookFrescoFbcore130Library最新:app:prepareComFacebookFrescoFresco130Library 最新:app:prepareComFacebookFrescoImagepipeline130Library 最新:app:prepareComFacebookFrescoImagepipelineBase130Library 最新:app:prepareComFacebookFrescoImagepipelineOkhttp 3130库最新:app:prepareComFacebookReactReactNative0493库最新:app:prepareComFacebookSoloaderSoloader010Library UP-TO-DATE:app:prepareComGoogleAndroidGmsPlayServicesBase1024Library UP-TO-DATE:app:prepareComGoogleAndroidGmsPlayServicesBasement1024Library UP-TO-DATE:app:prepareComGoogleAndroidGmsPlayServicesMaps1024Library UP-TO -DATE:app:prepareComGoogleAndroidGmsPlayServicesTasks1024Library UP-TO-DATE:app:prepareOrgWebkitAndroidJscR174650Library UP -最新:app:prepareSAGEReactNativeMapsUnspecifiedLibrary 最新:app:prepareDebugDependencies:app:compileDebugAidl 最新:app:compileDebugRenderscript 最新:app:generateDebugBuildConfig 最新:app:mergeDebugShaders 最新-最新:app:compileDebugShaders 最新:app:generateDebugAssets 最新:app:mergeDebugAssets 最新:app:generateDebugResValues 最新:app:generateDebugResources 最新:app :mergeDebugResources 最新:app:bundleDebugJsAndAssets 已跳过:app:copyDebugIconFonts 最新:app:processDebugManifest 最新:app:processDebugResources 最新:app:generateDebugSources 最新:app :incrementalDebugJavaCompilationSafeguard 最新:app:compileDebugJavaWithJavac 最新:app:compileDebugNdk 最新:app:compileDebugSources 最新:app:transformClassesWithDexForDebug 最新:app:mergeDebugJniLibFolders 最新-DATE:app:transformNative_libsWithMergeJniLibsForDebug 最新:app:processDebugJavaRes 最新:app:transformResourcesWithMergeJavaResForDebug 最新:app:validateSigningDebug:app:packageDebug 最新:app:assembleDebug 最新- DATE:app:installDebug 在“LG-D690n - 5.0.2”上为 app:debug 安装 APK“app-debug.apk”

Building 99% >:app:installDebug构建 99% >:app:installDebug

you can kill & restart adb in your terminal您可以在终端中杀死并重新启动 adb

adb kill-server && adb start-server adb kill-server && adb start-server

and start并开始

react-native run-android react-native run-android

Try to change the USB port of your physical device.尝试更改物理设备的 USB 端口。 That worked for me.那对我有用。

I was running this on an emulator and ran into this issue.我在模拟器上运行它并遇到了这个问题。 Tried all of the solutions on this page and none worked.尝试了此页面上的所有解决方案,但均无效。 Also tried just shutting everything down and restarting it - no luck.还尝试关闭所有内容并重新启动它 - 没有运气。 This is what worked for me:这对我有用:

1) In android studio, go to the Android Device Manager 1) 在 android studio 中,转到Android Device Manager

2) For the emulator I was using, select then grey down arrow on the far right 2)对于我使用的模拟器,选择最右边的灰色向下箭头

3) Wipe Data 3) Wipe Data

Relaunch the app and it worked fine.重新启动应用程序,它运行良好。

I had the same issue but I was using an actual device connected with USB not an emulator.我遇到了同样的问题,但我使用的是与 USB 连接的实际设备,而不是模拟器。 I know this is silly but restarting my device and computer did the trick for me =)我知道这很愚蠢,但重新启动我的设备和计算机对我有用=)

here, is the case when your app-debug.apk is build under "android/app/build/outputs/apk/" directory of your project, so you can directly copy paste app-debug.apk in your device and install the apk, or you can drag and drop this apk in your virtual device (Genymotion).在这里,就是你的app-debug.apk是在你的项目的“android/app/build/outputs/apk/”目录下构建的,所以你可以直接将app-debug.apk复制粘贴到你的设备中并安装apk ,或者您可以将此 apk 拖放到您的虚拟设备 (Genymotion) 中。 So you can continue your work.所以你可以继续你的工作。

And for the above case, you must have set the path of android sdk in Genymotion, as in below picture对于上面的情况,你必须在Genymotion中设置android sdk的路径,如下图

在此处输入图片说明

then restart your genymotion device and then use " react-native run-andorid "然后重新启动您的 genymotion 设备,然后使用“ react-native run-andorid

inside your project root directory.在您的项目根目录中。

In my case, changing the USB cable itself helped.就我而言,更换 USB 电缆本身有帮助。 But previous cable was showing that the device is online when using add devices但是以前的电缆在使用add devices时显示设备在线

If the same application is already installed through Playstore, try un-installing it first and then execute npm run android .如果已经通过 Playstore 安装了相同的应用程序,请先尝试卸载它,然后执行npm run android This was the issue in my case!这就是我的问题!

The first thing one should check is the USB file transfer mode.首先要检查的是USB file transfer模式。
It clearly says following它明确表示如下

Installing APK 'app-debug.apk' on '<Device Name>' for app:debug

This requires app-debug.apk file to be transferred first to the device, and if the file transfer mode is not selected file won't be transferred and unfortunately, installDebug task would keep trying to transfer without failing of timeout or something.这需要首先将app-debug.apk文件传输到设备,如果未选择file transfer模式,则不会传输文件,不幸的是, installDebug任务将继续尝试传输而不会出现超时或其他问题。

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 react-native:app:installDebug 失败 - react-native :app:installDebug FAILED 在项目“:app”中找不到任务“installDebug”。仅在一个 react-native 项目中 - Task 'installDebug' not found in project ':app'.in only one react-native project 在项目“:app”中找不到任务“installDebug”(npx react-native run-android 问题) - Task 'installDebug' not found in project ':app'(npx react-native run-android issue) react-native run-android:app:installDebug 失败 - react-native run-android :app:installDebug failed 任务“installDebug”在项目“:app”中不明确 - 使用 android 风格的 React Native - Task 'installDebug' is ambiguous in project ':app' - React Native with android flavors 尝试在 MI MAX 2 android 设备上运行本机应用程序时应用程序安装调试任务期间出现安全异常 - SecurityException during app:installDebug Task while attempting to run react-native app on MI MAX 2 android device React-Native应用程序卡住了要求权限 - React-Native app stuck asking for permissions React-Native(Android)错误:任务:app:installDebug FAILED(macOs Big Sur) - React-Native (Android) error : Task :app:installDebug FAILED (macOs Big Sur) 在根项目“android”React Native 中找不到“installDebug” - 'installDebug' not found in root project 'android' React Native React Native-任务&#39;:app:installDebug&#39;的执行失败 - React Native - Execution failed for task ':app:installDebug'
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM