As I'm fiddling with sconscripts...
The following appears in java/SConscript:
***************************************** Info
********************************
* Either 'Android API 21' is not installed or 'Android SDK Build Tools
* 20.0.0' is not installed. The Android SDK Manager will now open. Please
* be sure to deselect all options, then select the following 2 packages:
* 1. Under "Tools" select "Android SDK Build-tools" Revision 20.
* 2. Under "Android 5.0.1 (API 21)" select "SDK Platform"
Leading to a couple of questions:
Q1. Is Android SDK build-tools 20 really the one we want to point to?
The build.gradle files in java examples actually hardcode it:
android {
compileSdkVersion 21
buildToolsVersion "20.0.0"
...
but at least according to upstream docs, build tools 21 is where support
for API level 21 came in:
===
Build Tools, Revision 21.0.0 (October 2014)
General Notes:
Added support for Android 5.0 (API level 21).
RenderScript now supports seamless 32/64-bit operation for API
level 21 and higher.
Fixed issue with the Gradle build system when using the JaCoCo
plugin. (Issue 69174)
Added an input-list option for use with long command lines on
Windows.
Build Tools, Revision 20.0.0 (June 2014)
General Notes:
Added support for Android Wear.
===
(no mention of API 21 at all in the rev 20 section)
Current version in that line is build tools 21.1.2.
What should the comment actually say, and what should the files say,
about build-tools versions?
Q2. When I actually did an android build, I got a "lint" report which
opened in a browser, and had been generated in:
java/examples-android/simpleserver/build/outputs/lint-results.html
that makes some fairly vocal (rating it 6/10) complaints about the use
of such an old API level... is API 21 the right one for today's world?
Without further comment on my part (because I'm just looking at this for
the first time), here is the text of most of the complaint:
====================================
Correctness
OldTargetApi: Target SDK attribute is not targeting latest version
../../build.gradle:10: Not targeting the latest versions of Android;
compatibility modes apply. Consider testing and updating this version.
Consult the android.os.Build.VERSION_CODES javadoc for details.
7 defaultConfig {
8 applicationId "org.iotivity.base.examples.simpleserver"
9 minSdkVersion 21
10 targetSdkVersion 21
11 versionCode 1
12 versionName "1.0"
Note: This issue has an associated quickfix operation in Android
Studio/IntelliJ Fix
Priority: 6 / 10
Category: Correctness
Severity: Warning
Explanation: Target SDK attribute is not targeting latest version.
When your application runs on a version of Android that is more recent
than your targetSdkVersion specifies that it has been tested with,
various compatibility modes kick in.