Problem with Sketch Permissions

edited May 2014 in Android Mode

Hi, it seems like it was a bug more than a year ago. On GitHub it reads that this has been solved but I just updated Processing and I have this problem again: an AWTEvent Exception when trying to click on "Sketch Permissions" in the Menu:

Exception in thread "AWT-EventQueue-0" java.lang.NoSuchMethodError: processing.app.Toolkit.setIcon(Ljava/awt/Frame;)V
    at processing.mode.android.Permissions.<init>(Permissions.java:285)
    at processing.mode.android.AndroidEditor$6.actionPerformed(AndroidEditor.java:110)
    at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:2018)
    at javax.swing.AbstractButton$Handler.actionPerformed(AbstractButton.java:2341)
    at javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:402)
    at javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:259)
    at javax.swing.AbstractButton.doClick(AbstractButton.java:376)
    at com.apple.laf.ScreenMenuItem.actionPerformed(ScreenMenuItem.java:128)
    at java.awt.MenuItem.processActionEvent(MenuItem.java:669)
    at java.awt.MenuItem.processEvent(MenuItem.java:628)
    at java.awt.MenuComponent.dispatchEventImpl(MenuComponent.java:351)
    at java.awt.MenuComponent.dispatchEvent(MenuComponent.java:339)
    at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:738)
    at java.awt.EventQueue.access$200(EventQueue.java:103)
    at java.awt.EventQueue$3.run(EventQueue.java:694)
    at java.awt.EventQueue$3.run(EventQueue.java:692)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:76)
    at java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:87)
    at java.awt.EventQueue$4.run(EventQueue.java:708)
    at java.awt.EventQueue$4.run(EventQueue.java:706)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:76)
    at java.awt.EventQueue.dispatchEvent(EventQueue.java:705)
    at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:242)
    at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:161)
    at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:150)
    at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:146)
    at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:138)
    at java.awt.EventDispatchThread.run(EventDispatchThread.java:91)

Any workarounds?

Answers

  • Answer ✓

    I receive this error with Processing 2.2 as well, but 2.1.2 seems to work fine. If you can live with 2.1.2, then that might be considered a workaround.

    Otherwise, you can edit the AndroidManifest.xml file directly (this is all that the permissions selector does). The file should be created the first time that you run the sketch. You can add <uses-permission> tags within the <manifest> tag, before or after the <application>. For example, the WRITE_EXTERNAL_STORAGE permission would look like this:

    <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
    

    You can find a full list of permissions on the Android Developers Website.

Sign In or Register to comment.