The Azure SDK for Java is primarily targeted for use in non-Android environments, however it has been shown to work on Android devices. Because of the dependencies used by the Azure SDK for Java, by default the client libraries have an Android baseline of API level 26. What is presented below is a short tutorial on the steps required to desugar a Java client library such that it can work on Android API level 21 and later. There is a sample application available on GitHub that can be used to get started quickly.
Steps to desugar down to API level 21The following steps assume an existing Android application with a Gradle build already setup. They also assume Android Studio 4.0 or later is available and being used.
build.gradle
file, as demonstrated here.build.gradle
file as such (refer to this):
compileSdkVersion
to 29.buildToolsVersion
to 29.0.2.minSdkVersion
to 21.multiDexEnabled
to true.buildTypes
to have minifyEnabled
set to true and shrinkResources
set to true.compileOptions
to have sourceCompatibility
and targetCompatibility
to be JavaVersion.VERSION_1_8
.coreLibraryDesugaringEnabled
to true.coreLibraryDesugaring
library shown here.multidex
dependency shown here.RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4