Search Unity

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:
    16
    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:
    16
    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
    webjaros likes this.
  8. eleister

    eleister

    Joined:
    Feb 8, 2018
    Posts:
    5
    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. Mulock3

    Mulock3

    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)
     
    shacharoz likes this.
  11. wuy420

    wuy420

    Joined:
    Apr 22, 2019
    Posts:
    17
    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:))
     
    q6gong and yahav273 like this.
  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
     
    cha_boy_nate and rcp140875 like this.
  13. richiekotwal

    richiekotwal

    Joined:
    May 29, 2020
    Posts:
    1
    Just delete the apks and do it
     
  14. cha_boy_nate

    cha_boy_nate

    Joined:
    Jul 22, 2015
    Posts:
    3
    Had the same issue after initializing a custom build Gradle, still not sure what caused the issue.

    I deleted the out apk from my phone (where I was running the build), restarted my phone, and re-build the game; now everything works as expected.
     
  15. myerpheus

    myerpheus

    Joined:
    Apr 4, 2019
    Posts:
    1
    It's August 2020 and still having these issues, even Oculus are retiring the Go.
     
  16. SanyaD115

    SanyaD115

    Joined:
    Jul 22, 2020
    Posts:
    1
    This error disappeared for me when I set the Minimum API Level value on my device to, before that the value was higher.
     
  17. mostafanastary

    mostafanastary

    Joined:
    Oct 4, 2015
    Posts:
    31
    DMorock and Toscan0 like this.
  18. DMorock

    DMorock

    Joined:
    Mar 26, 2015
    Posts:
    9
    Had the same problem. Tried everything from this tred, and at least solved by setting in Player settings as mentioned in
    mostafanastary reply link (thank you for that link!):
    Scripting backend: IL2CPP
    Api compatibility level: .NET Standard 2.0
    Target Architectures: ARMv7, ARM64, x86 (deprecated).
    Install location: Automatic
    Write Permission: Internal

    It's seems to me, there must be some gide in Unity docs with all this suggestions "What to do, if could not launch on Android debug". The https://docs.unity3d.com/ru/current/Manual/TroubleShootingAndroid.html suggests nothing useful. "Installing to an incompatible device" or "Installing to a device running a version of Android lower than the Minimum API Level in your Player settings". Looking for a simple answer to a frequent question for several days is somewhat discouraging.
     
  19. shacharoz

    shacharoz

    Joined:
    Jul 11, 2013
    Posts:
    98
    this was my solution!!!
     
    nathanfosborn and rbitard like this.
  20. SamohtVII

    SamohtVII

    Joined:
    Jun 30, 2014
    Posts:
    370
    I had to untick this
    upload_2022-9-27_17-2-9.png
     
  21. RSH1

    RSH1

    Joined:
    Jul 9, 2012
    Posts:
    256
    Having the same problem. Deleting the app on the device works but I shouldn't have to do this every build.
     
  22. Deltigre

    Deltigre

    Unity Technologies

    Joined:
    Sep 13, 2022
    Posts:
    36
    @RSH1 can you provide more information? Which Oculus/Meta headset are you using? Which version of Unity?
     
  23. junedmmn

    junedmmn

    Joined:
    Dec 19, 2016
    Posts:
    15
    I was getting this error along with com.android.ddmlib.InstallException: Failed to establish session. Hence I freed up some space and it worked. Just free up some space ie. free up 600MB + Space required for your app after installation + size of your app bundle (APK or AAB as the bundle is copied to the device before installation).
     
    Deltigre likes this.
  24. naktu

    naktu

    Joined:
    Jul 11, 2019
    Posts:
    10
    For me it was the usb tethering. Once I shut off Internet sharing via USB . problem vanished.
     
  25. JVimes

    JVimes

    Joined:
    Jan 3, 2022
    Posts:
    10
    I was accidentally building an .abb file. I had "Build App Bundle (Google Play)" checked.
     
  26. Rachan

    Rachan

    Joined:
    Dec 3, 2012
    Posts:
    781
    I had the same issue! and still don't know what happen?
     
  27. mrblasto

    mrblasto

    Joined:
    Dec 2, 2016
    Posts:
    5
    I had this same error. Fixed it by going to settings/apps on my device and selecting the unity app, then uninstalling from there. Uninstalling from the home page or app listings on device doesn't work, it must be done from settings. I've noticed the failure to re-install on non-unity apps as well - if developing apps for android, uninstall from settings.