我有一部很旧的Motorola Devour手机,运行android 1.6。我一直在尝试为此编写自己的应用程序,但是由于我的minSdkVersion
是4
,所以无法运行gradle同步。出现此错误:
Manifest merger failed : uses-sdk:minSdkVersion 4 cannot be smaller than version 14 declared in library [com.android.support:animated-vector-drawable:28.0.0] C:\Users\mccra\.gradle\caches\transforms-1\files-1.1\animated-vector-drawable-28.0.0.aar\19bf506067f85ca5d48da2fd39d59695\AndroidManifest.xml as the library might be using APIs not available in 4
Suggestion: use a compatible library with a minSdk of at most 4,
or increase this project's minSdk version to at least 14,
or use tools:overrideLibrary="android.support.graphics.drawable" to force usage (may lead to runtime failures)
我将android manifest中的tools:overrideLibrary包含为
<uses-sdk tools:overrideLibrary="android.support.v7.appcompat, android.support.fragment, android.support.graphics.drawable, android.support.coreui, android.support.coreutils, android.support.loader, android.support.v7.viewpager, android.support.coordinatorlayout, android.support.drawerlayout, android.support.slidingpanelayout, android.support.customview, android.support.swiperefreshlayout, android.support.asynclayoutinflater, android.support.compat, androidx.versionedparcelable, android.support.cursoradapter, android.arch.lifecycle, android.support.documentfile, android.support.localbroadcastmanager, android.support.print, android.arch.lifecycle.viewmodel, android.arch.lifecycle.livedata, android.arch.lifecycle.livedata.core, android.arch.core, android.support.interpolator"/>
,因为它给每个单独的api错误。当运行gradle同步时,我会收到与覆盖它们之前相同的错误。然后,我尝试更改每个库上的minSdkVersion
,但必须有一种更好的方法。
同样,我试图使该应用程序在android 1.6, and API 4
的Doughnut上运行。
答案 0 :(得分:2)
您需要摆脱所有这些依赖,因为它们都不能在Android 1.6上运行。