Unity不会建立和发展运行 - Android

时间:2018-04-08 09:52:13

标签: android unity3d build

所以我目前正在使用:

  • JDK 10
  • Android SDK
  • Unity 2017版本2017.4.0f1
  • Unity Remote 5
  • 三星Galaxy s8版本8.0

我正在学习关于开始使用Unity的快速教程,但是在教程中它说我应该能够构建&在我连接的Android设备上运行,它不能在我的设备上运行。

我尝试过的事情:

  1. 构建APK文件并在我的Android手机上手动安装APK。 结果:点击"安装"我收到一条消息说" App未安装"。
  2. 尝试安装Android SDK的多个版本(包括最新版本)。
  3. 遵循了几个设置教程 - 在某些意义上它们都有所不同,它们将文件从某些文件夹复制并粘贴到根文件夹。
  4. 更改了播放器设置将位置安装到"自动"。
  5. 创建密钥库(包括密钥别名)。
  6. 当我尝试"构建&运行",我在控制台窗口中收到以下错误:

    CommandInvokationFailure: Unable to install APK to device. Please make sure the Android SDK is installed and is properly configured in the Editor. See the Console for more details. 
    C:/Users/Eric/AppData/Local/Android/Sdk\platform-tools\adb.exe -s "ce041714314828370d" install -r "C:\Projects\Unity\Test1\Android Test\test1.apk"
    
    stderr[
    adb: failed to install C:\Projects\Unity\Test1\Android Test\test1.apk: Failure [INSTALL_PARSE_FAILED_NO_CERTIFICATES: Failed to collect certificates from /data/app/vmdl936559745.tmp/base.apk: Attempt to get length of null array]
    ]
    stdout[
    
    ]
    exit code: 1
    UnityEditor.Android.Command.WaitForProgramToRun (UnityEditor.Utils.Program p, UnityEditor.Android.WaitingForProcessToExit waitingForProcessToExit, System.String errorMsg)
    UnityEditor.Android.Command.Run (System.Diagnostics.ProcessStartInfo psi, UnityEditor.Android.WaitingForProcessToExit waitingForProcessToExit, System.String errorMsg)
    UnityEditor.Android.ADB.RunInternal (System.String[] command, UnityEditor.Android.WaitingForProcessToExit waitingForProcessToExit, System.String errorMsg)
    UnityEditor.Android.ADB.Run (System.String[] command, UnityEditor.Android.WaitingForProcessToExit waitingForProcessToExit, System.String errorMsg)
    UnityEditor.Android.AndroidDevice.Exec (System.String[] command, UnityEditor.Android.WaitingForProcessToExit waitingForProcessToExit, System.String errorMsg)
    UnityEditor.Android.AndroidDevice.Install (System.String apkfile, UnityEditor.Android.WaitingForProcessToExit waitingForProcessToExit)
    UnityEditor.Android.AndroidDeploymentTargetsExtension+<UploadAPK>c__AnonStorey2.<>m__0 ()
    UnityEditor.Android.AndroidDeploymentTargetsExtension.UploadAPK (UnityEditor.BuildReporting.BuildReport buildReport, UnityEditor.Android.AndroidDevice device, UnityEditor.ProgressTaskManager taskManager)
    UnityEditor.Android.AndroidDeploymentTargetsExtension+<LaunchBuildOnTarget>c__AnonStorey1.<>m__0 ()
    UnityEditor.ProgressTaskManager.Run () (at C:/buildslave/unity/build/Editor/Mono/Utils/ProgressBarUtils.cs:71)
    UnityEditor.Android.AndroidDeploymentTargetsExtension.LaunchBuildOnTarget (UnityEditor.BuildReporting.BuildReport buildReport, DeploymentTargetId targetId, UnityEditor.ProgressHandler progressHandler)
    UnityEditor.DeploymentTargets.DeploymentTargetManager.LaunchBuildOnTarget (BuildTargetGroup targetGroup, UnityEditor.BuildReporting.BuildReport buildReport, DeploymentTargetId targetId, UnityEditor.ProgressHandler progressHandler) (at C:/buildslave/unity/build/Editor/Mono/DeploymentTargets/DeploymentTargetManager.cs:36)
    UnityEditor.PostprocessBuildPlayer+<Launch>c__AnonStorey0.<>m__1 () (at C:/buildslave/unity/build/Editor/Mono/BuildPipeline/PostprocessBuildPlayer.cs:181)
    UnityEditor.ProgressTaskManager.Run () (at C:/buildslave/unity/build/Editor/Mono/Utils/ProgressBarUtils.cs:71)
    UnityEditor.PostprocessBuildPlayer.Launch (BuildTargetGroup targetGroup, BuildTarget buildTarget, System.String path, System.String productName, BuildOptions options, UnityEditor.BuildReporting.BuildReport buildReport) (at C:/buildslave/unity/build/Editor/Mono/BuildPipeline/PostprocessBuildPlayer.cs:197)
    UnityEditor.BuildPlayerWindow:BuildPlayerAndRun()
    

    我现在已经有6个多小时了,有谁能告诉我我做错了什么?

0 个答案:

没有答案