I have upgraded my Android studio to 2.9 and I have been getting this error when I try to run my code.

Restart Error: No Android facet found for main

On surfing the web , I found this solution

No Android facet found, issues compiling with Android Studio 0.2

But the new Android studio does not have these options in the 'Project Structure'. Can anybody suggest any fix?

有帮助吗?

解决方案 2

There is already an update for AS 0.2.10. Try to update AS.

And if you still get the same error:

I don't know if this will help but you also could try to import your project instead of opening it (-> your *.iml files will be generated new by as). But be careful, you have to select the right file: settings.gradle.

其他提示

Try to open Project Structure of your project (right click on project -> Open Module Settings), and check if in Facets is added your project, if not - " + " add it. Its worked for me...

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top