"Cannot find 'android.view' library" when trying example sketch
I've installed AndroidMode, and finally got it working with Processing (had to download version 3.0a11. Now I'm just trying to do a sample build to make sure it's running properly.
Here's the code I'm trying:
import android.view.MotionEvent;
void mouseDragged() {
MotionEvent me = (MotionEvent) mouseEvent.getNative();
// code here, like me.getHistorySize() and other Android-y things
}
import android.view.MotionEvent;
void mouseDragged() {
MotionEvent me = (MotionEvent) mouseEvent.getNative();
// code here, like me.getHistorySize() and other Android-y things
}
But I just keep getting told that there is no Android view library, or even no Android library if I try import android.*;
Please make sure you're in Android mode. Also, use the below code instead of the above code :
public void mouseDragged(MouseEvent event) {
//Your code here
}
@omerjerk @Manindra29 I run the mode after applying Manindra's fix https://github.com/processing/processing/commit/76a9facff4b579a40cf8bc0631503ee1115894c6 but still get
Cannot find "android.view" library. Line 1 in tab sketch_150828a
Is there anything else we need to update in the mode's code?
I'm also getting it. When I edit the code to add new import, I get exception here - https://github.com/processing/processing/blob/master/java/src/processing/mode/java/pdex/ErrorCheckerService.java#L871
This has now been fixed in https://github.com/processing/processing/commit/77801509fbf436603a2646e84bfcf0beb537b2ca
@codeanticode @omerjerk, please verify. We can then close this. @piethon1 Please download the latest processing-master to try it out.
This is fixed now with the latest commits by @Manindra29.
confirming that the "cannot find library" error is gone. This fix will be incorporated in the next release of the mode, to be out alongside beta 6. Thanks @Manindra29 !