android-analyzer icon indicating copy to clipboard operation
android-analyzer copied to clipboard

Android-analyser not working with gradle 4.0.0-alpha04

Open KatieBarnett opened this issue 5 years ago • 7 comments

I upgraded to the gradle version 4.0.0-alpha04 from 4.0.0-alpha03 today and android-analyser stopped my builds from working. When I commented out the plugin they worked again. I am using that version of gradle so I can use the latest canary Android Studio which requires this.

Using 1.4.1 version of android-analyser.

Errors received:

Unable to find method 'org.gradle.testing.jacoco.tasks.JacocoReport.setClassDirectories(Lorg/gradle/api/file/FileCollection;)V'.
Possible causes for this unexpected error include:
Gradle's dependency cache may be corrupt (this sometimes occurs after a network connection timeout.)
Re-download dependencies and sync project (requires network)

The state of a Gradle build process (daemon) may be corrupt. Stopping all Gradle daemons may solve this problem.
Stop Gradle build processes (requires restart)

Your project may be using a third-party plugin which is not compatible with the other plugins in the project or the version of Gradle requested by the project.

In the case of corrupt Gradle processes, you can also try closing the IDE and then killing all Java processes.
A problem occurred configuring project ':app'.
> Could not create task ':app:androidAnalyzerJacoco'.
   > org.gradle.testing.jacoco.tasks.JacocoReport.setClassDirectories(Lorg/gradle/api/file/FileCollection;)V

I tried the recommended solutions multiple times to no avail.

KatieBarnett avatar Nov 25 '19 01:11 KatieBarnett

@KatieBarnett thank you for finding this and opening an issue. This is top priority, I am going to investigate it asap. Should you find some more clues in the meantime, let me know. Thanks!

AndroideRob-zz avatar Nov 25 '19 08:11 AndroideRob-zz

Any update on this @AndroideRob?

KatieBarnett avatar Dec 03 '19 22:12 KatieBarnett

@KatieBarnett I have a possible fix in this branch: https://github.com/pinchbv/android-analyzer/tree/1.5.0-gradle-update

Will test it tomorrow on the Canary AS and let you know.

AndroideRob-zz avatar Dec 05 '19 20:12 AndroideRob-zz

@KatieBarnett I fixed the plugin to work with Gradle 4.0.0-alpha05 and 6.1-milestone-3. Since these have not yet been released, I won't release 1.5.0 yet. Please use the branch for now.

Project-level build.gradle:

    repositories {
        maven {
            url "https://raw.github.com/pinchbv/android-analyzer/1.5.0-gradle-update/repo"
        }
    }
    dependencies {
        classpath "com.justpinch:androidanalyzer:1.5.0"
    }

gradle-wrapper.properties: distributionUrl=https\://services.gradle.org/distributions/gradle-6.1-milestone-3-all.zip

Let me know if there is anything else I can do.

AndroideRob-zz avatar Dec 08 '19 17:12 AndroideRob-zz

Thanks. Looks like it is working with your changes.

KatieBarnett avatar Dec 12 '19 00:12 KatieBarnett

Case is, that version 1.5.0 works only with gradle 6.1-milestone-3, which requires Android Studio 4.0 (unstable). Please fix this - we need jacoco :)

formatBCE avatar Dec 24 '19 09:12 formatBCE

@AndroideRob-zz,

With Android Analyzer 1.5.0 I am getting the below error

  • What went wrong: A problem occurred configuring root project 'build'.

Could not resolve all artifacts for configuration ':classpath'. Could not resolve com.justpinch:androidanalyzer:1.5.0. Required by: project : > Could not resolve com.justpinch:androidanalyzer:1.5.0. > Could not get resource 'http://dl.bintray.com/kotlin/kotlin-eap/com/justpinch/androidanalyzer/1.5.0/androidanalyzer-1.5.0.pom'. > Could not GET 'http://dl.bintray.com/kotlin/kotlin-eap/com/justpinch/androidanalyzer/1.5.0/androidanalyzer-1.5.0.pom'. Received status code 502 from server: Bad Gateway

Did anything change with this library? Thank you!

snehabhegade avatar Dec 24 '21 05:12 snehabhegade