Search Unity

  1. Good news ✨ We have more Unite Now videos available for you to watch on-demand! Come check them out and ask our experts any questions!
    Dismiss Notice

UnityException: Could not find any valid targets to launch on for Android

Discussion in 'VR' started by IvanMorones, Jun 15, 2019.

  1. IvanMorones

    IvanMorones

    Joined:
    Jan 23, 2019
    Posts:
    5
    Please I'm desesperate it's been two weeks and I can't solve this problem. This happens when I try to build and run a APK in my Oculus Go. At the beginning I could install the APK without problem but one day this appeared and I couldn't do it anymore.

    UnityException: Could not find any valid targets to launch on for Android
    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:235)
    UnityEditor.Android.PostProcessAndroidPlayer.Launch (UnityEditor.BuildTarget target, System.String installPath, UnityEditor.Build.Reporting.BuildReport report) (at <4132c5c2cd7b45b09ef33302ae416489>:0)
    UnityEditor.Android.AndroidBuildPostprocessor.LaunchPlayer (UnityEditor.Modules.BuildLaunchPlayerArgs args) (at <4132c5c2cd7b45b09ef33302ae416489>: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:166)
    UnityEngine.GUIUtility:processEvent(Int32, IntPtr)

    I tried using unity 2019.1.6f1, 2019.1.4f1, 2019.1.0b10
    Already changed minimun API level to 21 and maximum 27 (oreo)
    I already reinstalled 4 times andorid studio and SDK tools because I saw it in other forum
     
  2. IvanMorones

    IvanMorones

    Joined:
    Jan 23, 2019
    Posts:
    5
  3. Quirkeley

    Quirkeley

    Joined:
    Jun 11, 2016
    Posts:
    1
    Running into the same error, however for the Quest. I built with Unity 2019.1.0f2 and had it working the on Go, and then was able to get it working on the Quest by changing a few lines in the manifest. As soon as I uploaded it to a release channel, I started having problems (conflict with keys I think) and now can't get it to build and run at all. I'm going to look at the manifest to make sure the action settings are correct and see if I can get it to work on the Go again.

    My best guess is that a directory path is broken somewhere or there's an issue in the manifest settings. This is one of my first projects so everything feels like an aim in the dark. Keep you posted if I find any tips.
     
    eleister and IvanMorones like this.
  4. IvanMorones

    IvanMorones

    Joined:
    Jan 23, 2019
    Posts:
    5
    Thanks Quirkeley if you find any solution please contact me
     
  5. AndBje

    AndBje

    Joined:
    Jun 5, 2016
    Posts:
    15
    Had the same error message but in my case it was simply a newer version of the app already installed on my device. I uninstalled the app on my device and then everything worked. (I had accidentally opened an alpha version of Unity before and tested the app but forgot to uninstall it after).
     
  6. mattbenic

    mattbenic

    Joined:
    Nov 24, 2010
    Posts:
    38
    I've had the same issue for a few weeks now (@Quirkeley now you mention it I think it may also be the first time I successfully pushed up a build to a distribution channel). Deploying manually with adb (adb install -r <filename>) works fine, so it's definitely not a device incompatibility issue.
     
  7. AndBje

    AndBje

    Joined:
    Jun 5, 2016
    Posts:
    15
    1. Maybe has nothing to do with this, but before I found my answer I manually install the latest SDK, see included picture. (Does not happen automatically if you just select to update the Android Studio).

    2. Another tip is to change the Bundle Version Code (increase the value).
     

    Attached Files:

    Last edited: Aug 8, 2019
  8. eleister

    eleister

    Joined:
    Feb 8, 2018
    Posts:
    4
    Anyone have an updated answer to this issue? I am getting the same error messages on build suddenly with the Quest.
     
  9. sabbirsarker

    sabbirsarker

    Joined:
    Jan 13, 2020
    Posts:
    1
    Same problem :(
     
  10. unity_IeF9AAUYlnX1WA

    unity_IeF9AAUYlnX1WA

    Joined:
    Feb 16, 2020
    Posts:
    1
    I had this today, I did resolve this by uninstalling the app on my Android Device and clearing the data in the configAPK which you'll also find in the Android (I develop with React Native and Xamarin as well so those are tricks I've picked up)
     
  11. wuy420

    wuy420

    Joined:
    Apr 22, 2019
    Posts:
    4
    I had the same issue. The problem was that there was a plugin folder which has a manifest file inside it. I think it probably because this manifest file is conflict with Unity itself. Everything was right after my gf deleted the plugin folder. She is a talent girl (forced:))
     
  12. Christopher-Taljaard

    Christopher-Taljaard

    Joined:
    May 15, 2019
    Posts:
    3
    Just had the same issue too, seemed to resolve after I restarted my android device, such a relief:D
     
    rcp140875 likes this.
  13. richiekotwal

    richiekotwal

    Joined:
    May 29, 2020
    Posts:
    1
    Just delete the apks and do it
     
unityunity