<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.example.testmoney"
android:versionCode="1"
android:versionName="1.0" >
<uses-sdk
android:minSdkVersion="14"
android:targetSdkVersion="19" />
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<application
android:allowBackup="true"
android:icon="@drawable/ic_launcher"
android:label="@string/app_name"
android:theme="@style/AppTheme" >
<activity
android:name="com.example.testmoney.MainActivity"
android:label="@string/app_name" >
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<service android:name="com.<sdpackagename>.ReEngagementService" >
</service>
<service android:name="com.<sdkpackagename>.AdBootReceiverService" >
</service>
<receiver android:name="<sdkpackagename>.ReEngagement" >
<receiver android:name="<com.example.testmoney>.BootReceiver" >
<intent-filter>
<action android:name="android.intent.action.BOOT_COMPLETED" />
</intent-filter>
</receiver>
</receiver>
</application>
答案 0 :(得分:1)
正确的清单是(您已将结束标记放置在错误的位置,请确保将<sdkpackagename>
替换为有效名称):
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.example.testmoney"
android:versionCode="1"
android:versionName="1.0" >
<uses-sdk
android:minSdkVersion="14"
android:targetSdkVersion="19" />
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<application
android:allowBackup="true"
android:icon="@drawable/ic_launcher"
android:label="@string/app_name"
android:theme="@style/AppTheme" >
<activity
android:name="com.example.testmoney.MainActivity"
android:label="@string/app_name" >
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<service android:name="com.<sdpackagename>.ReEngagementService">
</service>
<service android:name="com.<sdkpackagename>.AdBootReceiverService">
</service>
<receiver android:name="com.<sdkpackagename>.ReEngagement">
</receiver>
<receiver android:name="com.example.testmoney.BootReceiver" >
<intent-filter>
<action android:name="android.intent.action.BOOT_COMPLETED" />
</intent-filter>
</receiver>
</application>
</manifest>
答案 1 :(得分:0)
我认为问题是这四行:
<service android:name="com.<sdpackagename>.ReEngagementService" >
</service>
<service android:name="com.<sdkpackagename>.AdBootReceiverService" >
</service>
<receiver android:name="<sdkpackagename>.ReEngagement" >
<receiver android:name="<com.example.testmoney>.BootReceiver" >
删除每行中的<
和第一个>
,它应该有效。
编辑:试试这个
<uses-sdk
android:minSdkVersion="14"
android:targetSdkVersion="19" />
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<application
android:allowBackup="true"
android:icon="@drawable/ic_launcher"
android:label="@string/app_name"
android:theme="@style/AppTheme" >
<activity
android:name="com.example.testmoney.MainActivity"
android:label="@string/app_name" >
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<service android:name="com.<sdpackagename>.ReEngagementService" >
</service>
<service android:name="com.<sdkpackagename>.AdBootReceiverService" >
</service>
<receiver android:name="<sdkpackagename>.ReEngagement" >
</receiver>
<receiver android:name="<com.example.testmoney>.BootReceiver" >
<intent-filter>
<action android:name="android.intent.action.BOOT_COMPLETED" />
</intent-filter>
</receiver>
</application>