File tree 1 file changed +14
-2
lines changed
src/processing/mode/android
1 file changed +14
-2
lines changed Original file line number Diff line number Diff line change @@ -164,13 +164,25 @@ public String getSearchPath() {
164
164
}
165
165
166
166
if (sdk == null ) {
167
- Messages .log ("Android SDK path couldn't be loaded." );
168
- return "" ;
167
+ Messages .log ("Android SDK path couldn't be loaded." );
168
+ return "" ;
169
169
}
170
170
171
171
String androidJarPath = sdk .getSdkFolder ().getAbsolutePath () +
172
172
File .separator + "platforms" + File .separator + "android-" +
173
173
AndroidBuild .sdkVersion + File .separator + "android.jar" ;
174
+
175
+ if (!new File (androidJarPath ).exists ()) {
176
+ // Try again using SDK name, I have seen the SDK stored as platforms/android-x.y.z
177
+ androidJarPath = sdk .getSdkFolder ().getAbsolutePath () +
178
+ File .separator + "platforms" + File .separator + "android-" +
179
+ AndroidBuild .sdkName + File .separator + "android.jar" ;
180
+ if (!new File (androidJarPath ).exists ()) {
181
+ Messages .log ("Android SDK path couldn't be loaded." );
182
+ return "" ;
183
+ }
184
+ }
185
+
174
186
String processingAndroidCoreJarPath = new File (getFolder (), "android-core.zip" ).getAbsolutePath ();
175
187
return androidJarPath + File .pathSeparatorChar + processingAndroidCoreJarPath ;
176
188
}
You can’t perform that action at this time.
0 commit comments