
Gradle and the Android Gradle Plugin provide the ability to configure and extend the build in different ways depending on the use case.įor simple projects where the configuration is mostly declarative, the Android Gradle Plugin can be configured in adle files which are written with Gradle Build Language, or Domain Specific Language (DSL) which is built on top of Groovy script, or files that are written using Gradle Kotlin DSL, which was introduced more recently. The Android Gradle Plugin is decoupled from Android Studio - Android Studio can open projects that use the corresponding Android Gradle Plugin or any previous stable version, currently down all the way to Android Gradle Plugin 1.1. Thanks.The Android Gradle Plugin is the supported build system for Android applications and includes support for compiling many different types of sources and linking them together into an application that you can run on a physical Android device or an emulator. classpath to be overwritten can also use their native OS’ features to do so. I also don’t need the extension to build my project, I “just” need it to provide code completion.ĭiscussion might be more appropriate on that issue, but as the adle eclipse plugin solution works for me, I think resources are best spent elsewhere.Īnybody who really wants to prevent. #286 mentions that Gradle overwrites the classpath on build, but my Gradle CLI builds don’t do that and make their own classpath (Android tools are quite different from standard Gradle stuff). classpath I provide and ignore Gradle, this solution works for me!

While I still think that it would be handy to force vscode-java to use the. I’m not sure what happened back then.Īnyway, I’ll override everything I need in the classpath in the gradle file. I tried adding a section again, and this time the NPE is gone.

I tried setting " “”: “disabled” ", but that does not help classpath should have not been overwritten Additional Informations classpath was overwritten with an empty one Expected Result


Libraries need a little more work, but I don’t mind doing everything manually, as both the platform version and libraries don’t change often. I’m able, after indexing, to get completion for my project’s classes, but also Android’s. classpath files provide quite satisfying results - with the caveat that they don’t support env vars, so you have to hardcode the path to your Android SDK.įor example, with a classpath that looks like: While I’m fully aware that Android projects are unsupported, manually crafting.
