BaseGameUtils模块导致运行时异常

时间:2016-08-15 01:44:15

标签: android runtimeexception

我正在关注“在您的Android游戏中访问Play游戏服务API”的Google教程。作为本教程的一部分,我被指示添加BaseGameUtils模块,但是当我这样做时,我在编译期间收到以下错误:

错误:任务执行失败':BaseGameUtils:processDebugAndroidTestManifest'。 java.lang.RuntimeException:清单合并失败:uses-sdk:minSdkVersion 1不能小于库中声明的版本7

建议:使用工具:overrideLibrary =“android.support.v7.appcompat”强制使用

我尝试了这个建议^我尝试实施所有其他解决方案。我还尝试删除模块,重新下载并重新添加。

这是我的build.gradle(Module:app)文件:

apply plugin: 'com.android.application'

android {
    compileSdkVersion 23
    buildToolsVersion "24.0.1"

    defaultConfig {
        multiDexEnabled true
        applicationId "com.example.matan.real"
        minSdkVersion 19
        targetSdkVersion 23
        versionCode 1
        versionName "1.0"
    }
    buildTypes {
        release {
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
        }
    }
}

dependencies {
    compile fileTree(dir: 'libs', include: ['*.jar'])
    testCompile 'junit:junit:4.12'
    compile 'com.android.support:appcompat-v7:23.+'
    compile 'com.google.android.gms:play-services:9.4.0'
    compile 'com.android.support:multidex:1.0.0'
    compile project(':BaseGameUtils')
}

这是我的Android Manifest:

<?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.example.matan.real">

    <uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
    <uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" />
    <uses-sdk tools:overrideLibrary="com.google.android.gms.all"/>

    <application
        android:allowBackup="true"
        android:icon="@mipmap/ic_launcher"
        android:label="@string/app_name"
        android:supportsRtl="true"
        android:theme="@style/AppTheme"
        android:name="android.support.multidex.MultiDexApplication">
        <activity android:name=".MainActivity">
            <intent-filter>
                <action android:name="android.intent.action.MAIN" />

                <category android:name="android.intent.category.LAUNCHER" />
            </intent-filter>
        </activity>
    </application>
</manifest>

非常感谢任何帮助。

谢谢!

0 个答案:

没有答案