简体   繁体   中英

React Native running android with different version

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?

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.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM