更新工具后,我无法构建我的项目。我在Android Studio中遇到了这个错误。
/build/exploded-aar/com.android.support/support-v4/21.0.0-rc1/AndroidManifest.xml:3]
无法分析:必须是整数或代码名。
有什么想法吗?
我认为这个清单来自于支持库。我还为我的项目准备了一个min=14 target=19
<?xml version="1.0" encoding="utf-8"?>
<!--
Copyright (C) 2014 The Android Open Source Project
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="android.support.v4" >
<uses-sdk
android:minSdkVersion="L"
android:targetSdkVersion="L" />
<application />
</manifest>
gradle类路径'com.android.tools.build:gradle:0.9.+'
发布于 2014-06-27 07:23:36
在您的应用程序/build.gradle文件中,更改
compile 'com.android.support:support-v4:+'
至
compile 'com.android.support:support-v4:19.1.0'
'+‘表示它将查找最新版本的依赖项。如果你下载L预览版,最新的版本将是L的支持库-这对于一个目标是API 19的项目是不起作用的。
发布于 2014-06-27 02:51:28
您是否更新了build.gradle文件以反映这些更改?
compileSdkVersion is set to 'android-L'
minSdkVersion is set to 'L'
targetSdkVersion is set to 'L'
发布于 2014-07-16 05:09:26
这为我解决了问题,我能够构建应用程序。
compile('com.android.support:support-v4:19.1.0'){
force = true
}
https://stackoverflow.com/questions/24437950
复制相似问题