1

My android manifest is returning an error: unexpected tokens. I can't fix it. Here is my android manifest:

<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:"http://schemas.android.com/apk/res/android" android:versionCode="10" android:versionName="0.0.1" android:hardwareAccelerated="true" package="com.weblogtemplates.material" platformBuildVersionCode="22" platformBuildVersionName="5.1.1-1819727">
<uses-sdk
android:minSdkVersion="10"
android:targetSdkVersion="22" /><supports-screens
android:anyDensity="true"
android:smallScreens="true"
android:normalScreens="true"
android:largeScreens="true"
android:resizeable="true"
android:xlargeScreens="true" />

<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<uses-permission android:name="android.permission.ACCESS_WIFI_STATE" />
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.GET_ACCOUNTS" />
<uses-permission android:name="android.permission.WAKE_LOCK" />
<uses-permission android:name="android.permission.VIBRATE" />
<uses-permission android:name="com.google.android.c2dm.permission.RECEIVE" />

<permission android:name="com.weblogtemplates.material.permission.C2D_MESSAGE"
android:protectionLevel="signature|signatureOrSystem" />
<uses-permission android:name="com.weblogtemplates.material.permission.C2D_MESSAGE" />
<application
android:label="@string/app_name"
android:icon="@drawable/icon"
android:debuggable="true"
android:hardwareAccelerated="true"
android:supportsRtl="true">
<activity
    android:theme="@*android:style/Theme.Black.NoTitleBar"
    android:label="@string/activity_name"
    android:name="com.weblogtemplates.material.MainActivity"
    android:launchMode="singleTop"
    android:configChanges="locale|keyboard|keyboardHidden|orientation|screenSize"
    android:windowSoftInputMode="10">
    <intent-filter android:label="@string/launcher_name">
        <action android:name="android.intent.action.MAIN" />
        <category android:name="android.intent.category.LAUNCHER" />
    </intent-filter>
</activity>
<meta-data
    android:name="com.google.android.gms.version"
    android:value="@integer/google_play_services_version" />

<activity
    android:theme="@*android:style/Theme.Translucent"
    android:name="com.google.android.gms.ads.AdActivity"
    android:configChanges="keyboard|keyboardHidden|orientation|screenLayout|uiMode|screenSize|smallestScreenSize" />
<activity
    android:name="com.plugin.gcm.PushHandlerActivity"
    android:exported="true" />

<receiver
    android:name="com.plugin.gcm.CordovaGCMBroadcastReceiver"
    android:permission="com.google.android.c2dm.permission.SEND">
    <intent-filter>
        <action android:name="com.google.android.c2dm.intent.RECEIVE" />
        <action android:name="com.google.android.c2dm.intent.REGISTRATION" />

        <category android:name="com.weblogtemplates.material" />
    </intent-filter>
</receiver>
<service android:name="com.plugin.gcm.GCMIntentService" />
</application></manifest>

How can I fix it?

Ravi
  • 34,851
  • 21
  • 122
  • 183
Ajay Kulkarni
  • 2,900
  • 13
  • 48
  • 97

4 Answers4

1

You have got an * after the @ in the theme of your MainActivity and Adactivity

Rockney
  • 10,380
  • 2
  • 20
  • 26
0

Hi this could be an error caused by invisible character which has been copied while you tried to copy the code from somewhere else. Probably the internet.You can delete the line where the error is pointed to and re type the line. It may help.

Raaja SN
  • 382
  • 3
  • 14
0

I think the problem with the line used to set the theme.

It should be

android:theme="@android:style/Theme.Black.NoTitleBar"
android:theme="@android:style/Theme.Translucent"

not

android:theme="@*android:style/Theme.Black.NoTitleBar"
android:theme="@*android:style/Theme.Translucent"
Kumar M
  • 994
  • 6
  • 21
0

Fixed it by removing unnecessary tags and invisible characters...
Took some time to figure out all :D

Ajay Kulkarni
  • 2,900
  • 13
  • 48
  • 97