Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Build failed after updating tools for Android L

I cannot build my project after updating the tools. I get this error in 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.

Any ideas?

This manifest is from the support library I think. I also have another for my project which is 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.+'

like image 528
Bri6ko Avatar asked Jun 26 '14 18:06

Bri6ko


1 Answers

In your app/build.gradle file, change
compile 'com.android.support:support-v4:+'
to
compile 'com.android.support:support-v4:19.1.0'

The '+' means that it will look for the newest version of the dependency. If you download the L preview, the latest version will be the support library for L - which isn't going to work for a project whose target is API 19.

like image 181
jamchamb Avatar answered Nov 10 '22 09:11

jamchamb