Android says min-api 26


I am trying to get a simple demo app going so I can learn to use the Android Device Setup Library. I have followed the instructions here. That is I have added “implementation ‘io.particle:devicesetup:0.5.3’” to my build.gradle for my app module. Other than that the app is an empty activity with an added button to call the initWithSetupOnly method in its onClick listener. When I try to build the app I get “Compilation failed to complete” with 5 errors.


Invoke-customs are only supported starting with Android O (--min-api 26)
Message{kind=ERROR, text=Invoke-customs are only supported starting with Android O (--min-api 26), sources=[Unknown source file], tool name=Optional.of(D8)}

Caused by: Failed to process C:\Users\Colin\.gradle\caches\transforms-1\files-1.1\cloudsdk-0.4.9.aar\19f92468c2e3734a4b7c4574815eb1cb\jars\classes.jar

Caused by: Error while dexing.

Caused by: Compilation failed to complete

Caused by:

If I set minSdkVersion to 26 as is suggested by the error message the build completes successfully, but I was hoping to set the minimum version lower. I see that the Particle Tinker app has minSdkVersion set to 15.

Can anyone tell me what I’m doing wrong?

My Android studio about panel:

Android Studio 3.1.1
Build #AI-173.4697961, built on April 3, 2018
JRE: 1.8.0_152-release-1024-b02 amd64
JVM: OpenJDK 64-Bit Server VM by JetBrains s.r.o
Windows 10 10.0


The way I worked around this was to use the 0.4.9 version of the device setup SDK. It only requires API 15.

Instructions here:

Thanks for that. I changed

implementation 'io.particle:devicesetup:0.5.3'


implementation 'io.particle:devicesetup:0.4.9'


implementation ''


implementation ''

in my build.gradle and now my build succeeds.

1 Like