Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Problem with debugging APK with Android Studio 3.1.4 on Windows

Tags:

android

After selecting “Profile or Debug APK…” to open an existing APK, pressing the “Debug” button gets us to the “Edit Configuration“ windows with the “Error: Please select Android SDK” message.

enter image description here

If we still select “Debug”, and then select “Continue Anyway” in the “Change Configuration Settings” windows, the error notification from the main window is “Error running ‘com.appname’: No JDK specified for module ‘com. appname’”.

enter image description here

like image 694
DevaDraco Avatar asked Aug 30 '18 03:08

DevaDraco


1 Answers

I found the solution for myself. There are 2 places to check if the SDK was set correctly.

  1. File-> Project Structure… -> Project Settings -> Project Ensure that Java SDK is set under “Project SDK”. (for example, ‘9.0.1 (java version “9.0.1”)’) Project Settings -> Project (tab)

  2. File-> Project Structure… -> Project Settings -> Modules -> -> Dependencies Ensure that your installed Android SDK platform is set under “Module SDK”. (for example, Android API 27 Platform (java version “9.0.1”)’) Project Settings -> Modules (tab)

If the application is debuggable, pressing the “Debug” button will bring up the Android emulator selection windows.

like image 59
DevaDraco Avatar answered Oct 03 '22 08:10

DevaDraco