File tree Expand file tree Collapse file tree 1 file changed +11
-3
lines changed
src/processing/mode/android Expand file tree Collapse file tree 1 file changed +11
-3
lines changed Original file line number Diff line number Diff line change @@ -95,9 +95,17 @@ class AndroidBuild extends JavaBuild {
95
95
static public final String min_sdk_handheld = "21" ; // Lollipop (5.0)
96
96
static public final String min_sdk_watchface = "23" ; // Marshmallow (6.0)
97
97
98
- // Hard-coded target SDK, no longer user-selected.
99
- static public final String target_sdk = "25" ; // Nougat (7.1.1)
100
- static public final String target_platform = "android-" + target_sdk ;
98
+ // Target SDK is stored in the preferences file.
99
+ static public String target_sdk ;
100
+ static public String target_platform ;
101
+ static {
102
+ target_sdk = Preferences .get ("android.sdk.target" );
103
+ if (PApplet .parseInt (target_sdk ) < 25 ) { // Must be Nougat (7.1.1) or higher
104
+ target_sdk = "25" ;
105
+ Preferences .set ("android.sdk.target" , target_sdk );
106
+ }
107
+ target_platform = "android-" + target_sdk ;
108
+ }
101
109
102
110
// Versions of Support, AppCompat, Wear and VR in use
103
111
// All of these are hard-coded, as the target_sdk. Should obtained from the
You can’t perform that action at this time.
0 commit comments