Skip to content

Commit b1077ee

Browse files
committed
cleaned up code
1 parent fd8de35 commit b1077ee

File tree

1 file changed

+6
-7
lines changed

1 file changed

+6
-7
lines changed

src/processing/mode/android/AndroidMode.java

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -168,15 +168,14 @@ public String getSearchPath() {
168168
return "";
169169
}
170170

171-
String androidJarPath = sdk.getSdkFolder().getAbsolutePath() +
172-
File.separator + "platforms" + File.separator + "android-" +
173-
AndroidBuild.sdkVersion + File.separator + "android.jar";
174-
171+
String path = sdk.getSdkFolder().getAbsolutePath() + File.separator +
172+
"platforms" + File.separator + "android-";
173+
String ver = AndroidBuild.sdkVersion;
174+
String name = AndroidBuild.sdkName;
175+
String androidJarPath = path + ver + File.separator + "android.jar";
175176
if (!new File(androidJarPath).exists()) {
176177
// 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";
178+
androidJarPath = path + name + File.separator + "android.jar";
180179
if (!new File(androidJarPath).exists()) {
181180
Messages.log("Android SDK path couldn't be loaded.");
182181
return "";

0 commit comments

Comments
 (0)