运行项目报错怎么解决



  • Microsoft Windows [版本 6.1.7601]
    版权所有 (c) 2009 Microsoft Corporation。保留所有权利。

    C:\Windows\system32>cd C:\Users\yuzhengang\MyProjectTest

    C:\Users\yuzhengang\MyProjectTest>react-native run-android
    'yarn' �����ڲ����ⲿ���Ҳ���ǿ����еij���
    �������ļ�
    Scanning 560 folders for symlinks in C:\Users\yuzhengang\MyProjectTest\node_modu
    les (67ms)
    JS server already running.
    Building and installing the app on the device (cd android && gradlew.bat install
    Debug)...
    Download https://jcenter.bintray.com/com/facebook/fresco/fresco/1.0.1/fresco-1.0
    .1.pom
    Download https://jcenter.bintray.com/com/facebook/fresco/imagepipeline-okhttp3/1
    .0.1/imagepipeline-okhttp3-1.0.1.pom
    Download https://jcenter.bintray.com/com/facebook/fresco/drawee/1.0.1/drawee-1.0
    .1.pom
    Download https://jcenter.bintray.com/com/facebook/fresco/fbcore/1.0.1/fbcore-1.0
    .1.pom
    Download https://jcenter.bintray.com/com/facebook/fresco/imagepipeline/1.0.1/ima
    gepipeline-1.0.1.pom
    Download https://jcenter.bintray.com/com/facebook/fresco/imagepipeline-base/1.0.
    1/imagepipeline-base-1.0.1.pom
    Download https://jcenter.bintray.com/com/facebook/fresco/fbcore/1.0.1/fbcore-1.0
    .1.aar
    Download https://jcenter.bintray.com/com/facebook/fresco/drawee/1.0.1/drawee-1.0
    .1.aar
    Download https://jcenter.bintray.com/com/facebook/fresco/imagepipeline-base/1.0.
    1/imagepipeline-base-1.0.1.aar
    Download https://jcenter.bintray.com/com/facebook/fresco/imagepipeline/1.0.1/ima
    gepipeline-1.0.1.aar
    Download https://jcenter.bintray.com/com/facebook/fresco/fresco/1.0.1/fresco-1.0
    .1.aar
    Download https://jcenter.bintray.com/com/facebook/fresco/imagepipeline-okhttp3/1
    .0.1/imagepipeline-okhttp3-1.0.1.aar
    Incremental java compilation is an incubating feature.
    :app:preBuild UP-TO-DATE
    :app:preDebugBuild UP-TO-DATE
    :app:checkDebugManifest
    :app:preReleaseBuild UP-TO-DATE
    :app:prepareComAndroidSupportAppcompatV72301Library
    :app:prepareComAndroidSupportRecyclerviewV72340Library
    :app:prepareComAndroidSupportSupportV42340Library
    :app:prepareComFacebookFbuiTextlayoutbuilderTextlayoutbuilder100Library
    :app:prepareComFacebookFrescoDrawee101Library
    :app:prepareComFacebookFrescoFbcore101Library
    :app:prepareComFacebookFrescoFresco101Library
    :app:prepareComFacebookFrescoImagepipeline101Library
    :app:prepareComFacebookFrescoImagepipelineBase101Library
    :app:prepareComFacebookFrescoImagepipelineOkhttp3101Library
    :app:prepareComFacebookReactReactNative0430Library
    :app:prepareComFacebookSoloaderSoloader010Library
    :app:prepareOrgWebkitAndroidJscR174650Library
    :app:prepareDebugDependencies
    :app:compileDebugAidl
    :app:compileDebugRenderscript
    :app:generateDebugBuildConfig
    :app:mergeDebugShaders
    :app:compileDebugShaders
    :app:generateDebugAssets
    :app:mergeDebugAssets
    :app:generateDebugResValues
    :app:generateDebugResources
    :app:mergeDebugResources
    :app:bundleDebugJsAndAssets SKIPPED
    :app:processDebugManifest
    :app:processDebugResources
    :app:generateDebugSources
    :app:incrementalDebugJavaCompilationSafeguard
    :app:compileDebugJavaWithJavac
    :app:compileDebugJavaWithJavac - is not incremental (e.g. outputs have changed,
    no previous execution, etc.).
    :app:compileDebugNdk UP-TO-DATE
    :app:compileDebugSources
    :app:transformClassesWithDexForDebug
    Running dex in-process requires build tools 23.0.2.
    For faster builds update this project to use the latest build tools.
    :app:mergeDebugJniLibFolders
    :app:transformNative_libsWithMergeJniLibsForDebug
    :app:processDebugJavaRes UP-TO-DATE
    :app:transformResourcesWithMergeJavaResForDebug
    :app:validateSigningDebug
    :app:packageDebug
    :app:assembleDebug
    :app:installDebug
    Installing APK 'app-debug.apk' on '1501-A02 - 5.1' for app:debug
    Unable to install C:\Users\yuzhengang\MyProjectTest\android\app\build\outputs\ap
    k\app-debug.apk
    com.android.ddmlib.InstallException: Failed to install all
    at com.android.ddmlib.SplitApkInstaller.install(SplitApkInstaller.java:8

    1.  at com.android.ddmlib.Device.installPackages(Device.java:904)
       at com.android.builder.testing.ConnectedDevice.installPackages(Connected
      

    Device.java:137)
    at com.android.build.gradle.internal.tasks.InstallVariantTask.install(In
    stallVariantTask.java:134)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.
    java:62)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
    sorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:483)
    at org.gradle.internal.reflect.JavaMethod.invoke(JavaMethod.java:75)
    at org.gradle.api.internal.project.taskfactory.AnnotationProcessingTaskF
    actory$StandardTaskAction.doExecute(AnnotationProcessingTaskFactory.java:228)
    at org.gradle.api.internal.project.taskfactory.AnnotationProcessingTaskF
    actory$StandardTaskAction.execute(AnnotationProcessingTaskFactory.java:221)
    at org.gradle.api.internal.project.taskfactory.AnnotationProcessingTaskF
    actory$StandardTaskAction.execute(AnnotationProcessingTaskFactory.java:210)
    at org.gradle.api.internal.AbstractTask$TaskActionWrapper.execute(Abstra
    ctTask.java:621)
    at org.gradle.api.internal.AbstractTask$TaskActionWrapper.execute(Abstra
    ctTask.java:604)
    at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.ex
    ecuteAction(ExecuteActionsTaskExecuter.java:80)
    at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.ex
    ecuteActions(ExecuteActionsTaskExecuter.java:61)
    at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.ex
    ecute(ExecuteActionsTaskExecuter.java:46)
    at org.gradle.api.internal.tasks.execution.PostExecutionAnalysisTaskExec
    uter.execute(PostExecutionAnalysisTaskExecuter.java:35)
    at org.gradle.api.internal.tasks.execution.SkipUpToDateTaskExecuter.exec
    ute(SkipUpToDateTaskExecuter.java:66)
    at org.gradle.api.internal.tasks.execution.ValidatingTaskExecuter.execut
    e(ValidatingTaskExecuter.java:58)
    at org.gradle.api.internal.tasks.execution.SkipEmptySourceFilesTaskExecu
    ter.execute(SkipEmptySourceFilesTaskExecuter.java:52)
    at org.gradle.api.internal.tasks.execution.SkipTaskWithNoActionsExecuter
    .execute(SkipTaskWithNoActionsExecuter.java:52)
    at org.gradle.api.internal.tasks.execution.SkipOnlyIfTaskExecuter.execut
    e(SkipOnlyIfTaskExecuter.java:53)
    at org.gradle.api.internal.tasks.execution.ExecuteAtMostOnceTaskExecuter
    .execute(ExecuteAtMostOnceTaskExecuter.java:43)
    at org.gradle.execution.taskgraph.DefaultTaskGraphExecuter$EventFiringTa
    skWorker.execute(DefaultTaskGraphExecuter.java:203)
    at org.gradle.execution.taskgraph.DefaultTaskGraphExecuter$EventFiringTa
    skWorker.execute(DefaultTaskGraphExecuter.java:185)
    at org.gradle.execution.taskgraph.AbstractTaskPlanExecutor$TaskExecutorW
    orker.processTask(AbstractTaskPlanExecutor.java:66)
    at org.gradle.execution.taskgraph.AbstractTaskPlanExecutor$TaskExecutorW
    orker.run(AbstractTaskPlanExecutor.java:50)
    at org.gradle.execution.taskgraph.DefaultTaskPlanExecutor.process(Defaul
    tTaskPlanExecutor.java:25)
    at org.gradle.execution.taskgraph.DefaultTaskGraphExecuter.execute(Defau
    ltTaskGraphExecuter.java:110)
    at org.gradle.execution.SelectedTaskExecutionAction.execute(SelectedTask
    ExecutionAction.java:37)
    at org.gradle.execution.DefaultBuildExecuter.execute(DefaultBuildExecute
    r.java:37)
    at org.gradle.execution.DefaultBuildExecuter.access$000(DefaultBuildExec
    uter.java:23)
    at org.gradle.execution.DefaultBuildExecuter$1.proceed(DefaultBuildExecu
    ter.java:43)
    at org.gradle.execution.DryRunBuildExecutionAction.execute(DryRunBuildEx
    ecutionAction.java:32)
    at org.gradle.execution.DefaultBuildExecuter.execute(DefaultBuildExecute
    r.java:37)
    at org.gradle.execution.DefaultBuildExecuter.execute(DefaultBuildExecute
    r.java:30)
    at org.gradle.initialization.DefaultGradleLauncher$4.run(DefaultGradleLa
    uncher.java:153)
    at org.gradle.internal.Factories$1.create(Factories.java:22)
    at org.gradle.internal.progress.DefaultBuildOperationExecutor.run(Defaul
    tBuildOperationExecutor.java:91)
    at org.gradle.internal.progress.DefaultBuildOperationExecutor.run(Defaul
    tBuildOperationExecutor.java:53)
    at org.gradle.initialization.DefaultGradleLauncher.doBuildStages(Default
    GradleLauncher.java:150)
    at org.gradle.initialization.DefaultGradleLauncher.access$200(DefaultGra
    dleLauncher.java:32)
    at org.gradle.initialization.DefaultGradleLauncher$1.create(DefaultGradl
    eLauncher.java:98)
    at org.gradle.initialization.DefaultGradleLauncher$1.create(DefaultGradl
    eLauncher.java:92)
    at org.gradle.internal.progress.DefaultBuildOperationExecutor.run(Defaul
    tBuildOperationExecutor.java:91)
    at org.gradle.internal.progress.DefaultBuildOperationExecutor.run(Defaul
    tBuildOperationExecutor.java:63)
    at org.gradle.initialization.DefaultGradleLauncher.doBuild(DefaultGradle
    Launcher.java:92)
    at org.gradle.initialization.DefaultGradleLauncher.run(DefaultGradleLaun
    cher.java:83)
    at org.gradle.launcher.exec.InProcessBuildActionExecuter$DefaultBuildCon
    troller.run(InProcessBuildActionExecuter.java:99)
    at org.gradle.tooling.internal.provider.ExecuteBuildActionRunner.run(Exe
    cuteBuildActionRunner.java:28)
    at org.gradle.launcher.exec.ChainingBuildActionRunner.run(ChainingBuildA
    ctionRunner.java:35)
    at org.gradle.launcher.exec.InProcessBuildActionExecuter.execute(InProce
    ssBuildActionExecuter.java:48)
    at org.gradle.launcher.exec.InProcessBuildActionExecuter.execute(InProce
    ssBuildActionExecuter.java:30)
    at org.gradle.launcher.exec.ContinuousBuildActionExecuter.execute(Contin
    uousBuildActionExecuter.java:81)
    at org.gradle.launcher.exec.ContinuousBuildActionExecuter.execute(Contin
    uousBuildActionExecuter.java:46)
    at org.gradle.launcher.exec.DaemonUsageSuggestingBuildActionExecuter.exe
    cute(DaemonUsageSuggestingBuildActionExecuter.java:51)
    at org.gradle.launcher.exec.DaemonUsageSuggestingBuildActionExecuter.exe
    cute(DaemonUsageSuggestingBuildActionExecuter.java:28)
    at org.gradle.launcher.cli.RunBuildAction.run(RunBuildAction.java:43)
    at org.gradle.internal.Actions$RunnableActionAdapter.execute(Actions.jav
    a:173)
    at org.gradle.launcher.cli.CommandLineActionFactory$ParseAndBuildAction.
    execute(CommandLineActionFactory.java:239)
    at org.gradle.launcher.cli.CommandLineActionFactory$ParseAndBuildAction.
    execute(CommandLineActionFactory.java:212)
    at org.gradle.launcher.cli.JavaRuntimeValidationAction.execute(JavaRunti
    meValidationAction.java:35)
    at org.gradle.launcher.cli.JavaRuntimeValidationAction.execute(JavaRunti
    meValidationAction.java:24)
    at org.gradle.launcher.cli.ExceptionReportingAction.execute(ExceptionRep
    ortingAction.java:33)
    at org.gradle.launcher.cli.ExceptionReportingAction.execute(ExceptionRep
    ortingAction.java:22)
    at org.gradle.launcher.cli.CommandLineActionFactory$WithLogging.execute(
    CommandLineActionFactory.java:205)
    at org.gradle.launcher.cli.CommandLineActionFactory$WithLogging.execute(
    CommandLineActionFactory.java:169)
    at org.gradle.launcher.Main.doAction(Main.java:33)
    at org.gradle.launcher.bootstrap.EntryPoint.run(EntryPoint.java:45)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.
    java:62)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
    sorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:483)
    at org.gradle.launcher.bootstrap.ProcessBootstrap.runNoExit(ProcessBoots
    trap.java:55)
    at org.gradle.launcher.bootstrap.ProcessBootstrap.run(ProcessBootstrap.j
    ava:36)
    at org.gradle.launcher.GradleMain.main(GradleMain.java:23)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.
    java:62)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
    sorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:483)
    at org.gradle.wrapper.BootstrapMainStarter.start(BootstrapMainStarter.ja
    va:30)
    at org.gradle.wrapper.WrapperExecutor.execute(WrapperExecutor.java:127)
    at org.gradle.wrapper.GradleWrapperMain.main(GradleWrapperMain.java:61)
    11:38:24 E/2076765854: Error while uploading app-debug.apk : Unknown failure ([C
    DS]close[0])
    :
    app:installDebug FAILEDnstallDebug

    FAILURE: Build failed with an exception.

    • What went wrong:
      Execution failed for task ':app:installDebug'.

    com.android.builder.testing.api.DeviceException: com.android.ddmlib.InstallExc
    eption: Failed to install all

    • Try:
      Run with --stacktrace option to get the stack trace. Run with --info or --debug
      option to get more log output.

    BUILD FAILED

    Total time: 6 mins 34.957 secs
    Could not install the app on the device, read the error above for details.
    Make sure you have an Android emulator running or a device connected and have
    set up your Android development environment:
    https://facebook.github.io/react-native/docs/android-setup.html

    C:\Users\yuzhengang\MyProjectTest>


登录后回复