Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How do I install Android SDK Platform-Tools 24.0.0?

I'm following the guide for setting up the Android N Preview https://developer.android.com/preview/setup-sdk.html

In "Update or Create a Project" Google says I need to have 24.0.0 platform tools.

Just be sure that you've updated your project to use Android SDK Build Tools 24.0.0 and Android SDK Platform-Tools 24.0.0.

I have installed the new SDK Platform: Android 6.X (N), API Level 24, Revision 1. However when I open SDK Tools the only Android SDK Platform-Tools version is 23.1.

Android Studio Platform-Tools 23.1

I have updated my build.gradle for Android 24 and for Jack and Java 8 (see).

Everything works great on Android 24 simulator but crashes on a device or simulator running Android 22/23 (less than 24) with the following error:

java.lang.NoSuchMethodError: No virtual method stream()Ljava/util/stream/Stream; in class Ljava/util/ArrayList; or its super classes (declaration of 'java.util.ArrayList' appears in /system/framework/core-libart.jar)

I suspect the cause is having SDK Platform-Tools version 23.1.0 instead of 24.0.0 but if there is another solution i'd be happy to hear it.

Edit

Installing platform tools 24.0.0 rc1 did not fix the crash. I'm not sure what else to try given that I have followed all the instructions to setup the preview and the Jack compiler.

like image 490
Kevin Avatar asked Jun 16 '16 20:06

Kevin


2 Answers

but crashes on a device or simulator running Android 22/23 (less than 24) with the following error

java.util.stream.Stream was added in API Level 24. This class cannot be used on older devices.

Certain Java 8 features, like lambda expressions, may work on older devices, but not classes that were introduced in Android N.

like image 153
CommonsWare Avatar answered Oct 18 '22 10:10

CommonsWare


Just select the show package details and then you can find all the versions. Refer to the attached image

enter image description here

like image 33
Varun Maheshwari Avatar answered Oct 18 '22 09:10

Varun Maheshwari