user2568889
user2568889

Reputation: 997

Gradle execution failed for task 'Project:processDebugManifest'

I am starting using google play service API on Android and after read several tutorial and do it several ways I always have the same error.

Gradle: Execution failed for task ':Teste:processDebugManifest'.
> java.lang.RuntimeException (no error message)

To import the library of google play I copy the paste of goggle-play-service_lib to my project, including the jar file to my project structure.(I'm using Android Studio)

At the end it looks like this:

App AndroidManifest.xml

<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
    package="com.teste"
    android:versionCode="1"
    android:versionName="1.0" >

    <uses-sdk
        android:minSdkVersion="7"
        android:targetSdkVersion="16" />

    <permission
            android:name="com.metyou1.permission.MAPS_RECEIVE"
            android:protectionLevel="signature"/>
    <uses-permission android:name="com.metyou1.permission.MAPS_RECEIVE"/>

    <uses-permission android:name="android.permission.INTERNET" />
    <uses-permission android:name="android.permission.ACCESS_NETWORK_STATE"/>
    <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/>
    <uses-permission android:name="com.google.android.providers.gsf.permission.READ_GSERVICES"/>
    <uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION"/>
    <uses-permission android:name="android.permission.ACCESS_FINE_LOCATION"/>

    <uses-feature
            android:glEsVersion="0x00020000"
            android:required="true"/>

    <application
        android:allowBackup="true"
        android:icon="@drawable/ic_launcher"
        android:label="@string/app_name"
        android:theme="@style/AppTheme" >
        <activity
            android:name="com.teste.FullscreenActivity"
            android:configChanges="orientation|keyboardHidden|screenSize"
            android:label="@string/app_name"
            android:theme="@style/FullscreenTheme" >
            <intent-filter>
                <action android:name="android.intent.action.MAIN" />

                <category android:name="android.intent.category.LAUNCHER" />
            </intent-filter>
        </activity>
        <meta-data
                android:name="com.google.android.maps.v2.API_KEY"
                android:value="MYKEY"/>
    </application>

</manifest>

App build.gradle:

buildscript {
    repositories {
        mavenCentral()
    }
    dependencies {
        classpath 'com.android.tools.build:gradle:0.4'
    }
}
apply plugin: 'android'

dependencies {
    compile project(':google-play-services_lib')
    compile files('libs/android-support-v4.jar')
}

android {
    compileSdkVersion 17
    buildToolsVersion "17.0.0"

    defaultConfig {
        minSdkVersion 7
        targetSdkVersion 16
    }
}

google-play-services_lib build.gradle

buildscript {
    repositories {
        maven { url 'http://repo1.maven.org/maven2' }
    }
    dependencies {
        classpath 'com.android.tools.build:gradle:0.4'
    }
}
apply plugin: 'android-library'

dependencies {
    compile files('libs/google-play-services.jar')
}

android {
    compileSdkVersion 17
    buildToolsVersion "17.0.0"
    sourceSets {
        main {
            manifest.srcFile 'AndroidManifest.xml'
            res.srcDirs = ['res']
        }
    }
}

Someone can help me??

Thanks ;)

Upvotes: 3

Views: 5618

Answers (2)

vinay kumar
vinay kumar

Reputation: 1449

I too faced this issue while add ActionBarShelock to project, by comparing to the older library I found that application tag is missing in manifest. By adding one line i fixed my issue.

<application />

Hope this resolves.

Upvotes: 0

Lukas Olsen
Lukas Olsen

Reputation: 5464

Finally after hours of debugging i got a solution....

[AndroidManifest.xml:3, AndroidManifest.xml:3] Main manifest has <uses-sdk android:minSdkVersion='7'> but library uses minSdkVersion='8'

comes as Error-Message when using gradlew - so you need to set your minSdkVerison to 8 in your manifest and everything should be working

(Don't forget to edit the build.gradle of your project to minSdkVersion 8 - i just lost another half of an hour to that but now its working)

Upvotes: 6

Related Questions