android - 更新 Android L 的工具后构建失败

标签 android android-manifest android-gradle-plugin android-5.0-lollipop

更新工具后我无法构建我的项目。我在 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/

相关文章:

android - setOnCheckedListener将使我的应用程序崩溃

android - 如何在 firebase 中创建基于角色的访问控制或自定义声明

android - API key 放在哪里? list 中的资源、元数据或静态变量?

android - 在项目 'app' 中,已解决的 Google Play 服务库依赖项依赖于另一个确切版本

java - 创建特定 flavor 的类

android - Activity 在 onClick 方法中泄漏了窗口

Android - 如何从服务器获取数据?

android - 更改方向时重新加载 ListView 中的数据

android - 具有动态功能的即时应用程序始终显示带有 1 个选项的消歧对话框

android - 构建android gradle项目时如何禁用proguard生成dump.txt