2016-08-15 52 views
0

Log清單合併失敗:用途-SDK:minSDKVersion1不能小於7

我進口BaseGameUtils模塊後(對於谷歌Play遊戲服務),我得到這個錯誤。錯誤日誌說,在我的模塊清單文件使用方法:當我建立這個情況

<uses-sdk tools:overrideLibrary="android.support.v7.appcompat"/> 

然後:

enter image description here

然後,錯誤日誌表明我要導入我的模塊清單文件中這個:

<uses-sdk tools:overrideLibrary="android.support.v4"/> 

然後,我再次得到第一個錯誤,這是一個永無止境的來回週期。

應用清單XML:

<?xml version="1.0" encoding="utf-8"?> 
<manifest xmlns:android="http://schemas.android.com/apk/res/android" 
xmlns:tool="http://schemas.android.com/apk/res-auto" 
xmlns:tools="http://schemas.android.com/tools" 
package="reflexflash.gespanet2015.com.flashreflex"> 


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

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

</manifest> 

應用搖籃:

apply plugin: 'com.android.application' 

android { 
compileSdkVersion 24 
buildToolsVersion '24.0.0' 

defaultConfig { 
    applicationId "reflexflash.gespanet2015.com.flashreflex" 
    minSdkVersion 15 
    targetSdkVersion 24 
    versionCode 1 
    versionName "1.0" 
} 
buildTypes { 
    release { 
     minifyEnabled false 
     proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' 
    } 
} 
} 

dependencies { 

compile project(':BaseGameUtils') 

} 

模塊清單:

<?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.google.example.games.basegameutils" 
android:versionCode="1" 
android:versionName="1.0"> 

<uses-sdk tools:overrideLibrary="android.support.v4"/> 

<application> 
</application> 

</manifest> 

模塊搖籃:

apply plugin: 'com.android.library' 

buildscript { 
repositories { 
    jcenter() 
} 

dependencies { 
    classpath 'com.android.tools.build:gradle:1.3.1' 
    } 
} 

dependencies { 

// Set defaults so that BaseGameUtils can be used outside of BasicSamples 
if (!project.hasProperty('appcompat_library_version')) { 
    ext.appcompat_library_version = '20.0.+' 
} 
if (!project.hasProperty('support_library_version')) { 
    ext.support_library_version = '20.0.+' 
} 
if (!project.hasProperty('gms_library_version')) { 
    ext.gms_library_version = '8.1.0' 
} 

compile "com.android.support:appcompat-v7:${appcompat_library_version}" 
compile "com.android.support:support-v4:${support_library_version}" 
compile "com.google.android.gms:play-services-  games:${gms_library_version}" 
compile "com.google.android.gms:play-services- plus:${gms_library_version}" 
} 

android { 
// Set defaults so that BaseGameUtils can be used outside of BasicSamples 
if (!project.hasProperty('android_compile_version')) { 
    ext.android_compile_version = 23 
} 
if (!project.hasProperty('android_version')) { 
    ext.android_version = '23' 
} 

compileSdkVersion android_compile_version 
buildToolsVersion android_version 
+0

你的gradle文件是什麼?更改gradle文件中的'minSdk'。 –

+0

*編輯*兩個檔次現在包括 –

回答

0

在模塊的清單,我添加了此行來解決它:

<uses-sdk android:minSdkVersion="15" /> 

我的minSdkVersion在我的應用程序的文件的gradle還指出。

0

改變你的gradle(app)。

android { 
    ... 

    defaultConfig { 
     applicationId "your.package.name" 
     minSdkVersion 7 //here your problem. Change that 1 to 7(or value of the that you are currently using libraries) 
     targetSdkVersion 23 
     versionCode 1 
     versionName "1.0.0" 
     multiDexEnabled true 
    ... 
} 
+0

沒有工作.... –

+0

你能通過更新你的問題與我們分享您的gradle –

+0

只是,謝謝 –

相關問題