1

When I run 'react-native run-android' it always checks 'android-23' version and I don't have any AVD with android-23. Instead I only have android-21. How can I specify android version of android-21?

1 Answer 1

1

I would suggest to update your SDK. To do so, you need to open Android Studio. Then, go to Preferences -> Appearance & behaviour -> System Settings -> Android SDK. You will see a few tabs:

  1. SDK Platforms Check 'Show Package Details' at the right bottom corner and check the following items under Android 6.0 (Marshmallow): Google APIs, Android SDK Platform 23, Sources for Android SDK

  2. SDK Tools Check 'Show Package Details' at the right bottom corner and check the following items:

Android SDK Build Tools 23.* Android Auto API Simulators Intel x86 Emulator Accelator (HAXM installer)

Click on Apply button, wait for everything being installed, and then try to run your project again.

Sign up to request clarification or add additional context in comments.

7 Comments

In that case I can't test the app on the device with old android version, right? I want to test the app on the device with same android version
Open Tools -> Android -> AVD Manager, click on "Create Virtual Device" button at the left bottom corner, choose a device, click Next, chose an API level within one of the Recommended ones or check other tabs with alternative API Levels. After that, run the device and run react-native run-android. Does it work for you?
I haven't installed android-23 so I can't test. I can only create AVD device with android-21
Once you install Android 23, you will be able to chose what API level to use for a specific device
That is my point, i don't want to install Android 21, because I have to test it on old devices
|

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.