Android Question Error in Manifest

GMan

Well-Known Member
Licensed User
Longtime User
Hoi,
i "suddenly" got an error while compiling:
AndroidManifest.xml:47: error: Error parsing XML: XML or Text declaration not at start of entity

Here is the depenging part in the manifest:
B4X:
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
  package="zjp.b4a.test01"
  android:versionCode="1"
  android:versionName=""
  android:installLocation="preferExternal">
  <uses-sdk android:minSdkVersion="4" />
  <uses-permission android:name="android.permission.CALL_PHONE" />
 
  <supports-screens
      android:largeScreens="true"
      android:normalScreens="true"
      android:smallScreens="false"   -------------->>>>>>>>>>>>>> ERROR LINE 47
      android:anyDensity="true"/>
    <application android:icon="@drawable/icon" android:label="MonTest">
      <activity android:name=".main"
        android:label="MonTest" android:screenOrientation="unspecified">
        <intent-filter>
            <action android:name="android.intent.action.MAIN" />
            <category android:name="android.intent.category.LAUNCHER" />
        </intent-filter>
      </activity>
    </application>
   
</manifest>
 

GMan

Well-Known Member
Licensed User
Longtime User
Here it is:
B4X:
'This code will be applied to the manifest file during compilation.
'You do not need to modify it in most cases.
'See this link for for more information: http://www.b4x.com/forum/showthread.php?p=78136
AddManifestText(
<uses-sdk android:minSdkVersion="4" android:targetSdkVersion="19"/>
<supports-screens android:largeScreens="true"
    android:normalScreens="true"
    android:smallScreens="true"
    android:anyDensity="false"/>
    <uses-permission android:name="android.permission.ACCESS_NETWORK_STATE"/>
    <uses-permission android:name="android.permission.INTERNET"/>
 
    <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
    <uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />
 
    <uses-permission android:name="android.permission.READ_PHONE_STATE"/>
    <uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION"/>
    <uses-permission android:name="android.permission.ACCESS_FINE_LOCATION"/>
    <uses-permission android:name="android.permission.ACCESS_LOCATION_EXTRA_COMMANDS"/>
 
    <uses-permission android:name="android.permission.WAKE_LOCK" />
    <uses-permission android:name="android.permission.RECEIVE_BOOT_COMPLETED" />)
 
SetApplicationAttribute(android:icon, "@drawable/icon")
SetApplicationAttribute(android:label, "$LABEL$")
'End of default text.
'End of default text.
'AdMob
AddApplicationText(
<activity android:name="com.google.ads.AdActivity"
  android:configChanges="keyboard|keyboardHidden|orientation|screenLayout|uiMode|screenSize|smallestScreenSize"/>

  <?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
  package="zjp.b4a.test01"
  android:versionCode="1"
  android:versionName=""
  android:installLocation="preferExternal">
  <uses-sdk android:minSdkVersion="4" />
  <uses-permission android:name="android.permission.CALL_PHONE" />

  <supports-screens
      android:largeScreens="true"
      android:normalScreens="true"
      android:smallScreens="false"
      android:anyDensity="true"/>
    <application android:icon="@drawable/icon" android:label="MonTest">
      <activity android:name=".main"
        android:label="MonTest" android:screenOrientation="unspecified">
        <intent-filter>
            <action android:name="android.intent.action.MAIN" />
            <category android:name="android.intent.category.LAUNCHER" />
        </intent-filter>
      </activity>
    </application>
 
</manifest>
)

btw: the eroor appears always, no matter if there is a line 47 (so i think, the 47 is an error code and not the line ?)
 
Upvote 0

GMan

Well-Known Member
Licensed User
Longtime User
OK, it already worked - seems, that i have typed somewhere a sign or so that now causes the error.

Do the part new from the scratch
 
Upvote 0
Cookies are required to use this site. You must accept them to continue using the site. Learn more…