0
votes

I have Android Studio 3.2. I am trying to open a project, but I get the error "Failed to find target with hash string 'android-Q'". Below the error message I see a link "Install missing platform(s) and synch project". If I click this link, I get another error, which says

"The following packages are not available: - Package id platforms;android-Q".

In the Android SDK tool, I can see "Android API29" (API level 29) already installed. On checking the details about Android verisons and its API levels. I would like to know how I can resolve that ?

compileSdkVersion 'android-Q'
buildToolsVersion "25.0.0"
useLibrary 'org.apache.http.legacy'
defaultConfig {
    applicationId "vn.minh.android.store"
    minSdkVersion 14
    targetSdkVersion 'Q'
1

1 Answers

1
votes

With the release of Android Q Beta 4 and Final APIs!, Android Q is now officially API 29. Therefore you should not use 'android-Q' or 'Q' in your build.gradle file, but instead just use 29:

compileSdkVersion 29
buildToolsVersion "25.0.0"
useLibrary 'org.apache.http.legacy'
defaultConfig {
    applicationId "vn.minh.android.store"
    minSdkVersion 14
    targetSdkVersion 29

Note that as per that same blog post linked above:

To get started, download the official API 29 SDK and tools into the stable release of Android Studio 3.4, or for the latest Android Q support update to Android Studio 3.5 Beta.

Using Android Studio 3.2 (and really, anything but the latest stable version of Studio or newer) generally means that you will not have the expected tooling that the latest SDKs, build tools, and emulators require to provide a fully functional environment.