簡體   English   中英

Android Gradle嘗試導入L預覽支持庫

[英]Android gradle is trying to import L preview support libraries

因此,我嘗試打開一個較舊的項目進行一些修復,但是我完全迷失了一個問題。 修復所有gradle版本后,更改導入本地庫等的方式后出現此錯誤

Error:Execution failed for task ':wallet:processDebugManifest'.
 Manifest merger failed : uses-sdk:minSdkVersion 14 cannot be smaller than version L declared in library com.android.support:support-v4:21.0.0-rc1

問題是我不使用21.x支持庫。 我搜索了整個代碼庫。 v4支持庫在兩個子項目中使用,但都具有

compile 'com.android.support:support-v4:20.0.0'

定義(無“ +”通配符或其他任何內容)。 我完全不知道它將21.x庫從哪里拖到哪里。 如果我在項目的根目錄上嘗試“ com.android.support”中的“ find in path”,則發生兩次v4:20.0.0和一次發生v13:20.0.0。 如果我搜索“ com.android.support:support-v4:21.0.0-rc1”,則唯一找到的參考文件位於.idea / workspace.xml中,除此之外沒有其他地方。 我試着清理項目,重新啟動IDEA,再次從SVN中簽出項目,並進行了在AS 0.8。+上運行所需的所有修復,現在我失去了主意。 有人遇到類似的問題嗎? 有什么技巧怎么解決呢?

編輯:

http://pastebin.com/Yzi9szr9

這是我的主要build.gradle文件。 “ CountryPicker”項目還使用了support-v4(沒有其他庫),但也指定了v4-20.0.0(沒有通配符)

我認為這是由於您的應用程序build.gradle文件中的compileSdkVersiontargetSdkVersion

如果您的build.gradle

compileSdkVersion 'android-L'

targetSdkVersion 'android-L'

你的依賴可以是

dependencies {
  compile fileTree(dir: 'libs', include: ['*.jar'])
  compile 'com.android.support:support-v4:21.0.0-rc1'
}

或者,如果您的build.gradle

compileSdkVersion 20

targetSdkVersion 20

然后依賴項將像這樣

dependencies {
  compile fileTree(dir: 'libs', include: ['*.jar'])
  compile 'com.android.support:support-v4:20.0.0'
}

編輯

嘗試如下更新清單文件。

<?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.app">
    .
    .
    <uses-sdk tools:node="replace" />
    .
    .
</manifest>

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM