android-project/AndroidManifest.xml
author Sam Lantinga <slouken@libsdl.org>
Fri, 08 Feb 2013 01:12:48 -0800
changeset 6838 abd1407af1f9
parent 6632 147f85ac2e4b
child 6961 3ef29a1398ed
permissions -rw-r--r--
Fixed bug 1711 - Comment in "manifest" element within android-project/AndroidManifest.xml is the source of troubles ny00@outlook.com Let me quote the following opening tag from android-project/AndroidManifest.xml: <manifest xmlns:android="http://schemas.android.com/apk/res/android" <!-- Replace org.libsdl.app with the identifier of your game, e.g. com.gamemaker.game --> package="org.libsdl.app" android:versionCode="1" android:versionName="1.0" android:installLocation="auto"> The comment (with the text "Replace org.libsdl.app with...") seems to be a cause of troubles. Here are a few examples I've spotted: 1) While using nkd-build from android-ndk-r8d, I receive the following error: Invalid attribute name: <!-- replace org.libsdl.app with the identifier of your game, e.g. com.gamemaker.game -- /home/ny00123/util/android-ndk-r8d/build/gmsl/__gmsl:512: *** non-numeric second argument to `wordlist' function: ''. Stop. 2) Repeating this but with android-ndk-r6b (an earlier revision), it reduces to a warning and actual complication is not halted. 3) Following the instructions in README.android and using Eclipse (from a recently downloaded ADT Bundle), I cannot seem to be able to create an Android project from existing sources (one of the SDL test apps for now). * On a side note, I can't find where I may choose the "Build Target" before clicking "Finish", but it does not seem to be related to this bug report. Anyway, following the choice of the project path and a click on "Finish", nothing seems to occur. If I rather do so after removing the above comment from AndroidManifest.xml, though, the project appears on Eclipse as expected once I click on "Finish".
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
4965
91d0085b7560 Added the Android project and lots of info to README.android
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
     1
<?xml version="1.0" encoding="utf-8"?>
6838
abd1407af1f9 Fixed bug 1711 - Comment in "manifest" element within android-project/AndroidManifest.xml is the source of troubles
Sam Lantinga <slouken@libsdl.org>
parents: 6632
diff changeset
     2
<!-- Replace org.libsdl.app with the identifier of your game below, e.g.
abd1407af1f9 Fixed bug 1711 - Comment in "manifest" element within android-project/AndroidManifest.xml is the source of troubles
Sam Lantinga <slouken@libsdl.org>
parents: 6632
diff changeset
     3
     com.gamemaker.game
abd1407af1f9 Fixed bug 1711 - Comment in "manifest" element within android-project/AndroidManifest.xml is the source of troubles
Sam Lantinga <slouken@libsdl.org>
parents: 6632
diff changeset
     4
-->
4965
91d0085b7560 Added the Android project and lots of info to README.android
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
     5
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
91d0085b7560 Added the Android project and lots of info to README.android
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
     6
      package="org.libsdl.app"
91d0085b7560 Added the Android project and lots of info to README.android
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
     7
      android:versionCode="1"
6631
47ab7ba21530 Updated the Android project template and README.android
Sam Lantinga <slouken@libsdl.org>
parents: 6392
diff changeset
     8
      android:versionName="1.0"
47ab7ba21530 Updated the Android project template and README.android
Sam Lantinga <slouken@libsdl.org>
parents: 6392
diff changeset
     9
      android:installLocation="auto">
47ab7ba21530 Updated the Android project template and README.android
Sam Lantinga <slouken@libsdl.org>
parents: 6392
diff changeset
    10
47ab7ba21530 Updated the Android project template and README.android
Sam Lantinga <slouken@libsdl.org>
parents: 6392
diff changeset
    11
    <!-- Create a Java class extending SDLActivity and place it in a
47ab7ba21530 Updated the Android project template and README.android
Sam Lantinga <slouken@libsdl.org>
parents: 6392
diff changeset
    12
         directory under src matching the package, e.g.
47ab7ba21530 Updated the Android project template and README.android
Sam Lantinga <slouken@libsdl.org>
parents: 6392
diff changeset
    13
         	src/com/gamemaker/game/MyGame.java
47ab7ba21530 Updated the Android project template and README.android
Sam Lantinga <slouken@libsdl.org>
parents: 6392
diff changeset
    14
