Search Unity

Question AndroidManifest.xml Problem with app lab

Discussion in 'VR' started by ShadowZie, Dec 31, 2021.

  1. ShadowZie

    ShadowZie

    Joined:
    Nov 5, 2017
    Posts:
    70
    Hey, I am trying to upload my app into applab but it won't accept it
    I am getting this error :
    * ‎APK install location should be `auto` (android:installLocation in AndroidManifest.xml). See documentation at: https://developer.oculus.com/distribute/publish-mobile-manifest/‎
    and something about android:screenOrientation in AndroidManifest.xml

    I added both but its still not accepting it for some reason

    my AndroidManifest :

    Code (CSharp):
    1. <?xml version="1.0" encoding="utf-8" standalone="no"?>
    2. <manifest xmlns:android="http://schemas.android.com/apk/res/android" android:installLocation="auto">
    3.   <application android:label="@string/app_name" android:icon="@mipmap/app_icon" android:allowBackup="false">
    4.     <activity android:theme="@android:style/Theme.Black.NoTitleBar.Fullscreen" android:configChanges="locale|fontScale|keyboard|keyboardHidden|mcc|mnc|navigation|orientation|screenLayout|screenSize|smallestScreenSize|touchscreen|uiMode" android:screenOrientation="landscape" android:launchMode="singleTask" android:name="com.unity3d.player.UnityPlayerActivity" android:excludeFromRecents="true">
    5.       <intent-filter>
    6.   <action android:name="android.intent.action.MAIN" />
    7.   <category android:name="com.oculus.intent.category.VR" />
    8.   <category android:name="android.intent.category.LAUNCHER" />
    9.       </intent-filter>
    10.     </activity>
    11.     <meta-data android:name="unityplayer.SkipPermissionsDialog" android:value="false" />
    12.     <meta-data android:name="com.samsung.android.vr.application.mode" android:value="vr_only" />
    13.     <meta-data android:name="com.oculus.supportedDevices" android:value="quest|quest2" />
    14.     <meta-data android:name="com.oculus.vr.focusaware" android:value="true"/>
    15.   </application>
    16.   <uses-feature android:name="android.hardware.vr.headtracking" android:version="1" android:required="true" />
    17. </manifest>
    What do I need to change?
     
    masta-yoda likes this.
  2. glenneroo

    glenneroo

    Joined:
    Oct 27, 2016
    Posts:
    231
    Sometimes warning messages contain the relevant information to resolve your issue. In your case, listen to the warning and remove the section android:screenOrientation="landscape".
     
  3. ShadowZie

    ShadowZie

    Joined:
    Nov 5, 2017
    Posts:
    70
    Thanks but about android:screenOrientation in AndroidManifest.xml he wanted me to added it
    I sent with and without it and its still show me an error
     
  4. glenneroo

    glenneroo

    Joined:
    Oct 27, 2016
    Posts:
    231
    Did you verify the manifest is correct before uploading using aapt?

    This is how I use it (inside a batch script):
    "C:\Program Files\Unity\Hub\Editor\2020.3.22f1\Editor\Data\PlaybackEngines\AndroidPlayer\SDK\build-tools\30.0.2\aapt.exe" dump badging MyGame.apk

    Also while you're at it, make sure to verify the signing is correct before uploading:
    "C:\Program Files\Unity\Hub\Editor\2020.3.22f1\Editor\Data\PlaybackEngines\AndroidPlayer\SDK\build-tools\30.0.2\apksigner.bat" verify --verbose MyGame.apk
     
  5. ShadowZie

    ShadowZie

    Joined:
    Nov 5, 2017
    Posts:
    70
    Hey, thanks for helping me
    I tried both I am on win 11, the cmd just closing I check and the path is correct and the apk name is correct its just doing nothing
     
  6. glenneroo

    glenneroo

    Joined:
    Oct 27, 2016
    Posts:
    231
    Try opening a cmd as administrator and going to the directory of your apk and running those commands there instead of making a .bat script and running it so that you can see the errors.

    Alternatively, add "pause" command to your .bat script file at the end so that it doesn't close immediately.
     
  7. ShadowZie

    ShadowZie

    Joined:
    Nov 5, 2017
    Posts:
    70
    Thank you the first one saying that dump is unsupported command

    the second one worked
    Verifies
    Verified using v1 scheme (JAR signing): true
    Verified using v2 scheme (APK Signature Scheme v2): true
    Verified using v3 scheme (APK Signature Scheme v3): false
    Verified using v4 scheme (APK Signature Scheme v4): false
    Verified for SourceStamp: false
    Number of signers: 1
    is it good?