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".
slouken@4965
     1
<?xml version="1.0" encoding="utf-8"?>
slouken@6838
     2
<!-- Replace org.libsdl.app with the identifier of your game below, e.g.
slouken@6838
     3
     com.gamemaker.game
slouken@6838
     4
-->
slouken@4965
     5
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
slouken@4965
     6
      package="org.libsdl.app"
slouken@4965
     7
      android:versionCode="1"
slouken@6631
     8
      android:versionName="1.0"
slouken@6631
     9
      android:installLocation="auto">
slouken@6392
    10
slouken@6631
    11
    <!-- Create a Java class extending SDLActivity and place it in a
slouken@6631
    12
         directory under src matching the package, e.g.
slouken@6631
    13
         	src/com/gamemaker/game/MyGame.java
slouken@6392
    14
slouken@6632
    15
         then replace "SDLActivity" with the name of your class (e.g. "MyGame")
slouken@6632
    16
         in the XML below.
slouken@6631
    17
slouken@6632
    18
         An example Java class can be found in README.android
slouken@6631
    19
    -->
slouken@6631
    20
    <application android:label="@string/app_name"
slouken@6631
    21
                 android:icon="@drawable/icon"
slouken@6631
    22
	         android:theme="@android:style/Theme.NoTitleBar.Fullscreen">
slouken@4965
    23
        <activity android:name="SDLActivity"
slouken@4965
    24
                  android:label="@string/app_name">
slouken@4965
    25
            <intent-filter>
slouken@4965
    26
                <action android:name="android.intent.action.MAIN" />
slouken@4965
    27
                <category android:name="android.intent.category.LAUNCHER" />
slouken@4965
    28
            </intent-filter>
slouken@4965
    29
        </activity>
slouken@4965
    30
    </application>
slouken@6631
    31
slouken@6631
    32
    <!-- Android 2.1 -->
slouken@6631
    33
    <uses-sdk android:minSdkVersion="10" /> 
slouken@6631
    34
slouken@6631
    35
    <!-- OpenGL ES 2.0 -->
slouken@6631
    36
    <uses-feature android:glEsVersion="0x00020000" /> 
slouken@6631
    37
slouken@6631
    38
    <!-- Allow writing to external storage -->
slouken@6631
    39
    <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" /> 
slouken@4965
    40
</manifest>