I have converted one of our Android projects from the old Groovy settings.gradle
and build.gradle
files to the new Kotlin DSL, i. e. settings.gradle.kts
and build.gradle.kts
.
While "it works on my machine" - in particular: the original project I converted from Groovy to Kotlin works fine in its original directory - all my co-workers are unable to open the project when they clone the repo. Importantly, neither can I open the project myself (with the same AS installation on the same machine) when I clone the repo to some other directory. So, I suspect there is some additional detail missing in some configuration file but I cannot seem to figure out which...
Details:
- When I just use
File > Open...
and then select the project folder, I only get the error message "The project 'xxx' is not a Gradle-based project" - When I instead go through
Import Project (Gradle, Eclipse ADT, etc.)
and then selectImport project from external model
andAndroid Gradle
Android Studio will create an emptybuild.gradle
file and fail with the error message "ERROR: Plugin with id 'com.android.library' not found." Deleting thebuild.gradle
just goes back to the error message I described in the first bullet point.
I am aware of this Github issue, which seems to describe the same problem, but it's been very quiet and I thought someone around here must have figured out a solution to this...
Oh, command line builds work everywhere - this is purely an Android Studio problem.
UPDATE: When I copy the whole project to a new folder (instead of cloning the repository) I can open it without any problems. So, am I correct in assuming that there must be something inside the folder - but not in Git - that makes it work?