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. We have updated the language to the Editor Terms based on feedback from our employees and community. Learn more.
    Dismiss Notice

Android Manifest on 2019.3

Discussion in 'Android' started by HouseFrog, Dec 7, 2019.

  1. HouseFrog

    HouseFrog

    Joined:
    Jan 14, 2016
    Posts:
    31
    Hey!

    When adding a custom AndroidManifest in /plugins/android the app wont show up or run after install, it's still displayed in settings/apps.

    This started happening after installing 2019.3, I now get same result with 2019.2.14 which is strange.

    Tried on another device + creating apk from my other computer same result.


    /T
     
    Last edited: Dec 7, 2019
  2. HouseFrog

    HouseFrog

    Joined:
    Jan 14, 2016
    Posts:
    31
    Turns out the format on my manifest was wrong, here's a working example manifest:

    <?xml version="1.0" encoding="utf-8"?>
    <manifest xmlns:android="http://schemas.android.com/apk/res/android" package="com.example.unity" xmlns:tools="http://schemas.android.com/tools" android:versionName="1.0" android:versionCode="1" android:installLocation="preferExternal">
    <supports-screens android:smallScreens="true" android:normalScreens="true" android:largeScreens="true" android:xlargeScreens="true" android:anyDensity="true" />
    <uses-sdk android:minSdkVersion="14" android:targetSdkVersion="25" />

    <!-- Features -->
    <uses-feature android:glEsVersion="0x00020000" />
    <uses-feature android:name="android.hardware.vulkan" android:required="false" />
    <uses-feature android:name="android.hardware.touchscreen" android:required="false" />
    <uses-feature android:name="android.hardware.touchscreen.multitouch" android:required="false" />
    <uses-feature android:name="android.hardware.touchscreen.multitouch.distinct" android:required="false" />

    <!-- Permissions -->
    <uses-permission android:name="android.permission.INTERNET" />
    <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
    <uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
    <uses-permission android:name="com.google.android.ACCESS_FINE_LOCATION" />

    <application
    android:theme="@StyLe/UnityThemeSelector"
    android:icon="@drawable/app_icon"
    android:label="@String/app_name"
    android:debuggable="false"
    android:isGame="true"
    tools:replace="android:theme"
    >

    <!-- Unity -->
    <activity
    android:name="com.unity3d.player.UnityPlayerActivity"
    android:label="@String/app_name"
    android:screenOrientation="fullSensor"
    android:launchMode="singleTask"
    android:configChanges="mcc|mnc|locale|touchscreen|keyboard|keyboardHidden|navigation|orientation|screenLayout|uiMode|screenSize|smallestScreenSize|fontScale|layoutDirection">
    <intent-filter>
    <action android:name="android.intent.action.MAIN" />
    <category android:name="android.intent.category.LAUNCHER" />
    <category android:name="android.intent.category.LEANBACK_LAUNCHER" />
    </intent-filter>
    <meta-data
    android:name="unityplayer.UnityActivity"
    android:value="true" />
    </activity>

    </application>
    </manifest>
     
    unity_vseNGH8i07Bdlw likes this.
  3. unity_vseNGH8i07Bdlw

    unity_vseNGH8i07Bdlw

    Joined:
    Apr 27, 2020
    Posts:
    1
    Have you find a solution ? I have the same problem.