0

I imported this project into android studio and there's no modules in run/debug configuration so i can't the project in an emulator. It says module not specified in the window. It also says "gradle sync failed" at the bottom. I uploaded screen shots so you can see.

Can anyone help with this?

Module

Gradle_Sync_Fail

1 Answers1

0

So I guess the answer is a little late...but I have been trying to solve the same problem and have been searching for an answer for a long time. Tried a lot of different things and nothing really worked for me until I saw Pavel Poley's solution in https://stackoverflow.com/questions/29087882/android-studio-run-debug-configuration-error-module-not-specified

For me the project's API target specified in the build.gradle(:app) was 29 which is for android 10. But Android studio 4.2 by default only has API 30 which is for android 11.

To fix this go to tools->sdk-manager (or just click on the icon with a box and a blue down arrow in the tool bar) and install the sdk for the API target specified in your gradle file.

Mark
  • 3,138
  • 5
  • 19
  • 36
  • I should also mention you might want to delete ```.idea/gradle.xml``` and ```.idea/workspace.xml``` – Mark Jul 09 '21 at 20:42