6632
147f85ac2e4b Simplified the manifest a little - we don't need a Java class in there. :)
Sam Lantinga <slouken@libsdl.org>
parents: 6631
diff changeset
    15
         then replace "SDLActivity" with the name of your class (e.g. "MyGame")
147f85ac2e4b Simplified the manifest a little - we don't need a Java class in there. :)
Sam Lantinga <slouken@libsdl.org>
parents: 6631
diff changeset
    16
         in the XML below.
6392
fa7eb111f994 Fixed bug 1564 - SDL has no function to open a screen keyboard on Android.
Sam Lantinga <slouken@libsdl.org>
parents: 4965
diff changeset
    17
6632
147f85ac2e4b Simplified the manifest a little - we don't need a Java class in there. :)
Sam Lantinga <slouken@libsdl.org>
parents: 6631
diff changeset
    18
         An example Java class can be found in README.android
6631
47ab7ba21530 Updated the Android project template and README.android
Sam Lantinga <slouken@libsdl.org>
parents: 6392
diff changeset
    19
    -->
47ab7ba21530 Updated the Android project template and README.android
Sam Lantinga <slouken@libsdl.org>
parents: 6392
diff changeset
    20
    <application android:label="@string/app_name"
47ab7ba21530 Updated the Android project template and README.android
Sam Lantinga <slouken@libsdl.org>
parents: 6392
diff changeset
    21
                 android:icon="@drawable/icon"
47ab7ba21530 Updated the Android project template and README.android
Sam Lantinga <slouken@libsdl.org>
parents: 6392
diff changeset
    22
	         android:theme="@android:style/Theme.NoTitleBar.Fullscreen">
4965
91d0085b7560 Added the Android project and lots of info to README.android
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
    23
        <activity android:name="SDLActivity"
91d0085b7560 Added the Android project and lots of info to README.android
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
    24
                  android:label="@string/app_name">
91d0085b7560 Added the Android project and lots of info to README.android
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
    25
            <intent-filter>
91d0085b7560 Added the Android project and lots of info to README.android
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
    26
                <action android:name="android.intent.action.MAIN" />
91d0085b7560 Added the Android project and lots of info to README.android
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
    27
                <category android:name="android.intent.category.LAUNCHER" />
91d0085b7560 Added the Android project and lots of info to README.android
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
    28
            </intent-filter>
91d0085b7560 Added the Android project and lots of info to README.android
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
    29
        </activity>
91d0085b7560 Added the Android project and lots of info to README.android
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
    30
    </application>
6631
47ab7ba21530 Updated the Android project template and README.android
Sam Lantinga <slouken@libsdl.org>
parents: 6392
diff changeset
    31
47ab7ba21530 Updated the Android project template and README.android
Sam Lantinga <slouken@libsdl.org>
parents: 6392
diff changeset
    32
    <!-- Android 2.1 -->
47ab7ba21530 Updated the Android project template and README.android
Sam Lantinga <slouken@libsdl.org>
parents: 6392
diff changeset
    33
    <uses-sdk android:minSdkVersion="10" /> 
47ab7ba21530 Updated the Android project template and README.android
Sam Lantinga <slouken@libsdl.org>
parents: 6392
diff changeset
    34
47ab7ba21530 Updated the Android project template and README.android
Sam Lantinga <slouken@libsdl.org>
parents: 6392
diff changeset
    35
    <!-- OpenGL ES 2.0 -->
47ab7ba21530 Updated the Android project template and README.android
Sam Lantinga <slouken@libsdl.org>
parents: 6392
diff changeset
    36
    <uses-feature android:glEsVersion="0x00020000" /> 
47ab7ba21530 Updated the Android project template and README.android
Sam Lantinga <slouken@libsdl.org>
parents: 6392
diff changeset
    37
47ab7ba21530 Updated the Android project template and README.android
Sam Lantinga <slouken@libsdl.org>
parents: 6392
diff changeset
    38
    <!-- Allow writing to external storage -->
47ab7ba21530 Updated the Android project template and README.android
Sam Lantinga <slouken@libsdl.org>
parents: 6392
diff changeset
    39
    <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" /> 
4965
91d0085b7560 Added the Android project and lots of info to README.android
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
    40
</manifest>