Android Studio React-本机项目卡在:app:installDebug上

jgzswidk  于 2023-03-03  发布在  Android
关注(0)|答案(6)|浏览(158)

每次我运行我的react-native项目时,它都停留在99%。我试过运行./Gradlew clean and kill adb,但没有任何效果。我已经通过usb,genymotion和android studio模拟器使用我的设备,它总是一样...

Building and installing the app on the device (cd android && gradlew.bat install Debug)... Incremental java compilation is an incubating feature. :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

构建99%〉:应用程序:安装调试

jk9hmnmh

jk9hmnmh1#

你可以在你的终端杀死并重新启动adb
adb终止服务器&& adb启动服务器
并启动
react-native运行-android

3phpmpom

3phpmpom2#

我在一个模拟器上运行这个程序,遇到了这个问题。尝试了这个页面上的所有解决方案,没有一个工作。也尝试了关闭一切并重新启动它-没有运气。这是对我有效的:
1)在android studio中,转到Android Device Manager
2)对于我使用的模拟器,选择最右边的灰色向下箭头
3)Wipe Data
重新启动应用程序,它工作正常。

a8jjtwal

a8jjtwal3#

尝试更改物理设备的USB端口。这对我很有效。

p5cysglq

p5cysglq4#

我有同样的问题,但我使用的是一个实际的设备连接USB,而不是模拟器。我知道这是愚蠢的,但重新启动我的设备和电脑做了我的伎俩=)

bprjcwpo

bprjcwpo5#

这里,是你的app-debug.apk是在你的项目的***“android/app/build/outputs/apk/"*目录下构建的,所以你可以直接复制粘贴app-debug.apk**到你的设备中并安装apk,或者你可以将这个apk拖放到你的虚拟设备(Genymotion)中,这样你就可以继续你的工作了。
对于上述情况,你必须在Genymotion中设置android sdk的路径,如下图所示

然后重新启动genymotion设备,然后使用“react-native run-andorid
位于项目根目录中。

mcdcgff0

mcdcgff06#

在我的情况下,更换USB电缆本身就有帮助。但以前的电缆显示设备在使用add devices时处于在线状态

相关问题