0

I'm new to Android/Java programming, but have a complete Android app in the Play Store. So I wanted to add Google Cloud Messaging to my app, and that's when I ran into trouble. The various tutorials told me to get the Google Play services SDK and the Google Repository. Now when I try to build, I get 101 errors that I think is related to one or more of my build.gradle files. I've spent hours trying to fix this. Any help would be GREATLY appreciated!

Here is the top of the message I see:

Error:Execution failed for task ':lib:processReleaseResources'.

com.android.ide.common.internal.LoggedErrorException: Failed to run command: /Applications/Android Studio.app/sdk/build-tools/19.1.0/aapt package -f --no-crunch -I /Applications/Android Studio.app/sdk/platforms/android-19/android.jar -M /Users/scott/Documents/development/Android HVB/lib/build/bundles/release/AndroidManifest.xml -S /Users/scott/Documents/development/Android HVB/lib/build/res/all/release -A /Users/scott/Documents/development/Android HVB/lib/build/bundles/release/assets -m -J /Users/scott/Documents/development/Android HVB/lib/build/source/r/release --non-constant-id --output-text-symbols /Users/scott/Documents/development/Android HVB/lib/build/bundles/release

Here is the "app" build.gradle file:

apply plugin: 'android'

android {
    compileSdkVersion 19
    buildToolsVersion '19.1'

    defaultConfig {
        minSdkVersion 10
        targetSdkVersion 19
        versionCode 14
        versionName "1.3a"
    }
    buildTypes {
        release {
            runProguard false
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.txt'
        }
    }
}

dependencies {
    compile 'com.android.support:appcompat-v7:+'
    compile 'com.google.android.gms:play-services:6.5.+'
    compile project(':lib')
}
ScottyB
  • 2,167
  • 1
  • 30
  • 46

1 Answers1

1

I describe this HERE

Just updated your build.gradle

android {
compileSdkVersion 19
buildToolsVersion "19.0.1"

defaultConfig {
    minSdkVersion 10
    targetSdkVersion 19
    versionCode 1
    versionName "1.0"
}
     buildTypes {
            release {
                minifyEnabled false
                proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.txt'
            }
        }

Please update your manifest.

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

    <uses-sdk
        android:minSdkVersion="10"
        android:targetSdkVersion="19" />
Community
  • 1
  • 1
IntelliJ Amiya
  • 74,896
  • 15
  • 165
  • 198
  • 1
    I changed "runProguard false" to "minifyEnabled false" and now see the following (on 7 lines): 12:12:08 AM Gradle invocation completed successfully with 1 error(s) in 4 sec 12:12:11 AM Gradle 'Android HVB' project refresh failed: Build script error, unsupported Gradle DSL method found: 'minifyEnabled()'! Possible causes could be: - you are using Gradle version where the method is absent - you didn't apply Gradle plugin which provides the method - or there is a mistake in a build script – ScottyB Dec 24 '14 at 06:11
  • 1
    Thanks. I added "classpath 'com.android.tools.build:gradle:0.8.+' " to the first line in dependencies {} and got the same error. Is that what you meant I should do? – ScottyB Dec 24 '14 at 06:22
  • Same results. I am frustrated. Going to bed. – ScottyB Dec 24 '14 at 06:52
  • In my application i use gms version this : Try once more . compile 'com.google.android.gms:play-services:5.0.89' – IntelliJ Amiya Dec 24 '14 at 06:55
  • Use this classpath 'com.android.tools.build:gradle:0.14.+' – IntelliJ Amiya Dec 24 '14 at 12:43
  • I'm currently running an old version of Studio (0.5.2). Do I need to upgrade to v1? Apparently I can't just patch it. Do I just download the whole thing and run the installer? – ScottyB Dec 24 '14 at 16:58