Unable to install APK to device

10,475

Solution 1

I got the Solution.

Create New Folder in any other drive, and copy the folder one by one from older sdk to new sdk folder, and take build each time you paste the folder.

In my case there is an extra folder is corrupted and found like this , and i removed that folder and it works fine now.

Solution 2

Try Uninstalling the APK that you already installed.

Solution 3

You should remove the previously installed application and use the software to clean up the rest of the application.

It seems to be the previously installed application and caused the cache to be unable to continue.

I have tried many ways and the simplest way to fix it is to restart your phone or virtual machine

Share:
10,475
Simple Arcade Gamers
Author by

Simple Arcade Gamers

Am a android game developer.

Updated on June 23, 2022

Comments

  • Simple Arcade Gamers
    Simple Arcade Gamers almost 2 years

    I updated my jdk and sdk , and when am taking build apk is building but not working its corrupted. By usb debugging i got this error. Am using Unity 2018.3.9f1. Please solve the issue.

    In Unity 5.6.6 APK is building Successfully.

    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.
    D:/Babji Unity/android-sdks\platform-tools\adb.exe -s "cbe79ceb" install -r "D:\Babji Unity\Test New Unity\TestAsset.apk"
    
    stderr[
    adb: failed to install D:\Babji Unity\Test New Unity\TestAsset.apk: Failure [INSTALL_PARSE_FAILED_UNEXPECTED_EXCEPTION: Failed to parse /data/app/vmdl839836997.tmp/base.apk: AndroidManifest.xml]
    ]
    stdout[
    Performing Streamed Install
    ]
    exit code: 1
    UnityEditor.Android.Command.WaitForProgramToRun (UnityEditor.Utils.Program p, UnityEditor.Android.Command+WaitingForProcessToExit waitingForProcessToExit, System.String errorMsg) (at <df7ba4d130594d168eec372b930522d4>:0)
    UnityEditor.Android.Command.Run (System.Diagnostics.ProcessStartInfo psi, UnityEditor.Android.Command+WaitingForProcessToExit waitingForProcessToExit, System.String errorMsg) (at <df7ba4d130594d168eec372b930522d4>:0)
    UnityEditor.Android.Command.Run (System.String command, System.String args, System.String workingdir, UnityEditor.Android.Command+WaitingForProcessToExit waitingForProcessToExit, System.String errorMsg) (at <df7ba4d130594d168eec372b930522d4>:0)
    UnityEditor.Android.ADB.RunInternal (System.String[] command, UnityEditor.Android.Command+WaitingForProcessToExit waitingForProcessToExit, System.String errorMsg) (at <df7ba4d130594d168eec372b930522d4>:0)
    UnityEditor.Android.ADB.Run (System.String[] command, UnityEditor.Android.Command+WaitingForProcessToExit waitingForProcessToExit, System.String errorMsg) (at <df7ba4d130594d168eec372b930522d4>:0)
    UnityEditor.Android.AndroidDevice.Exec (System.String[] command, System.String errorMsg) (at <df7ba4d130594d168eec372b930522d4>:0)
    UnityEditor.Android.AndroidDevice.Install (System.String apkfile) (at <df7ba4d130594d168eec372b930522d4>:0)
    UnityEditor.Android.AndroidDeploymentTargetsExtension+<UploadAPK>c__AnonStorey3.<>m__0 () (at <df7ba4d130594d168eec372b930522d4>:0)
    UnityEditor.Android.AndroidDeploymentTargetsExtension.UploadAPK (UnityEditor.Android.AndroidBuildProperties buildProperties, UnityEditor.Android.AndroidDevice device, UnityEditor.Android.AndroidDeploymentTargetsExtension+LaunchProgressTaskManager taskManager) (at <df7ba4d130594d168eec372b930522d4>:0)
    UnityEditor.Android.AndroidDeploymentTargetsExtension+<LaunchBuildOnTarget>c__AnonStorey0.<>m__2 () (at <df7ba4d130594d168eec372b930522d4>:0)
    UnityEditor.ProgressTaskManager.Run () (at C:/buildslave/unity/build/Editor/Mono/Utils/ProgressBarUtils.cs:71)
    UnityEditor.Android.AndroidDeploymentTargetsExtension.LaunchBuildOnTarget (UnityEditor.DeploymentTargets.IDeploymentTargetsMainThreadContext context, UnityEditor.BuildProperties buildProperties, UnityEditor.DeploymentTargets.DeploymentTargetId targetId, UnityEditor.ProgressHandler progressHandler) (at <df7ba4d130594d168eec372b930522d4>:0)
    UnityEditor.DeploymentTargets.DeploymentTargetManager.LaunchBuildOnTarget (UnityEditor.BuildProperties buildProperties, UnityEditor.DeploymentTargets.DeploymentTargetId targetId, UnityEditor.ProgressHandler progressHandler) (at C:/buildslave/unity/build/Editor/Mono/DeploymentTargets/DeploymentTargetManager.cs:45)
    UnityEditor.PostprocessBuildPlayer+<LaunchOnTargets>c__AnonStorey1.<>m__0 () (at C:/buildslave/unity/build/Editor/Mono/BuildPipeline/PostprocessBuildPlayer.cs:210)
    UnityEditor.ProgressTaskManager.Run () (at C:/buildslave/unity/build/Editor/Mono/Utils/ProgressBarUtils.cs:71)
    UnityEditor.PostprocessBuildPlayer.LaunchOnTargets (UnityEditor.BuildTargetGroup targetGroup, UnityEditor.BuildTarget buildTarget, UnityEditor.Build.Reporting.BuildReport buildReport, System.Collections.Generic.List`1[T] launchTargets) (at C:/buildslave/unity/build/Editor/Mono/BuildPipeline/PostprocessBuildPlayer.cs:229)
    UnityEditor.Android.PostProcessAndroidPlayer.Launch (UnityEditor.BuildTarget target, System.String installPath, UnityEditor.Build.Reporting.BuildReport report) (at <df7ba4d130594d168eec372b930522d4>:0)
    UnityEditor.Android.AndroidBuildPostprocessor.LaunchPlayer (UnityEditor.Modules.BuildLaunchPlayerArgs args) (at <df7ba4d130594d168eec372b930522d4>:0)
    UnityEditor.PostprocessBuildPlayer.Launch (UnityEditor.BuildTargetGroup targetGroup, UnityEditor.BuildTarget buildTarget, System.String path, System.String productName, UnityEditor.BuildOptions options, UnityEditor.Build.Reporting.BuildReport buildReport) (at C:/buildslave/unity/build/Editor/Mono/BuildPipeline/PostprocessBuildPlayer.cs:173)
    UnityEngine.GUIUtility:ProcessEvent(Int32, IntPtr)
    
  • SteakOverflow
    SteakOverflow over 4 years
    I was banging my skull against stupidly intricated solutions... and it was just that. Thanks human!
  • Nishchhal Bakshi
    Nishchhal Bakshi over 4 years
    Hehe happens, all the best!
  • Tejus Wadbudhe
    Tejus Wadbudhe over 2 years
    Works for me too...