Reputation: 1124
I had created a project with Android Studio and pushed it to bitbucket. After few weeks now I have cloned it on different machine to resume my work. I imported the project in Android Studio and now I keep getting this error.
Migrate Project to Gradle? This project does not use the Gradle build system. We recommend that you migrate to using the Gradle build system. More Information about migrating to Gradle. Don't show this message again.
I have the gradle directory in my project. I tried using the option of use local gradle distribution and pointed it to downloaded gradle-1.10 but I still keep getting the same error.
Upvotes: 10
Views: 17695
Reputation: 9850
Most probably you have git checkout a parent directory of a working android project.
Upvotes: 1
Reputation: 120
I had the same problem and I managed to fix it by invalidating caching and restart File - > Invalidate caches and restart
Upvotes: 0
Reputation: 390
I fixed this issue with the following steps:
Make sure that the following two files are in your project directory. If not, create a new one with reference of your other Android projects. These are default auto-generated files.
If it is still showing any errors when you open your project, restart your project by selecting file/(invalidate /restart).
Upvotes: 0
Reputation: 61
I ran into the same problem. For me the problem was my sttings.gradle was cleared. After adding incude: 'modulename'. It worked for me
Upvotes: 0
Reputation: 41
If you haven't started coding in your new machine, the simplest way would be to just delete your project directory, and use "import from VCS".
Not worth the time to find the "solution", trust me. I tried. Almost 2 years since you asked the question, and people are still getting the issue, then this problem is obviously not worth solving.
Upvotes: 1
Reputation: 265
First of all I would remove following files/directories from your project-folder:
Then try to import the project again in AndroidStudio. This usually works for me, and to avoid that in the future, adjust the .gitignore file properly.
If the first tip does not help: have you tried downloading a more recent gradle (1.12) locally and point to that directory? (Don't point AndroidStudio to download, but do it yourself first). You are not using a gradle-wrapper are you?
Upvotes: 16