Skip to content

Commit 0fc715f

Browse files
committed
Fixed #132
1 parent 7caa37f commit 0fc715f

File tree

2 files changed

+5
-4
lines changed

2 files changed

+5
-4
lines changed

src/processing/mode/android/AndroidEditor.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ public UpdateDeviceListTask(JMenu deviceMenu) {
6060

6161
@Override
6262
public void run() {
63-
if (androidMode.getSDK() == null) return;
63+
if (androidMode == null || androidMode.getSDK() == null) return;
6464

6565
final Devices devices = Devices.getInstance();
6666
java.util.List<Device> deviceList = devices.findMultiple(false);

src/processing/mode/android/AndroidMode.java

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,7 @@ public class AndroidMode extends JavaMode {
4747

4848
public AndroidMode(Base base, File folder) {
4949
super(base, folder);
50+
checkSDK(null);
5051
}
5152

5253

@@ -135,7 +136,7 @@ public void checkSDK(Editor parent) {
135136
try {
136137
sdk = AndroidSDK.load();
137138
// FIXME REVERT THIS STATEMENT AFTER TESTING (should be ==)
138-
if (sdk == null) {
139+
if (sdk == null && parent != null) {
139140
sdk = AndroidSDK.locate(parent, this);
140141
}
141142
} catch (BadSDKException e) {
@@ -164,7 +165,7 @@ public String getSearchPath() {
164165
String androidJarPath = sdk.getSdkFolder().getAbsolutePath() +
165166
File.separator + "platforms" + File.separator + "android-" +
166167
AndroidBuild.sdkVersion + File.separator + "android.jar";
167-
return super.getSearchPath() + File.pathSeparatorChar + androidJarPath;
168+
return androidJarPath;
168169
}
169170

170171

@@ -320,4 +321,4 @@ protected void buildReleaseForExport(Sketch sketch, String target) throws Monito
320321
private static class MonitorCanceled extends Exception {
321322
}
322323
*/
323-
}
324+
}

0 commit comments

Comments
 (0)