如何修复清单合并因多个错误而失败
How fix manifest merger failed with multiple errors
首先在 cocos2dx/proj.android 上构建 eclipse 项目,我该如何修复它。
我用eclipse,Xcode没问题。
我的build.Gradle(模块:项目)
apply plugin: 'com.android.application'
android {
compileSdkVersion 19
buildToolsVersion "25.0.2"
aaptOptions {
cruncherEnabled = false
useNewCruncher = false
}
defaultConfig {
applicationId "com.sinotech.boaigame"
minSdkVersion 14
targetSdkVersion 16
ndk {
moduleName "cocos2dcpp_shared"
}
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.txt'
}
}
}
dependencies {
compile project(':libcocos2dx')
compile project(':yQY_PaymentSDK')
compile files('libs/DataEye_Cocos2d_v2.8.0.jar')
compile files('libs/JPay.jar')
compile files('libs/mobclickcpphelper.jar')
compile files('libs/umeng-update-v2.5.0.jar')
}
我的项目AndroidManifest.xml
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
package="com.sinotech.boaigame"
android:installLocation="auto"
android:versionCode="83"
android:versionName="8.3">
<uses-sdk android:minSdkVersion="14" />
<uses-feature android:glEsVersion="0x00020000" />
<uses-permission android:name="android.permission.ACCESS_WIFI_STATE" />
<uses-permission android:name="android.permission.CHANGE_WIFI_STATE" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<uses-permission android:name="android.permission.CHANGE_WIFI_STATE" />
<uses-permission android:name="android.permission.MOUNT_UNMOUNT_FILESYSTEMS" />
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.READ_PHONE_STATE" />
<uses-permission android:name="android.permission.MANAGE_ACCOUNTS" />
<uses-permission android:name="android.permission.GET_ACCOUNTS" />
<uses-permission android:name="android.permission.SEND_SMS" />
<uses-permission android:name="android.permission.DISABLE_KEYGUARD" />
<uses-permission android:name="android.permission.WRITE_SETTINGS" />
<uses-permission android:name="android.permission.WAKE_LOCK" />
<uses-permission android:name="android.permission.BATTERY_STATS" />
<uses-permission android:name="android.permission.ACCESS_WIFI_STATE"/>
<uses-permission android:name="android.permission.DOWNLOAD_WITHOUT_NOTIFICATION"/>
<application
android:icon="@drawable/icon"
android:label="@string/app_name"
tools:replace="icon, label, theme">
<!-- 友盟SDK的APPKEY和渠道号 -->
<meta-data
android:name="UMENG_APPKEY"
android:value="560369e667e58e8015004cbf_00" />
<meta-data android:value="8B24BA16A672F2821847FC1425036875" android:name="DC_APPID"></meta-data>
<meta-data android:value="hrhj" android:name="DC_CHANNEL"></meta-data>
<meta-data
android:name="UMENG_CHANNEL"
android:value="202" />
<!-- 友盟SDK的service -->
<service
android:name="com.umeng.update.net.DownloadingService"
android:process=":DownloadingService" >
</service>
<!-- 友盟SDK的update -->
<activity
android:name="com.umeng.update.UpdateDialogActivity"
android:theme="@android:style/Theme.Translucent.NoTitleBar" >
</activity> <!-- Tell Cocos2dxActivity the name of our .so -->
<!-- Tell Cocos2dxActivity the name of our .so -->
<meta-data
android:name="android.app.lib_name"
android:value="cocos2dcpp" />
<activity
android:name="org.cocos2dx.cpp.AppActivity"
android:configChanges="orientation"
android:label="@string/app_name"
android:screenOrientation="landscape"
android:theme="@android:style/Theme.NoTitleBar.Fullscreen" >
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
</application>
<supports-screens
android:anyDensity="true"
android:largeScreens="true"
android:normalScreens="true"
android:smallScreens="true"
android:xlargeScreens="true" />
</manifest>
以上代码是系统自动生成的AndroidManifest.xml文件。
我应该做哪些改变?
看过官方文档,但是看不懂:Merge Multiple Manifests
从清单文件中删除这些行:
android:installLocation="auto"
android:versionCode="83"
android:versionName="8.3"
<uses-sdk android:minSdkVersion="14" />
首先在 cocos2dx/proj.android 上构建 eclipse 项目,我该如何修复它。 我用eclipse,Xcode没问题。
我的build.Gradle(模块:项目)
apply plugin: 'com.android.application'
android {
compileSdkVersion 19
buildToolsVersion "25.0.2"
aaptOptions {
cruncherEnabled = false
useNewCruncher = false
}
defaultConfig {
applicationId "com.sinotech.boaigame"
minSdkVersion 14
targetSdkVersion 16
ndk {
moduleName "cocos2dcpp_shared"
}
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.txt'
}
}
}
dependencies {
compile project(':libcocos2dx')
compile project(':yQY_PaymentSDK')
compile files('libs/DataEye_Cocos2d_v2.8.0.jar')
compile files('libs/JPay.jar')
compile files('libs/mobclickcpphelper.jar')
compile files('libs/umeng-update-v2.5.0.jar')
}
我的项目AndroidManifest.xml
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
package="com.sinotech.boaigame"
android:installLocation="auto"
android:versionCode="83"
android:versionName="8.3">
<uses-sdk android:minSdkVersion="14" />
<uses-feature android:glEsVersion="0x00020000" />
<uses-permission android:name="android.permission.ACCESS_WIFI_STATE" />
<uses-permission android:name="android.permission.CHANGE_WIFI_STATE" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<uses-permission android:name="android.permission.CHANGE_WIFI_STATE" />
<uses-permission android:name="android.permission.MOUNT_UNMOUNT_FILESYSTEMS" />
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.READ_PHONE_STATE" />
<uses-permission android:name="android.permission.MANAGE_ACCOUNTS" />
<uses-permission android:name="android.permission.GET_ACCOUNTS" />
<uses-permission android:name="android.permission.SEND_SMS" />
<uses-permission android:name="android.permission.DISABLE_KEYGUARD" />
<uses-permission android:name="android.permission.WRITE_SETTINGS" />
<uses-permission android:name="android.permission.WAKE_LOCK" />
<uses-permission android:name="android.permission.BATTERY_STATS" />
<uses-permission android:name="android.permission.ACCESS_WIFI_STATE"/>
<uses-permission android:name="android.permission.DOWNLOAD_WITHOUT_NOTIFICATION"/>
<application
android:icon="@drawable/icon"
android:label="@string/app_name"
tools:replace="icon, label, theme">
<!-- 友盟SDK的APPKEY和渠道号 -->
<meta-data
android:name="UMENG_APPKEY"
android:value="560369e667e58e8015004cbf_00" />
<meta-data android:value="8B24BA16A672F2821847FC1425036875" android:name="DC_APPID"></meta-data>
<meta-data android:value="hrhj" android:name="DC_CHANNEL"></meta-data>
<meta-data
android:name="UMENG_CHANNEL"
android:value="202" />
<!-- 友盟SDK的service -->
<service
android:name="com.umeng.update.net.DownloadingService"
android:process=":DownloadingService" >
</service>
<!-- 友盟SDK的update -->
<activity
android:name="com.umeng.update.UpdateDialogActivity"
android:theme="@android:style/Theme.Translucent.NoTitleBar" >
</activity> <!-- Tell Cocos2dxActivity the name of our .so -->
<!-- Tell Cocos2dxActivity the name of our .so -->
<meta-data
android:name="android.app.lib_name"
android:value="cocos2dcpp" />
<activity
android:name="org.cocos2dx.cpp.AppActivity"
android:configChanges="orientation"
android:label="@string/app_name"
android:screenOrientation="landscape"
android:theme="@android:style/Theme.NoTitleBar.Fullscreen" >
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
</application>
<supports-screens
android:anyDensity="true"
android:largeScreens="true"
android:normalScreens="true"
android:smallScreens="true"
android:xlargeScreens="true" />
</manifest>
以上代码是系统自动生成的AndroidManifest.xml文件。
我应该做哪些改变?
看过官方文档,但是看不懂:Merge Multiple Manifests
从清单文件中删除这些行:
android:installLocation="auto"
android:versionCode="83"
android:versionName="8.3"
<uses-sdk android:minSdkVersion="14" />