gradle / gradle

Adaptable, fast automation for all
https://gradle.org
Apache License 2.0
16.56k stars 4.64k forks source link

gradlew lint no longer possible in stable Android Studio 4.2 #17152

Closed benedicte69 closed 3 years ago

benedicte69 commented 3 years ago

Expected Behavior

running gradlew lint was working in stable android studio 4.1. It is no longer possible to run it in Android Studio 4.2. Stable IDE android studio 4.1 was using kotling compiler 1.4.32-release-371 Stable IDE android studio 4.2 is using kotling compiler 1.5.0-release-764

Current Behavior

gradlew lint
> Task :app:processDebugMainManifest FAILED

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':app:processDebugMainManifest'.
> Unable to make field private final java.lang.String java.io.File.path accessible: module java.base does not "opens java.io" to unnamed module @42d11bb7

* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.

* Get more help at https://help.gradle.org

Deprecated Gradle features were used in this build, making it incompatible with Gradle 8.0.
Use '--warning-mode all' to show the individual deprecation warnings.
See https://docs.gradle.org/7.0/userguide/command_line_interface.html#sec:command_line_warnings

BUILD FAILED in 9s
13 actionable tasks: 4 executed, 9 up-to-date

Context

it is no longer working in Android Studio built: Android Studio 4.2 Build #AI-202.7660.26.42.7322048, built on April 29, 2021 Runtime version: 11.0.8+10-b944.6842174 amd64 VM: OpenJDK 64-Bit Server VM by N/A Windows 10 10.0 GC: G1 Young Generation, G1 Old Generation Memory: 4096M Cores: 8 Registry: external.system.auto.import.disabled=true Non-Bundled Plugins: Batch Scripts Support, CMD Support, com.intellij.marketplace, com.thoughtworks.gauge, Dart, org.moe.community, org.jetbrains.kotlin, io.flutter, org.intellij.plugins.markdown I can no longer run gradlew lint

it was working with any Gradle, it is no longer working, the reason is that the Kotlin version of the IDE is not publicly available and can not be found (404) Kotlin version that is used for building with Gradle (1.5.0) differs from the one bundled into the IDE plugin (1.5.0-release-764)

Steps to Reproduce

Your Environment

gradlew lint stacktrace:

https://gist.github.com/benedicte69/d1579fd3304310dd18ccd1762f698ef8

Build scan URL: I know it is not your fault, but can you do something about this problem?

bmuskalla commented 3 years ago

Thank you for your interest in Gradle!

This is an issue with the Android Gradle Plugin which is developed by Google and cannot be addressed in the core of the Gradle Build Tool.

Please open such Android-related issues on the Android Issue Tracker at https://source.android.com/source/report-bugs

Additionally, can you check which Gradle version and which JDK you're using? The error sounds like something from JDK 16 upwards as they closed the modules. You may be able to workaround this using the corresponding --add-opens java.base/java.io=ALL-UNNAMED command line flags for the Gradle daemon.

benedicte69 commented 3 years ago

@bmuskalla , Thanks for having taken time to answer, I read you only today. No, it is not exactly the solution, but I think I've got it. Thanks again.

jehadhatm commented 10 months ago

@bmuskalla , Thanks for having taken time to answer, I read you only today. No, it is not exactly the solution, but I think I've got it. Thanks again.

hello, i have seen the problem that you have been through and i am facing it so i would like to ask you did u find the solution? and if u found it can u please tell me what was it?

benedicte69 commented 10 months ago

Sorry, but we are in  2023 !  I do not remember about 2021. All that I remember is that the Android part was never up to date in Flutter. Do you mean it is still the same 2 years later? Incredible .... Le dimanche 15 octobre 2023 à 01:44:46 UTC+2, jehadhatm @.***> a écrit :

@bmuskalla , Thanks for having taken time to answer, I read you only today. No, it is not exactly the solution, but I think I've got it. Thanks again.

hello, i have seen the problem that you have been through and i am facing it so i would like to ask you did u find the solution? and if u found it can u please tell me what was it?

— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you authored the thread.Message ID: @.***>