简体   繁体   中英

Android studio - Imported project, no modules in run/debug configuration

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

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.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM