-
-
Notifications
You must be signed in to change notification settings - Fork 297
Add android.jar to the searchable jars list for error checking stuffs #134
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
||
String androidJarPath = sdk.getSdkFolder().getAbsolutePath() + "/platforms/" | ||
+ "android-" + AndroidBuild.sdkVersion + "/android.jar"; | ||
System.out.println("androidJarPath = " + androidJarPath); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Accidental debug string?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh sorry. Pushing the fixed commit over it.
Signed-off-by: Umair Khan <[email protected]>
Add android.jar to the searchable jars list for error checking stuffs
@omerjerk, a couple of things I noticed: If the searchPath contains 2 files: FileA, FileB, I believe they should be separated by a : , as we do it in the system PATH environment variable.
I think it should be Also it's a bad idea to add / char in the path string. Please use the system independent File.pathSeparator |
@Manindra29 I applied the changes you suggested, but the problem is that sdk is null when getSearchPath() is called. @omerjerk any ideas? |
Can't we initilalise it or get its value before getSearchPath() is called? @omerjerk |
@codeanticode do you mean this sdk variable is null ? https://github.com/processing/processing-android/blob/master/src/processing/mode/android/AndroidMode.java#L164 I have tested a lot of time but haven't got NPE here at all. |
Also, what I do is I've created a test sketch having that |
Hi Umair, I added the following code in the getSearchPath() method: public String getSearchPath() {
System.out.println("in getSearchPath");
System.out.println(" SDK: " + sdk);
String androidJarPath = sdk.getSdkFolder().getAbsolutePath() +
File.separator + "platforms" + File.separator + "android-" +
AndroidBuild.sdkVersion + File.separator + "android.jar";
return super.getSearchPath() + File.pathSeparatorChar + androidJarPath;
} and I see the following in the terminal when I switch to the android mode from the PDE:
I'm using the latest revision from Processing. I also saved a minimal sketch with only the following code: import android.view.MotionEvent;
void mouseDragged() {
MotionEvent me = (MotionEvent) mouseEvent.getNative();
} Every time I open it I get the following error in the PDE console:
|
I get a null SDK when launching Processing from eclipse. Running the .app directly doesn't show SDK to be null. Any ideas what we might be missing? |
Okay. I'm also getting null sdk when I run from eclipse. Thanks @Manindra29 :) |
No description provided.