-1

Please find below the screen shot for the issue any help is deeply appreciated in advance.

When i change gradle version to 3.0.1 then it works fine for both Debug and release version of signed apk but when i keep it 3.1.1.. it gives me the same issue..

Amit
  • 391
  • 3
  • 15

1 Answers1

6
  • At First UPGRADE version & Update Your Android Studio.
  • Check your PROXY

At First

dependencies {
        classpath 'com.android.tools.build:gradle:3.1.2'
        classpath 'com.google.gms:google-services:3.2.0'
    }

Read Your Error Log

You should call implementation instead of compile.

dependencies {
    implementation fileTree(include: ['*.jar'], dir: 'libs')
   implementation "com.android.support:support-v4:****" // use api

Then

 lintOptions {
                checkReleaseBuilds false
                disable 'MissingTranslation'
                abortOnError false
            }

Then Clean-Rebuild-Restart IDE.

IntelliJ Amiya
  • 74,896
  • 15
  • 165
  • 198
  • 2
    When i change gradle version to 3.0.1 then it works fine but it doesnt work with 3.1.1 , that too only for release signed apk but when i go for debug signed apk it works fine.. – Amit May 08 '18 at 07:57
  • @Amit okay. Same problem for `gradle:3.1.2` ? – IntelliJ Amiya May 08 '18 at 07:59
  • @Amit you should use `implementation` for good approach. – IntelliJ Amiya May 08 '18 at 08:00
  • 1
    yes i'm using implementation , when using 3.1.2 it says Could not find com.android.tools.lint:lint-gradle:26.1.2. which it is trying to find at location - /Library/Android/sdk/extras/m2repository/com/android/tools/lint/lint-gradle/26.1.2/lint-gradle-26.1.2.pom below is the url it is trying to download from https://jcenter.bintray.com/com/android/tools/lint/lint-gradle/26.1.2/lint-gradle-26.1.2.pom when i open this link in the browser it gives me 404. i have also trying url shared by dhanshri (She commented in the question ) – Amit May 08 '18 at 08:05
  • @Amit add `lintOptions { abortOnError false }` – IntelliJ Amiya May 08 '18 at 08:08
  • sorry i missed to mention i have used lintOptions also and facing same issue. of lint-gradle-26.1.2.pom – Amit May 08 '18 at 08:34
  • @Amit add `implementation group: 'com.android.tools.lint', name: 'lint-gradle', version: '26.1.1'` – IntelliJ Amiya May 08 '18 at 08:36
  • when i say lintOptions { checkReleaseBuilds false } it works, please help me to understand what issue i may face if i set it to false... – Amit May 08 '18 at 08:51
  • implementation group: 'com.android.tools.lint', name: 'lint-gradle', version: '26.1.1' doesn't work it says cant resolve it ...do not know why so.. :( – Amit May 08 '18 at 08:52
  • @Amit Bro. Your thought saved me. changed gradle version from 3.1.2 to 3.0.1. .. Got Release build. Tq – Kartiikeya May 24 '18 at 06:34
  • @KartiikeyaBaleneni Okay. Happy to hear. – IntelliJ Amiya May 24 '18 at 06:36
  • 1
    i am not allowed to ask another questions due to some reasons may be... @IntelliJ Amiya need your help, i have installed studio 3.2 canary 16 wanted to use JetPack features (android.arch.lifecycle.ViewModel) gradle version 3.2.0, it gives me Cause: unable to find valid certification path to requested target for older version of studio no issues everything works fine... Please help :) – Amit May 31 '18 at 06:16
  • @Amit `installed studio 3.2 canary 16 ` whenever trying to make RELEASE apk use STABLE version. – IntelliJ Amiya May 31 '18 at 06:21
  • Sorry i didnt mention...That the issue comes while building gradle...that means i am not able to run project on my device also or in emulator also... trying to sync gradle but it gives the same issue, if you have time can we chat sometimes :) – Amit May 31 '18 at 07:15