更新工具后我无法构建我的项目。我在 Android Studio 中收到此错误。
/build/exploded-aar/com.android.support/support-v4/21.0.0-rc1/AndroidManifest.xml:3] Failed to parse : must be an integer number or codename.
有什么想法吗?
这个 list 来 self 认为的支持库。我的项目还有另一个是 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 classpath 'com.android.tools.build:gradle:0.9.+'
最佳答案
在您的 app/build.gradle 文件中,更改
编译'com.android.support:support-v4:+'
到
编译'com.android.support:support-v4:19.1.0'
“+”表示它将查找最新版本的依赖项。如果您下载 L 预览版,最新版本将是 L 的支持库 - 它不适用于目标为 API 19 的项目。
关于android - 更新 Android L 的工具后构建失败,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/24437950/