Search Unity

  1. If you have experience with import & exporting custom (.unitypackage) packages, please help complete a survey (open until May 15, 2024).
    Dismiss Notice
  2. Unity 6 Preview is now available. To find out what's new, have a look at our Unity 6 Preview blog post.
    Dismiss Notice

GearVR Manifest Issues? "OperationFailedException: No activity in the manifest with action MAIN..."

Discussion in 'AR/VR (XR) Discussion' started by tatea, Jul 26, 2017.

  1. tatea

    tatea

    Joined:
    Sep 1, 2015
    Posts:
    8
    I'm using 2017.1.0f3 and Oculus Utilities version 1.15 to attempt to 'Build & Run' a simple 360 video player prototype to a Note 4, which used to work fine with past apps built to GearVR - so I'm pretty sure it's not an issue with any USB drivers, developer mode etc. The app runs fine when I launch it manually via dragging a built .apk on the device and opening, so I believe it is not an osig issue either.

    Here is the console error I receive:

    And another parallel error:
    And here is what my manifest file looks like - I pulled it from a previous working build that didn't have this issue, albeit in Unity 5.6 - which I have since tested and not working with this build.

    I'm up to date on all Android SDK, JDK, NDK.

    Any thoughts on what could be causing this?
     
  2. adsilcott

    adsilcott

    Joined:
    Aug 30, 2014
    Posts:
    55
    I'm having the same issue. It goes away if I change it to <category android:name="android.intent.category.LAUNCHER>, but that's no longer allowed and crashes the app on launch. Did you ever find a solution?
     
  3. sterlingcrispin

    sterlingcrispin

    Joined:
    Oct 23, 2013
    Posts:
    18
    add this to the main activity in the android manifest file

    android:label="@string/app_name"


    and then change
    <category android:name="android.intent.category.INFO"/>

    to
    <category android:name="android.intent.category.LAUNCHER"/>

    Apparently for Oculus store releases it has to be on INFO but it won't run for debug purposes unless on LAUNCHER, I don't know if this is documented anywhere
     
    ilmario likes this.
  4. Truthveyor

    Truthveyor

    Joined:
    Mar 5, 2017
    Posts:
    9
    The fact that to publish on the Oculus Store the App Manifest must have android.intent.category.INFO, instead of android.internet.category.LAUNCHER is documented and explained here:
    https://developer.oculus.com/distribute/latest/concepts/publish-mobile-manifest/

    I have noticed that when you select in the Unity Editor Tools > Oculus > Create store-compatible AndroidManifest.xml, it will create a file called AndroidManifest.xml at this location: Assets/Plugins/Android/AndroidManifest.xml, and it will use android.intent.category.INFO, etc, in it, which overrides the default Unity-created Manifest. The documentation is here: https://docs.unity3d.com/Manual/and...386.468602356.1514460299-476734149.1499844936

    When you try to "build & run" your app on Gear VR, it will cause the error
    "OperationFailedException: No activity in the manifest with action MAIN..."

    Thus, to edit or develop your game, you can delete this file Assets/Plugins/Android/AndroidManifest.xml. This way you can build & run or test your app as you've used to.

    And when you are ready to publish on the Oculus Store, you can THEN do Tools > Oculus > Create store-compatible AndroidManifest.xml.
     
  5. jeff-smith

    jeff-smith

    Joined:
    Feb 24, 2012
    Posts:
    19
    This worked for me on the Oculus Go with Unity 2017.4.6. Thanks, Truthveyor.
     
  6. Truthveyor

    Truthveyor

    Joined:
    Mar 5, 2017
    Posts:
    9
    I'm glad it helped, NOAA_jeff. In fact, I'm about to push my app onto Oculus Go myself, so I'm glad to know it worked for you.
     
  7. masta-yoda

    masta-yoda

    Joined:
    Apr 19, 2020
    Posts:
    91
    I'm just disabling the custom manifest in the publishing settings for the debug build and whenever need to build a store package - check the box and the manifest will be applied for that particular package only.