1

I have a legacy project with almost a huge number of dependencies for which I cannot get a build from Gradle.

Here is the errors I get (for which I searched the SOF and came accross these answers none of which worked for me:

1

2

I have tried backwarding the buildTools version and sdk versions. Nothing has worked.

Here are the errors I get:

Information:Gradle tasks [:app:generateDebugSources, :app:generateDebugAndroidTestSources, :app:mockableAndroidJar, :sidemenulibrary:generateDebugSources, :sidemenulibrary:generateDebugAndroidTestSources, :sidemenulibrary:mockableAndroidJar]
C:\Users\Farzin\.gradle\caches\transforms-1\files-1.1\play-services-auth-11.8.0.aar\816b583fabfaa884d4138f99d0ffc734\res\drawable-watch-v20\common_google_signin_btn_text_dark_normal.xml
Error:(9, 30) No resource found that matches the given name (at 'src' with value '@drawable/googleg_standard_color_18').
C:\Users\Farzin\.gradle\caches\transforms-1\files-1.1\play-services-auth-11.8.0.aar\816b583fabfaa884d4138f99d0ffc734\res\drawable-watch-v20\common_google_signin_btn_text_disabled.xml
Error:(16, 30) No resource found that matches the given name (at 'src' with value '@drawable/googleg_disabled_color_18').
C:\Users\Farzin\.gradle\caches\transforms-1\files-1.1\play-services-auth-11.8.0.aar\816b583fabfaa884d4138f99d0ffc734\res\drawable-watch-v20\common_google_signin_btn_text_light_normal.xml
Error:(9, 30) No resource found that matches the given name (at 'src' with value '@drawable/googleg_standard_color_18').
C:\Users\Farzin\Desktop\Helsa\android\app\build\intermediates\res\merged\debug\drawable-watch-v20\common_google_signin_btn_text_dark_normal.xml
Error:(9, 30) No resource found that matches the given name (at 'src' with value '@drawable/googleg_standard_color_18').
C:\Users\Farzin\Desktop\Helsa\android\app\build\intermediates\res\merged\debug\drawable-watch-v20\common_google_signin_btn_text_disabled.xml
Error:(16, 30) No resource found that matches the given name (at 'src' with value '@drawable/googleg_disabled_color_18').
C:\Users\Farzin\Desktop\Helsa\android\app\build\intermediates\res\merged\debug\drawable-watch-v20\common_google_signin_btn_text_light_normal.xml
Error:(9, 30) No resource found that matches the given name (at 'src' with value '@drawable/googleg_standard_color_18').
Error:java.util.concurrent.ExecutionException: com.android.ide.common.process.ProcessException: Error while executing process C:\SDK\sdk_1\build-tools\27.0.2\aapt.exe with arguments {package -f --no-crunch -I C:\SDK\sdk_1\platforms\android-27\android.jar -M \\?\C:\Users\Farzin\Desktop\Helsa\android\app\build\intermediates\manifests\full\debug\AndroidManifest.xml -S C:\Users\Farzin\Desktop\Helsa\android\app\build\intermediates\res\merged\debug -m -J \\?\C:\Users\Farzin\Desktop\Helsa\android\app\build\generated\source\r\debug -F C:\Users\Farzin\Desktop\Helsa\android\app\build\intermediates\res\debug\resources-debug.ap_ --custom-package com.parsdigit.helsa -0 apk --output-text-symbols \\?\C:\Users\Farzin\Desktop\Helsa\android\app\build\intermediates\symbols\debug --no-version-vectors}
Error:com.android.ide.common.process.ProcessException: Error while executing process C:\SDK\sdk_1\build-tools\27.0.2\aapt.exe with arguments {package -f --no-crunch -I C:\SDK\sdk_1\platforms\android-27\android.jar -M \\?\C:\Users\Farzin\Desktop\Helsa\android\app\build\intermediates\manifests\full\debug\AndroidManifest.xml -S C:\Users\Farzin\Desktop\Helsa\android\app\build\intermediates\res\merged\debug -m -J \\?\C:\Users\Farzin\Desktop\Helsa\android\app\build\generated\source\r\debug -F C:\Users\Farzin\Desktop\Helsa\android\app\build\intermediates\res\debug\resources-debug.ap_ --custom-package com.parsdigit.helsa -0 apk --output-text-symbols \\?\C:\Users\Farzin\Desktop\Helsa\android\app\build\intermediates\symbols\debug --no-version-vectors}
Error:org.gradle.process.internal.ExecException: Process 'command 'C:\SDK\sdk_1\build-tools\27.0.2\aapt.exe'' finished with non-zero exit value 1
Error:Execution failed for task ':app:processDebugResources'.
> Failed to execute aapt
Information:BUILD FAILED in 31s
Information:10 errors
Information:0 warnings
Information:See complete output in console

enter image description here

I also tried changing the play-services versions as suggested by some posts on SOF and got these errors:

Information:Gradle tasks [:sidemenulibrary:generateDebugSources, :sidemenulibrary:generateDebugAndroidTestSources, :sidemenulibrary:mockableAndroidJar, :app:generateDebugSources, :app:generateDebugAndroidTestSources, :app:mockableAndroidJar]
C:\Users\Farzin\.gradle\caches\transforms-1\files-1.1\play-services-auth-11.8.0.aar\816b583fabfaa884d4138f99d0ffc734\res\drawable-watch-v20\common_google_signin_btn_text_dark_normal.xml
Error:(9, 30) No resource found that matches the given name (at 'src' with value '@drawable/googleg_standard_color_18').
C:\Users\Farzin\.gradle\caches\transforms-1\files-1.1\play-services-auth-11.8.0.aar\816b583fabfaa884d4138f99d0ffc734\res\drawable-watch-v20\common_google_signin_btn_text_disabled.xml
Error:(16, 30) No resource found that matches the given name (at 'src' with value '@drawable/googleg_disabled_color_18').
C:\Users\Farzin\.gradle\caches\transforms-1\files-1.1\play-services-auth-11.8.0.aar\816b583fabfaa884d4138f99d0ffc734\res\drawable-watch-v20\common_google_signin_btn_text_light_normal.xml
Error:(9, 30) No resource found that matches the given name (at 'src' with value '@drawable/googleg_standard_color_18').
C:\Users\Farzin\Desktop\MyProject\android\app\build\intermediates\res\merged\androidTest\debug\drawable-watch-v20\common_google_signin_btn_text_dark_normal.xml
Error:(9, 30) No resource found that matches the given name (at 'src' with value '@drawable/googleg_standard_color_18').
C:\Users\Farzin\Desktop\MyProject\android\app\build\intermediates\res\merged\androidTest\debug\drawable-watch-v20\common_google_signin_btn_text_disabled.xml
Error:(16, 30) No resource found that matches the given name (at 'src' with value '@drawable/googleg_disabled_color_18').
C:\Users\Farzin\Desktop\MyProject\android\app\build\intermediates\res\merged\androidTest\debug\drawable-watch-v20\common_google_signin_btn_text_light_normal.xml
Error:(9, 30) No resource found that matches the given name (at 'src' with value '@drawable/googleg_standard_color_18').
Error:java.util.concurrent.ExecutionException: com.android.ide.common.process.ProcessException: Error while executing process C:\SDK\sdk_1\build-tools\27.0.2\aapt.exe with arguments {package -f --no-crunch -I C:\SDK\sdk_1\platforms\android-27\android.jar -M \\?\C:\Users\Farzin\Desktop\MyProject\android\app\build\intermediates\manifest\androidTest\debug\AndroidManifest.xml -S C:\Users\Farzin\Desktop\MyProject\android\app\build\intermediates\res\merged\androidTest\debug -m -J \\?\C:\Users\Farzin\Desktop\MyProject\android\app\build\generated\source\r\androidTest\debug -F C:\Users\Farzin\Desktop\MyProject\android\app\build\intermediates\res\androidTest\debug\resources-debugAndroidTest.ap_ -0 apk --output-text-symbols \\?\C:\Users\Farzin\Desktop\MyProject\android\app\build\intermediates\symbols\androidTest\debug --no-version-vectors}
Error:com.android.ide.common.process.ProcessException: Error while executing process C:\SDK\sdk_1\build-tools\27.0.2\aapt.exe with arguments {package -f --no-crunch -I C:\SDK\sdk_1\platforms\android-27\android.jar -M \\?\C:\Users\Farzin\Desktop\MyProject\android\app\build\intermediates\manifest\androidTest\debug\AndroidManifest.xml -S C:\Users\Farzin\Desktop\MyProject\android\app\build\intermediates\res\merged\androidTest\debug -m -J \\?\C:\Users\Farzin\Desktop\MyProject\android\app\build\generated\source\r\androidTest\debug -F C:\Users\Farzin\Desktop\MyProject\android\app\build\intermediates\res\androidTest\debug\resources-debugAndroidTest.ap_ -0 apk --output-text-symbols \\?\C:\Users\Farzin\Desktop\MyProject\android\app\build\intermediates\symbols\androidTest\debug --no-version-vectors}
Error:org.gradle.process.internal.ExecException: Process 'command 'C:\SDK\sdk_1\build-tools\27.0.2\aapt.exe'' finished with non-zero exit value 1
Error:Execution failed for task ':app:processDebugAndroidTestResources'.
> Failed to execute aapt
Information:BUILD FAILED in 18s
Information:10 errors
Information:0 warnings
Information:See complete output in console

Here is my Gradle.app:

apply plugin: 'com.android.application'

android
        {
            compileSdkVersion 27
            buildToolsVersion '27.0.2'
            defaultConfig
                    {
                        applicationId "com.parsdigit.helsa"
                        manifestPlaceholders = [onesignal_app_id: "4af7b2c1-a1a8-4b4a-ade3-d65289b38267",
                                                // Project number pulled from dashboard, local value is ignored.
                                                onesignal_google_project_number: "REMOTE"]
                        minSdkVersion 19
                        targetSdkVersion 27
                        versionCode 1
                        versionName "1.0"
                        vectorDrawables.useSupportLibrary = true
                        multiDexEnabled true
                    }
            buildTypes
                    {
                        release
                                {
                                    minifyEnabled true
                                    shrinkResources true
                                    proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
                                }
                    }

            packagingOptions
                    {
                        exclude 'META-INF/DEPENDENCIES'
                        exclude 'META-INF/LICENSE'
                        exclude 'META-INF/LICENSE.txt'
                        exclude 'META-INF/license.txt'
                        exclude 'META-INF/NOTICE'
                        exclude 'META-INF/NOTICE.txt'
                        exclude 'META-INF/notice.txt'
                        exclude 'META-INF/ASL2.0'
                    }

            lintOptions
                    {
                        checkReleaseBuilds false
                    }
            dexOptions
            {
                preDexLibraries = false
            }
        }

dependencies
        {
            implementation 'com.android.support.constraint:constraint-layout:1.0.2'
            compile fileTree(dir: 'libs', include: ['*.jar'])
            compile('com.squareup.okhttp3:okhttp:3.+')
            compile 'com.android.support:multidex:1.0.2'
            compile 'com.android.support:design:27.0.2'
            compile 'com.android.support:appcompat-v7:27.+'
            compile 'com.google.android.gms:play-services:11.8.0'
            compile 'com.google.android.gms:play-services-location:11.8.0'
            compile 'com.android.support:recyclerview-v7:27.+'
            compile 'com.google.firebase:firebase-core:11.8.0'
            compile 'com.onesignal:OneSignal:[3.7.1, 3.99.99]'
            compile 'org.apache.httpcomponents:httpclient:4.5.4'
            compile 'com.google.maps.android:android-maps-utils:0.4.3'
            compile 'com.google.code.gson:gson:2.8.2'
            compile 'uk.co.chrisjenx:calligraphy:2.2.0'
            compile 'com.pixplicity.easyprefs:library:1.8.1@aar'
            compile 'gun0912.ted:tedpermission:1.0.3'
            compile 'com.kennyc:snackbar:2.5'
            compile 'me.itangqi.waveloadingview:library:0.3.5'
            compile 'com.daimajia.androidanimations:library:2.3@aar'
            compile 'com.fujiyuu75:sequent:0.2.1'
            compile 'com.akexorcist:RoundCornerProgressBar:2.0.3'
            compile 'pl.charmas.android:android-reactive-location:0.10@aar'
            compile 'io.reactivex:rxjava:1.2.0'
            compile 'me.zhanghai.android.materialratingbar:library:1.2.0'
            compile 'cn.lightsky.infiniteindicator:library:1.2.2'
            compile 'com.squareup.picasso:picasso:2.+'
            compile 'com.nineoldandroids:library:2.4.0'
            compile 'de.hdodenhof:circleimageview:2.2.0'
            compile 'com.github.wooplr:Spotlight:1.2.3'
            compile 'com.wang.avi:library:2.1.3'
            compile 'com.caverock:androidsvg:1.2.1'
            compile 'com.github.bumptech.glide:glide:3.8.0'
            compile project(':sidemenulibrary');
            compile ('com.github.ozodrukh:CircularReveal:1.1.1@aar')
            {
                transitive = true;
            }
            compile 'org.greenrobot:eventbus:3.0.0'
            compile 'com.mohamadamin:persianmaterialdatetimepicker:1.2.1'
            compile 'com.nex3z:notification-badge:0.3.0'
            compile 'com.github.Shashank02051997:FancyGifDialog-Android:1.1'
            compile 'br.com.simplepass:loading-button-android:1.+'
            compile 'com.github.GrenderG:Toasty:1.2.8'
            compile 'com.github.blennerSilva:AwesomeDialog:2.0.5'
            compile 'me.relex:circleindicator:1.2.2@aar'
            compile 'com.airbnb.android:lottie:2.2.5'
            compile 'net.yslibrary.keyboardvisibilityevent:keyboardvisibilityevent:2.1.0'
            compile 'com.github.RobertApikyan:SegmentedControl:release_1.0.1'
            compile 'com.github.skydoves:powermenu:2.0.1'
            compile 'com.otaliastudios:cameraview:1.4.1'
            compile 'com.mindorks:placeholderview:0.7.2'
            compile 'com.google.code.gson:gson:2.7'
            compile 'com.github.Mostafa-MA-Saleh:EditCredit:1.5.0'
        }

apply plugin: 'com.google.gms.google-services'
Fatima
  • 869
  • 10
  • 35
  • 1
    Possible duplicate of [Google Play Services Library update and missing symbol @integer/google\_play\_services\_version](https://stackoverflow.com/questions/19843784/google-play-services-library-update-and-missing-symbol-integer-google-play-serv) – an_droid_dev Feb 19 '18 at 11:43
  • 2
    have you declared google_api_key(meta data) in manifest – KKSINGLA Feb 19 '18 at 11:57
  • 2
    Yes I have done so – Fatima Feb 19 '18 at 12:05

2 Answers2

3

Actually You Need To Delete All Gradle Cache And Rebuild It Again By Android Studio.

Also Suggest To Remove Your Android Studio And Run Your New Android Studio As Administrator.

0

Try to set buildToolsVersion '27.0.3' - I had the same problem, it worked for me.

CAZ
  • 119
  • 8