Skip to content

"Cannot find 'android.view' library" when trying example sketch #128

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

Closed
piethon1 opened this issue Aug 4, 2015 · 6 comments
Closed

"Cannot find 'android.view' library" when trying example sketch #128

piethon1 opened this issue Aug 4, 2015 · 6 comments

Comments

@piethon1
Copy link

piethon1 commented Aug 4, 2015

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.*;

@omerjerk
Copy link
Contributor

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
}

@codeanticode
Copy link
Contributor

@omerjerk @Manindra29 I run the mode after applying Manindra's fix processing/processing@76a9fac 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?

@omerjerk
Copy link
Contributor

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

@Manindra29
Copy link
Member

This has now been fixed in processing/processing@7780150

@codeanticode @omerjerk, please verify. We can then close this.
@piethon1 Please download the latest processing-master to try it out.

@omerjerk
Copy link
Contributor

This is fixed now with the latest commits by @Manindra29.

@codeanticode
Copy link
Contributor

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 !

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants