Checkout Git project in Android Studio causes “project does not use Gradle”


Checkout Git project in Android Studio causes “project does not use Gradle”



Previously I had a project, used Gradle as build system and Git as VCS and only added src/, res/, assets/ and manifest.xml to the repository. (As it is recommended I ignored all build files). Now I use android-studio-3.1.2 and tried to import that project:


Gradle


Git


src/


res/


assets/


manifest.xml


android-studio-3.1.2


Checkout project from Version Control → Git → clone



Then selected yes for Would you like to create an Android Studio project for the sources you have checked out to … ?


yes


Would you like to create an Android Studio project for the sources you have checked out to … ?


create project from existing source → select project name, location and type (.idea) → …



But I ended by this warning:


Migrate Project to Gradle?
This project does not use the Gradle build system. We recommend that you migrate to using the Gradle build system.



What causes this problem and how I can solve that?




1 Answer
1



Problem is caused by ignoring build.gradle files (in project and it's modules) and settings.gradle.


build.gradle


settings.gradle



Also I did not find any way to solve that automatically by Android Studio. I have to create a project from scratch and move my files to that.






By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Popular posts from this blog

List of Kim Possible characters

Audio Livestreaming with Python & Flask

NSwag: Generate C# Client from multiple Versions of an API