我已经开发了这个小项目好几天了但是今天突然间,Android Studio开始给我这个错误
Error:Execution failed for task ':app:processDebugManifest'.
> Manifest merger failed : uses-sdk:minSdkVersion 14 cannot be smaller than version 14 declared in library com.android.support:support-v4:21.0.0-rc1
Run Code Online (Sandbox Code Playgroud)
我明白这是因为它正在尝试编译Android-L库.我想要它编译的版本是旧版本,但它不会.无论我输入哪个版本,它都会一直给我上述错误.这是依赖项.
dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
compile 'com.android.support:appcompat-v7:20.+'
compile 'com.android.support:support-v4:20.+'
}
Run Code Online (Sandbox Code Playgroud)
UPDATE
我刚刚安装了Android Studio Beta并将我的依赖项更改为下面的Eugen建议.但是,无论我指定哪个版本的appcompat支持版本,同步项目都会产生相同的错误.它每次同步时都会出现此错误
uses-sdk:minSdkVersion 14 cannot be smaller than version L declared in library com.android.support:support-v4:21.0.0-rc1
Run Code Online (Sandbox Code Playgroud)
我更新的依赖项
dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
compile 'com.android.support:appcompat-v7:19.+'
compile 'com.android.support:support-v4:19.+'
}
Run Code Online (Sandbox Code Playgroud)
更新2
我认为我没有正确理解Android Studio的依赖系统.我刚从依赖项中删除了appcompat和support,它仍然给了我同样的错误.我是否必须从某处删除最初包含的库?
的build.gradle
*注意 - 我再次添加了这两个库并尝试同步,以防万一.但没有变化.
apply plugin: 'android'
android {
compileSdkVersion 19 …Run Code Online (Sandbox Code Playgroud) android gradle android-studio build.gradle android-gradle-plugin
我试图在Android Studio中将自己的图标添加到我的应用程序中,但是我遇到了Manifest合并失败.我在这里提出了一个相同的问题,但他的答案对我不起作用.我尝试添加tools:replace="android:icon"和tools:replace="android:icon,android:theme"(当然在2个不同的场合)但没有变化.
这是Android Studio一直给我的错误.
Error:(12, 9) Execution failed for task ':app:processDebugManifest'.
> Manifest merger failed : Attribute application@icon value=(@drawable/footynews_logo_new) from AndroidManifest.xml:12:9
is also present at com.arasthel:gnavdrawer-library:1.1.4:4:45 value=(@drawable/ic_launcher)
Suggestion: add 'tools:replace="android:icon"' to <application> element at AndroidManifest.xml:9:5 to override
Error:(12, 9) Attribute application@icon value=(@drawable/footynews_logo_new) from AndroidManifest.xml:12:9
Run Code Online (Sandbox Code Playgroud)
编辑:我刚刚发现即使我认为应用程序在我的项目目录中使用ic_launcher,它实际上是在我正在使用的库之一中使用ic_launcher.如何强制应用程序使用我的启动器图标?
我ic_launcher使用Android Studio 使用默认图标()启动了一个Android项目.但现在我想将图标更改为其他内容.我尝试替换ic_launcher.png项目目录中的所有s,以新名称复制图标并更改AndroidManifest.xml但是应用程序仍然具有旧名称ic_launcher.我还尝试重启Android Studio,无效缓存和重启,从设备卸载应用程序,但图标从未更改过.
PS:删除android:icon="@drawable/logo"(注:我改ic_launcher.png到logo.png看它是否正常工作,然后)更改图标,默认的Android图标.但是把它放回去仍然给我同样的旧版本.
是否有使用Android Studio更改应用图标的不同步骤?
我想在ListView的末尾添加一个虚拟项目(或2),以使最终项目更容易访问.填充ListView将限制整个ListView,这不是我想要的.有没有办法添加一个不可点击的东西,只是在那里举起最后的项目?
可能是一个愚蠢的问题.我正在以一种形式获得JSONArray
[{'route':'route1'}, {'route':'route2'}, {'route':'route3'}]
Run Code Online (Sandbox Code Playgroud)
我想把它变成一个String数组
["route1", "route2", "route3"]
Run Code Online (Sandbox Code Playgroud)
怎么样?