1

After updating Android Studio and updated GDAA to Google Drive REST API as GDAA is deprecated, but now I can not build my app in release mode which had no issues before. Here is the complete error message:

org.gradle.api.GradleException: Lint found fatal errors while assembling a release target. To proceed, either fix the issues identified by lint, or modify your build script as follows: ... android { lintOptions { checkReleaseBuilds false // Or, if you prefer, you can continue to check for errors in release builds, // but continue the build even when errors are found: abortOnError false } }

And in the lint-results-release-fatal.xml file I get these messages:

'commons-logging' defines classes that conflict with classes now provided by Android. Solutions include finding newer versions or alternative libraries that don't have the same problem (for example, for httpclient use HttpUrlConnection or okhttp instead), or repackaging the library using something like jarjar.

'httpclient' defines classes that conflict with classes now provided by Android. Solutions include finding newer versions or alternative libraries that don't have the same problem (for example, for httpclient use HttpUrlConnection or okhttp instead), or repackaging the library using something like jarjar.

Here is my gradle dependencies:

dependencies {
    testImplementation 'junit:junit:4.12'
    implementation 'com.android.support:support-core-utils:27.1.1'
    implementation 'com.android.support:appcompat-v7:27.1.1'
    implementation 'com.android.support:recyclerview-v7:27.1.1'
    implementation 'com.android.support:support-v4:27.1.1'
    implementation 'com.android.support:multidex:1.0.3'
    implementation 'com.android.support.constraint:constraint-layout:1.1.3'
    implementation 'com.google.android.gms:play-services-ads:17.1.3'
    implementation 'com.google.android.gms:play-services-auth:16.0.1'
    implementation 'com.google.http-client:google-http-client-gson:1.26.0'
    implementation('com.google.api-client:google-api-client-android:1.26.0') {
        exclude group: 'org.apache.httpcomponents'
    }
    implementation('com.google.apis:google-api-services-drive:v3-rev136-1.25.0') {
        exclude group: 'org.apache.httpcomponents'
    }
}

I tried this and this but no luck.

HolyHeart
  • 47
  • 7

1 Answers1

0

After trying all other solutions with no luck, I suddenly discovered that this version of Android Studio 3.3.2 does not detect libraries which are out of date and found that the library causing the problem was this:

implementation 'com.google.http-client:google-http-client-gson:1.26.0'

As this is the suspected library from this question.

I simply updated this library to the latest version which is this at the moment:

implementation 'com.google.http-client:google-http-client-gson:1.28.0'

And the problem was solved.

I post this question and give answer just because I could not find the right answer and for those struggling with the same problem could be the right solution.

Community
  • 1
  • 1
HolyHeart
  • 47
  • 7