Can't migrate project to Gradle in Android Studio

前端 未结 6 1178
伪装坚强ぢ
伪装坚强ぢ 2020-12-02 09:48

I have a project that I already run in Android Studio.

After I\'ve opened the project in Android Studio I got the message:

Migrate Project to Gradle?

6条回答
  •  囚心锁ツ
    2020-12-02 10:35

    In my case, when I tried to open an existing gradle project and AS didn't recognize it like a gradle project, the problem was inside settings.gradle file. settings.gradle was corrupt because, for some reason, the semicolon was missing. The right structure is include ':app'; where app is the name of the project's module.

    Also, if you need, you can put more than one module, like this: include ':module1', ':module2', ':module3';

    I hope it could help someone.

提交回复
热议问题