Android Studio运行app时提示Please select Android SDK 、提示Module not specified 以及提示Local SDK path not se...

今天在一个工程里新建一个Module模块,运行的时候一直提示“Please select Android SDK”,"Module not specified "、"Local SDK path not set"尼玛,这么奇怪,之前都是这么新建,一直没问题,今天新建就突然就报这个错误了。

1、Please select Android SDK 问题

解决方法一:

主要是设置如下选项就可以解决了

Android Studio运行app时提示Please select Android SDK 、提示Module not specified 以及提示Local SDK path not se..._第1张图片
image.png
解决方法二:

确保工程或者模块没有任何错误问题,然后按照下面步骤来修改:


Android Studio运行app时提示Please select Android SDK 、提示Module not specified 以及提示Local SDK path not se..._第2张图片
image.png
Android Studio运行app时提示Please select Android SDK 、提示Module not specified 以及提示Local SDK path not se..._第3张图片
image.png
Android Studio运行app时提示Please select Android SDK 、提示Module not specified 以及提示Local SDK path not se..._第4张图片
image.png

原理就是:工程编译的SDK出现问题了,需要重新编译一下

参考文章:
https://blog.csdn.net/aqi00/article/details/78858336/

2、Local SDK path not set 问题

选择工程


Android Studio运行app时提示Please select Android SDK 、提示Module not specified 以及提示Local SDK path not se..._第5张图片
image.png

运行 “Local SDK path not set”


Android Studio运行app时提示Please select Android SDK 、提示Module not specified 以及提示Local SDK path not se..._第6张图片
image.png

根据提示去SDK Manager查看路径配置


Android Studio运行app时提示Please select Android SDK 、提示Module not specified 以及提示Local SDK path not se..._第7张图片
image.png

发现已经配置好了,那会是什么问题呢?


Android Studio运行app时提示Please select Android SDK 、提示Module not specified 以及提示Local SDK path not se..._第8张图片
image.png

打开运行设置,发现Target选项这里选错


Android Studio运行app时提示Please select Android SDK 、提示Module not specified 以及提示Local SDK path not se..._第9张图片
image.png

在真机上运行,需要设置如下 选项


Android Studio运行app时提示Please select Android SDK 、提示Module not specified 以及提示Local SDK path not se..._第10张图片
image.png

3、Module not specified问题

出现这个大概原因是,在多模块Module应用中,某些东西配置不正确导致Module找不到,就会出现这个错误提示,分如下几步检测Progject:

第1步:检查settings.gradle文件看看Module是否都引用进来了


Android Studio运行app时提示Please select Android SDK 、提示Module not specified 以及提示Local SDK path not se..._第11张图片
image.png

第2步:检查各模块的build.gradle的配置,看看是否跟settings.gradle文件一致


Android Studio运行app时提示Please select Android SDK 、提示Module not specified 以及提示Local SDK path not se..._第12张图片
image.png

第3步:如果是移动过文件夹并且有svn配置的话,有可能各模块的 xxx.iml文件会有2个或者多个,建议把把xxx.iml文件删除,让其重新自动构建

Android Studio运行app时提示Please select Android SDK 、提示Module not specified 以及提示Local SDK path not se..._第13张图片
image.png

第4步:一般到第三步应该都可以跑起来了,可重新启动AndroidStudio


Android Studio运行app时提示Please select Android SDK 、提示Module not specified 以及提示Local SDK path not se..._第14张图片
image.png
Android Studio运行app时提示Please select Android SDK 、提示Module not specified 以及提示Local SDK path not se..._第15张图片
image.png

参考文章:
https://blog.csdn.net/wilschan0201/article/details/73251285

你可能感兴趣的:(Android Studio运行app时提示Please select Android SDK 、提示Module not specified 以及提示Local SDK path not se...)