每次我运行我的反应原生项目时,它都会被困在99%。 我试图跑./Gradlew干净并杀死adb但没有任何作用。 我已经通过usb,genymotion和android studio模拟器使用了我的设备,它总是一样的......
在设备上构建和安装应用程序(cd android&& gradlew.bat install Debug)...增量java编译是一个 孵化功能。 :app:preBuild UP-TO-DATE:app:preDebugBuild 最新消息:app:checkDebugManifest:app:preReleaseBuild UP-TO-DATE :react-native-maps:preBuild UP-TO-DATE :react-native-maps:preReleaseBuild UP-TO-DATE :反应天然-地图: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 :反应天然-地图:prepareComAndroidSupportAppcompatV72301Library 最新 :反应天然-地图:prepareComAndroidSupportSupportV42400Library 最新 :反应天然-地图:prepareComFacebookFbuiTextlayoutbuilderTextlayoutbuilder100Library 最新消息:react-native-maps:prepareComFacebookFrescoDrawee130Library UP-TO-DATE:react-native-maps:prepareComFacebookFrescoFbcore130Library UP-TO-DATE:react-native-maps:prepareComFacebookFrescoFresco130Library 最新 :反应天然-地图:prepareComFacebookFrescoImagepipeline130Library 最新 :反应天然-地图:prepareComFacebookFrescoImagepipelineBase130Library 最新 :反应天然-地图:prepareComFacebookFrescoImagepipelineOkhttp3130Library 最新 :反应天然-地图:prepareComFacebookReactReactNative0493Library 最新 :反应天然-地图:prepareComFacebookSoloaderSoloader010Library 最新 :反应天然-地图:prepareComGoogleAndroidGmsPlayServicesBase1024Library 最新 :react-native-maps:prepareComGoogleAndroidGmsPlayServicesBasement1024Library UP-TO-DATE :反应天然-地图:prepareComGoogleAndroidGmsPlayServicesMaps1024Library 最新 :反应天然-地图: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 :反应天然-地图: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 :反应天然-地图:transformResourcesWithMergeJavaResForRelease 最新 :反应天然-地图:transformClassesAndResourcesWithSyncLibJarsForRelease UP-TO-DATE:react-native-maps:mergeReleaseJniLibFolders UP-TO-DATE :反应天然-地图:transformNative_libsWithMergeJniLibsForRelease 最新 :反应天然-地图:transformNative_libsWithSyncJniLibsForRelease UP-TO-DATE:react-native-maps:bundleRelease UP-TO-DATE :app:prepareComAndroidSupportAppcompatV72301Library UP-TO-DATE :app:prepareComAndroidSupportSupportV42400Library UP-TO-DATE :应用:prepareComFacebookFbuiTextlayoutbuilderTextlayoutbuilder100Library 最新消息: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 :应用:prepareComGoogleAndroidGmsPlayServicesBasement1024Library UP-TO-DATE:app:prepareComGoogleAndroidGmsPlayServicesMaps1024Library 最新消息:app:prepareComGoogleAndroidGmsPlayServicesTasks1024Library 最新消息:app:prepareOrgWebkitAndroidJscR174650Library UP-TO-DATE :app:prepareSAGEReactNativeMapsUnspecifiedLibrary UP-TO-DATE :app:prepareDebugDependencies:app:compileDebugAidl UP-TO-DATE :app:compileDebugRenderscript UP-TO-DATE:app:generateDebugBuildConfig 最新消息: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 最新消息:app:processDebugManifest UP-TO-DATE :app:processDebugResources UP-TO-DATE:app:generateDebugSources 最新版本:app:incrementalDebugJavaCompilationSafeguard UP-TO-DATE :app:compileDebugJavaWithJavac UP-TO-DATE:app:compileDebugNdk 最新版: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安装APK ' APP-debug.apk' on' LG-D690n - 5.0.2'对于app:debug
构建99%> :应用程序:installDebug
答案 0 :(得分:22)
您可以在终端中终止并重新启动adb
adb kill-server && adb启动服务器
并开始
react-native run-android
答案 1 :(得分:3)
尝试更改物理设备的USB端口。那对我有用。
答案 2 :(得分:2)
我遇到了同样的问题,但是我使用的是与USB连接的实际设备,而不是仿真器。我知道这很愚蠢,但是重新启动设备和计算机对我来说是成功的秘诀=)
答案 3 :(得分:0)
这里是 app-debug.apk 在 &#34; android / app / build / outputs / apk /&#34; < / em> 您项目的目录, 所以你可以直接在你的设备中复制粘贴app-debug.apk并安装apk,或者你可以在你的虚拟设备(Genymotion)中拖放这个apk。 所以你可以继续你的工作。
对于上面的情况,你必须在Genymotion中设置android sdk的路径,如在nelow图片中
然后重启你的genymotion设备,然后使用&#34; react-native run-andorid &#34;
在项目根目录中。
答案 4 :(得分:0)
我在模拟器上运行它,遇到了这个问题。尝试了此页面上的所有解决方案,但没有一个起作用。还尝试过关闭所有内容并重新启动它-没运气。这对我有用:
1)在android studio中,转到Android Device Manager
2)对于我使用的仿真器,选择然后选择最右边的灰色向下箭头
3)Wipe Data
重新启动应用程序,它运行良好。