Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. Unity 2022.2 is now available as the latest Tech release.
    Dismiss Notice
  3. We are making some changes to the DOTS forums.
    Dismiss Notice
  4. Have a look at our Games Focus blog post series which will show what Unity is doing for all game developers – now, next year, and in the future.
    Dismiss Notice

Unable to find unity activity in manifest, manually set orientation?

Discussion in 'Android' started by scott5678, Jan 9, 2014.

  1. scott5678

    scott5678

    Joined:
    May 15, 2013
    Posts:
    13
    I'm trying to develop on Google Glass, and I followed in advice on this StackOverflow question to set up the project: http://stackoverflow.com/questions/20575634/unity3d-glass-development-kit-preview

    Before I try to modify the AndroidManifest.xml, I can successfully click Build and Run and the app starts on the Glass. I needed to modify the manifest to add the necessary voice command intents:

    Code (csharp):
    1.  
    2. <activity android:launchMode="singleTask" android:label="@string/app_name" android:configChanges="fontScale|keyboard|keyboardHidden|locale|mnc|mcc|navigation|orientation|screenLayout|screenSize|smallestScreenSize|uiMode|touchscreen" android:screenOrientation="landscape" android:name="com.equipcodes.unity1.UnityPlayerProxyActivity">
    3.       <intent-filter>
    4.         <action android:name="android.intent.action.MAIN" />
    5.         <category android:name="android.intent.category.LAUNCHER" />
    6.       </intent-filter>
    7.      <intent-filter>
    8.         <action android:name="com.google.android.glass.action.VOICE_TRIGGER" />
    9.       </intent-filter>
    10.      <meta-data android:name="com.google.android.glass.VoiceTrigger" android:resource="@xml/my_voice_trigger" />
    11.     </activity>
    I made modifications to the AndroidManifest generated in the export from the build, and then copied the file back into Assets/Plugins/Android/

    I can then export to eclipse and run fine, but when I try to just "Build and Run" from the build menu, I get the following error:

    Code (csharp):
    1. Unable to find unity activity in manifest. You need to make sure orientation attribut is set to landscape manually. UnityEditor.HostView:OnGUI()
    There's something about clicking build and run that's different from exporting and then running from eclipse.
     
  2. bitter

    bitter

    Unity Technologies

    Joined:
    Jan 11, 2012
    Posts:
    530
    That should not be an error - just a warning. Basically it's telling you that because you are not using the standard unity activities the editor doesn't know what manifest attributes to patch so you have t make sure they are correctly specified in your AndroidManifest.xml file. For instance if you were to select portrait as the orientation in the editor your application would still load in landscape mode because that is what you have specified in your custom manifest.
     
  3. DmitriyUKR

    DmitriyUKR

    Joined:
    Nov 15, 2013
    Posts:
    2
    Thanks,but I have a crash, and I decided that warning and socket errors was the reason of it