简体   繁体   English

Android studio - 导入项目,运行/调试配置中没有模块

[英]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.我将此项目导入 android 工作室,运行/调试配置中没有模块,所以我不能在模拟器中进行项目。 It says module not specified in the window.它说 window 中未指定模块。 It also says "gradle sync failed" at the bottom.它还在底部显示“gradle sync failed”。 I uploaded screen shots so you can see.我上传了屏幕截图,所以你可以看到。

Can anyone help with this?有人能帮忙吗?

Module模块

Gradle_Sync_Fail 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尝试了很多不同的东西,直到我在https://stackoverflow.com/questions/29087882/android-studio-run-debug-configuration-error-module-not-specified中看到 Pavel Poley 的解决方案之前,没有什么对我有用

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. 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. 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.

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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