Wednesday, September 4, 2019

"Module not specified" may be caused by a missing Android SDK

Android SDK 29 came out pretty recently; one of my projects has not been updated to target it yet. But installing Android Studio now installs only version 29 of the SDK by default. Opening that project without the 28 SDK appears to work in that Gradle sync claims to complete successfully, but there is no "app" run configuration and test run configurations fail to start, saying "module not specified." Sure enough, the app directory isn't recognized as an IDEA module. Opening certain project files shows the "Gradle sync failed" bar, but trying sync again still claims to succeed. The only clue is a warning logged in the text version of the Gradle sync output that the license for SDK 28 hasn't been accepted.

Fixing this just requires installing the Android 28 SDK. That can be done in the Android Studio settings: Appearance & Behavior → System Settings → Android SDK.

No comments:

Post a Comment