| 1 | <?xml version="1.0" encoding="utf-8"?> |
| 2 | <!-- BEGIN_INCLUDE(manifest) --> |
| 3 | |
| 4 | <!-- Required for custom Java code: |
| 5 | - android:hasCode="true" |
| 6 | - android:name="io.castleengine.MainActivity" |
| 7 | --> |
| 8 | |
| 9 | <manifest xmlns:android="http://schemas.android.com/apk/res/android" |
| 10 | android:installLocation="auto"> |
| 11 | |
| 12 | <!-- See http://developer.android.com/reference/android/app/NativeActivity.html |
| 13 | for example manifest using NativeActivity. |
| 14 | See https://guides.gameanalytics.com/content/sdk?page=android&step=2 |
| 15 | about android:configChanges notes. |
| 16 | --> |
| 17 | <application |
| 18 | android:label="@string/app_name" |
| 19 | android:icon="@mipmap/ic_launcher" |
| 20 | android:hasCode="true"> |
| 21 | <activity android:name="io.castleengine.MainActivity" |
| 22 | android:theme="@style/AppTheme" |
| 23 | android:launchMode="singleTask" |
| 24 | android:configChanges="orientation|screenSize|keyboardHidden" |
| 25 | android:screenOrientation="${ANDROID_SCREEN_ORIENTATION}" |
| 26 | android:exported="true"> |
| 27 | <!-- NativeActivity must know the name of our library with JNI callbacks. --> |
| 28 | <meta-data android:name="android.app.lib_name" |
| 29 | android:value="${ANDROID_LIBRARY_NAME}" /> |
| 30 | <intent-filter> |
| 31 | <action android:name="android.intent.action.MAIN" /> |
| 32 | <category android:name="android.intent.category.LAUNCHER" /> |
| 33 | </intent-filter> |
| 34 | ${ANDROID_ASSOCIATE_DOCUMENT_TYPES} |
| 35 | </activity> |
| 36 | </application> |
| 37 | |
| 38 | <!-- |
| 39 | Without the line about android:minSdkVersion, we get a warning: |
| 40 | Android NDK: WARNING: APP_PLATFORM android-16 is higher than android:minSdkVersion 1 in ./AndroidManifest.xml. NDK binaries will *not* be compatible with devices older than android-16. See https://android.googlesource.com/platform/ndk/+/master/docs/user/common_problems.md for more information. |
| 41 | |
| 42 | With this line, we get an error on latest Android Gradle Plugin 4.1.0: |
| 43 | Caused by: com.android.builder.errors.EvalIssueException: Failed to parse XML in /mnt/data-linux/sources/cat-astrophe-games/unholy_society/trunk/castle-engine-output/android/project/app/src/main/AndroidManifest.xml |
| 44 | The minSdk version should not be declared in the android manifest file. You can move the version from the manifest to the defaultConfig in the build.gradle file. |
| 45 | |
| 46 | The error makes sense, indeed this information is also duplicated in build.gradle. |
| 47 | --> |
| 48 | <!-- |
| 49 | <uses-sdk android:minSdkVersion="${ANDROID_MIN_SDK_VERSION}" /> |
| 50 | --> |
| 51 | |
| 52 | |
| 53 | <uses-feature android:glEsVersion="0x00020000"/> |
| 54 | |
| 55 | ${ANDROID_SCREEN_ORIENTATION_FEATURE} |
| 56 | </manifest> |
| 57 | <!-- END_INCLUDE(manifest) --> |