我从互联网购买应用程序(甲虫游戏)编辑它..但当我运行应用程序 这个消息在我看来
Error:Execution failed for task ':app:processDebugManifest'.
> Manifest merger failed : uses-sdk:minSdkVersion 1 cannot be smaller than version 9 declared in library /Users/omar/Downloads/BeetleGame1/app/build/intermediates/exploded-aar/com.google.android.gms/play-services/7.5.0/AndroidManifest.xml
Suggestion: use tools:overrideLibrary="com.google.android.gms.all" to force usage
build.grade(项目:beetlegame1)
// Top-level build file where you can add configuration options common to all sub-projects/modules.
buildscript {
repositories {
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:1.2.3'
}
}
allprojects {
repositories {
jcenter()
}
}
build.grade(模块:应用)
apply plugin: 'com.android.application'
android {
compileSdkVersion 19
buildToolsVersion "23.0.0 rc2"
defaultConfig {
applicationId "com.game"
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_5
targetCompatibility JavaVersion.VERSION_1_5
}
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.txt'
}
}
}
dependencies {
compile 'com.google.android.gms:play-services:+'
}
build.grade(模块:谷歌播放服务-IIb)的
configurations.create("default")
artifacts.add("default", file('google-play-services_lib.jar'))
我可以附加下载应用程序游戏的链接,我有......看到它:)
答案 0 :(得分:21)
导入的库google play服务有一个指定为9的minsdk,而你似乎是针对更低版本。要覆盖它,您需要在tools:overrideLibrary
文件中添加AndroidManifest.xml
包名称,这将忽略指定的minSDK版本库。
<?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="your package name">
<uses-sdk tools:overrideLibrary="com.google.android.gms.all"/>
--------------------------------
--------------------------------
</manifest>
工具:覆盖图书馆标记
一个特殊标记,只能与uses-sdk声明一起使用 覆盖导入最近SDK版本最新的库 比该应用程序的最低SDK版本。没有这样的标记, 清单合并将失败。标记将允许用户选择 可以导入哪些库而忽略最低SDK版本。
答案 1 :(得分:11)
<uses-sdk
android:minSdkVersion="8"
android:targetSdkVersion="22"
tools:overrideLibrary="
com.google.android.gms.all,
com.google.android.gms.ads,
com.google.android.gms.auth,
com.google.android.gms.base,
com.google.android.gms.measurement,
com.google.android.gms,
com.google.android.gms.analytics,
com.google.android.gms.appindexing,
com.google.android.gms.appinvite,
com.google.android.gms.appstate,
com.google.android.gms.cast,
com.google.android.gms.drive,
com.google.android.gms.fitness,
com.google.android.gms.location,
com.google.android.gms.maps,
com.google.android.gms.games,
com.google.android.gms.gcm,
com.google.android.gms.identity,
com.google.android.gms.nearby,
com.google.android.gms.panorama,
com.google.android.gms.plus,
com.google.android.gms.safetynet,
com.google.android.gms.wallet,
com.google.android.gms.wearable" />
答案 2 :(得分:4)
您收到此错误是因为您未在minSdkVersion
的{{1}}文件中声明app
:
build.gradle
答案 3 :(得分:1)
答案 4 :(得分:0)
打开Android Studio - &gt;打开清单文件
添加不要忘记在标记之前包含xmlns:tools =“http://schemas.android.com/tools”
<uses-sdk tools:overrideLibrary="com.google.android.gms.all"/>
答案 5 :(得分:0)
在manifest.xml中使用此代码
<uses-sdk
android:minSdkVersion="10"
android:maxSdkVersion="14"
tools:overrideLibrary="x"/>