Steve Paul Willson
Steve Paul Willson

Reputation: 79

How to install Play Store App on Android Studio Emulator Google API 23

I selected this emulator from the newest version of Android Studio AVD,

Google API 23

I have selected the latest version of android API 23. Because it says "with Google APIs", I thought that it would actually include all the Google apps, including Play Store so that I can install apps like Facebook. But I can't see any Google Apps in it. How do I install Gapps on Android Studio Emulator with Google API23?

Upvotes: 5

Views: 1407

Answers (2)

Paul Smith
Paul Smith

Reputation: 186

You can install a particular system image via the terminal, with the following command:

sdkmanager "system-images;android-30;google_apis_playstore;x86"

Trying to install the system images via the terminal, produced the following error:

'sdkmanager' is not recognized as an internal or external command,
operable program or batch file.

If you get this error, then you need to locate where sdkmanager is installed and add that folder to your PATH environment variable.

For me this was located under <AndroidSDK>\tools\bin

However, even after doing this I still got the following error.

Exception in thread "main" java.lang.NoClassDefFoundError: javax/xml/bind/annotation/XmlSchema
        at com.android.repository.api.SchemaModule$SchemaModuleVersion.<init>(SchemaModule.java:156)
        at com.android.repository.api.SchemaModule.<init>(SchemaModule.java:75)
        at com.android.sdklib.repository.AndroidSdkHandler.<clinit>(AndroidSdkHandler.java:81)
        at com.android.sdklib.tool.sdkmanager.SdkManagerCli.main(SdkManagerCli.java:73)
        at com.android.sdklib.tool.sdkmanager.SdkManagerCli.main(SdkManagerCli.java:48)
Caused by: java.lang.ClassNotFoundException: javax.xml.bind.annotation.XmlSchema
        at java.base/jdk.internal.loader.BuiltinClassLoader.loadClass(BuiltinClassLoader.java:641)
        at java.base/jdk.internal.loader.ClassLoaders$AppClassLoader.loadClass(ClassLoaders.java:188)
        at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:520)
        ... 5 more

Upvotes: 0

Sergii Pechenizkyi
Sergii Pechenizkyi

Reputation: 22232

Starting from API24 Google publishes emulator images with Google Play. Download it from CLI:

yes | sdkmanager "system-images;android-24;google_apis_playstore;x86" \
    "system-images;android-25;google_apis_playstore;x86" \
    "system-images;android-26;google_apis_playstore;x86" \
    "system-images;android-27;google_apis_playstore;x86" \
    "system-images;android-28;google_apis_playstore;x86_64"

Or download it from AndroidStudio:

Download google play emulator image

Upvotes: 1

Related Questions