Android Processing Filepath issues - android

I have a Android Processing sketch that used to work a few years ago but I need to update it and can't get it to run. It seems like there is a problem with having the path in the filename string but this used to work..
Any idea how to work around this problem? Ideally I would like to keep my code as is and figure out how to make it run on my device.
Thanks
Phil
FATAL EXCEPTION: GLThread 787
Process: processing.test.
pixelpetal_v09, PID: 1579
java.lang.IllegalArgumentException: File sequences/allseq_pixelData/pixelData00000.png contains a path separator
at android.app.ContextImpl.makeFilename(ContextImpl.java:2366)
at android.app.ContextImpl.getFileStreamPath(ContextImpl.java:1120)
at android.content.ContextWrapper.getFileStreamPath(ContextWrapper.java:191)
at processing.core.PApplet.sketchPath(Unknown Source)
at processing.core.PApplet.createInputRaw(Unknown Source)
at processing.core.PApplet.createInput(Unknown Source)
at processing.core.PApplet.loadImage(Unknown Source)
at processing.test.pixelpetal_v09.pixelpetal_v09.loadImageSequence(pixelpetal_v09.java:96)
at processing.test.pixelpetal_v09.pixelpetal_v09.setup(pixelpetal_v09.java:116)
at processing.core.PApplet.handleDraw(Unknown Source)
at processing.opengl.PGLES$AndroidRenderer.onDrawFrame(Unknown Source)
at android.opengl.GLSurfaceView$GLThread.guardedRun(GLSurfaceView.java:1522)
at android.opengl.GLSurfaceView$GLThread.run(GLSurfaceView.java:1239)

Related

UnityProject FATAL EXCEPTION: java.lang.NoSuchMethodError: No static method zzb [duplicate]

This question already has answers here:
Google.JarResolver.ResolutionException: Cannot resolve com.google.firebase:firebase-analytics-unity:1.0.0()
(2 answers)
Closed 6 years ago.
I am building an APK in Unity. I get no errors in the editor, nor at build time. However, once the APK is installed on the phone, it crashes on launch.
I have provided log output below that I can see in Android Studio when I monitor the phone while it crashes.
Can someone show me the way to fix it?
FATAL EXCEPTION: main
Process: com.Company.studio, PID: 28538
java.lang.NoSuchMethodError: No static method zzb(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object; in class Lcom/google/android/gms/common/internal/zzaa; or its super classes (declaration of 'com.google.android.gms.common.internal.zzaa' appears in /mnt/asec/com.Company.studio-1/base.apk)
at com.google.firebase.provider.FirebaseInitProvider.zza(Unknown Source)
at com.google.firebase.provider.FirebaseInitProvider.attachInfo(Unknown Source)
at android.app.ActivityThread.installProvider(ActivityThread.java:5342)
at android.app.ActivityThread.installContentProviders(ActivityThread.java:4916)
at android.app.ActivityThread.handleBindApplication(ActivityThread.java:4856)
at android.app.ActivityThread.access$1500(ActivityThread.java:182)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1538)
at android.os.Handler.dispatchMessage(Handler.java:111)
at android.os.Looper.loop(Looper.java:194)
at android.app.ActivityThread.main(ActivityThread.java:5654)
at java.lang.reflect.Method.invoke(Native Method)
at java.lang.reflect.Method.invoke(Method.java:372)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:969)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:764)
+------------------------------------------------------------------+
if you tell is duplicate same you said plz tell me about link to check it
marked as duplicate by rene, Bart, QPaysTaxes, Machavity, Paul Roub 13 hours ago
This question was marked as an exact duplicate of an existing question "
+-------------------------------------------------------------------+
Make a new project file and copy your code there and then build a fresh APK.

App crashing using Cloudrail 2.7.0 with portal statistics

After appearing to work for a while, cloudrail 2.7.0 is now repeatedly crashing with the following:
Fatal Exception: java.lang.RuntimeException: ServiceCode Error in function selfTest at 26
at com.cloudrail.si.servicecode.Interpreter.run(Unknown Source)
at com.cloudrail.si.servicecode.Interpreter.callFunction(Unknown Source)
at com.cloudrail.si.servicecode.InitSelfTest.execute(Unknown Source)
at com.cloudrail.si.servicecode.InitSelfTest.initTest(Unknown Source)
at com.cloudrail.si.statistics.InitSelfTestTask.run(Unknown Source)
Caused by java.lang.NullPointerException
at com.cloudrail.si.servicecode.commands.http.RequestCall.execute(Unknown Source)
at com.cloudrail.si.servicecode.Interpreter.run(Unknown Source)
at com.cloudrail.si.servicecode.Interpreter.callFunction(Unknown Source)
at com.cloudrail.si.servicecode.InitSelfTest.execute(Unknown Source)
at com.cloudrail.si.servicecode.InitSelfTest.initTest(Unknown Source)
at com.cloudrail.si.statistics.InitSelfTestTask.run(Unknown Source)
I have tried stepping through the code but cannot see the cause. What I can see is that, in InitSelfTest, the following line is not wrapped in at try/catch block and may therefore assume that appContext.getPackageName() is non null?
ip.callFunction("selfTest", new Object[]{interpreterStorage, appContext.getPackageName(), appInfo1.className, appVersionName, appVersionCode});
This issue is solved in version 2.7.1. It was reported through github as well: https://github.com/CloudRail/cloudrail-si-android-sdk/issues/38.

Can I work on Selenium and Android in same workspace?

For a project I am writing Selenium test cases for automation. On the other hand for other project I am designing a page in Android.
I have created some part of page in Android and now need to finish Selenium test cases. But as soon as I run one big error came. Then I thought that I have to change my workspace and kept Selenium test cases in another work space even then error is coming (different error).
Below is the error after changing workspace:
org.testng.TestNGException: Cannot find class in classpath: inventory
at org.testng.xml.XmlClass.loadClass(XmlClass.java:81) at
org.testng.xml.XmlClass.init(XmlClass.java:73) at
org.testng.xml.XmlClass.<init>(XmlClass.java:59) at
org.testng.xml.TestNGContentHandler.startElement(TestNGContentHandler.java:543)
at
com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.startElement(Unknown
Source) at
com.sun.org.apache.xerces.internal.parsers.AbstractXMLDocumentParser.emptyElement(Unknown
Source) at
com.sun.org.apache.xerces.internal.impl.dtd.XMLDTDValidator.emptyElement(Unknown
Source) at
com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanStartElement(Unknown
Source) at
com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl$FragmentContentDriver.next(Unknown
Source) at
com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl.next(Unknown
Source) at
com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown
Source) at
com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(Unknown
Source) at
com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(Unknown
Source) at
com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(Unknown
Source) at
com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(Unknown
Source) at
com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl$JAXPSAXParser.parse(Unknown
Source) at
com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl.parse(Unknown
Source) at javax.xml.parsers.SAXParser.parse(Unknown Source) at
org.testng.xml.XMLParser.parse(XMLParser.java:39) at
org.testng.xml.SuiteXmlParser.parse(SuiteXmlParser.java:17) at
org.testng.xml.SuiteXmlParser.parse(SuiteXmlParser.java:10) at
org.testng.xml.Parser.parse(Parser.java:168) at
org.testng.TestNG.initializeSuitesAndJarFile(TestNG.java:311) at
org.testng.remote.RemoteTestNG.run(RemoteTestNG.java:88) at
org.testng.remote.RemoteTestNG.initAndRun(RemoteTestNG.java:204) at
org.testng.remote.RemoteTestNG.main(RemoteTestNG.java:175)
Yes. You can create both projects in same work space.

Android NullPointerException in $Proxy0.equals

I've recently published a couple android games based in libgdx, both of them have reported an error I have no idea where to begin with debugging. This is the stacktrace.-
java.lang.NullPointerException: null result when primitive expected
at $Proxy0.equals(Native Method)
at com.google.android.gms.internal.dw$g.equals(Unknown Source)
at java.util.ArrayList.contains(ArrayList.java:342)
at com.google.android.gms.internal.dx.a(Unknown Source)
at com.google.android.gms.internal.dw$h.b(Unknown Source)
at com.google.android.gms.internal.dw$h.b(Unknown Source)
at com.google.android.gms.internal.dw$b.bR(Unknown Source)
at com.google.android.gms.internal.dw$a.handleMessage(Unknown Source)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loop(Looper.java:130)
at android.app.ActivityThread.main(ActivityThread.java:3687)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:507)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:867)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:625)
at dalvik.system.NativeStart.main(Native Method)
I know the problem is something related with Google Play Game Services, but can't figure out what can be causing it. In both cases, the android version seems to be 2.3.3. Anyone who faced the same issue?
Try going on properties on your android project , and under the android tag check to see if your google library is there . If it is there try removing it and add it again .
This is how i solved this problem and worked for me . (i still get this error sometimes when i start the eclipse ). Good luck !

Fatal exception :MQTTService NoClassDefFoundError: javax.microedition.io.Connector DaleLane's Systeme

I work on android one week ago and I must to use an MQTT's server in my Appy android(like mosquitto); because we going to work with an Delphy MQTT server. The Android's phone is the Galaxy Young in 2.3.6 ... API : 9
For learn how to use it, I testing the Dale Lane's Mosquitto for android but, After one day , i have found how i can do in forum...
Link for Dale Lane 's : http://dalelane.co.uk/blog/?p=1599
And my LogCat:
10-01 10:34:50.203 17844-17879/org.mosquitto.android.mqttdemo
W/Settings: Setting android_id has moved from
android.provider.Settings.System to android.provider.Settings.Secure,
returning read-only value.
10-01 10:34:50.250 17844-17879/org.mosquitto.android.mqttdemo
W/dalvikvm: threadid=11: thread exiting with uncaught exception
(group=0x40018578)
10-01 10:34:50.375 17844-17879/org.mosquitto.android.mqttdemo
E/AndroidRuntime: FATAL EXCEPTION: MQTTservice
java.lang.NoClassDefFoundError: javax.microedition.io.Connector
at com.ibm.mqtt.midp.MqttMidpSocket.setConnection(Unknown Source)
at com.ibm.mqtt.Mqtt.tcpipConnect(Unknown Source)
at com.ibm.mqtt.MqttBaseClient.doConnect(Unknown Source)
at com.ibm.mqtt.MqttBaseClient.connect(Unknown Source)
at com.ibm.mqtt.MqttClient.connect(Unknown Source)
at com.ibm.mqtt.MqttClient.connect(Unknown Source)
at org.mosquitto.android.powerviewer.MQTTService.connectToBroker(MQTTService.java:651)
at org.mosquitto.android.powerviewer.MQTTService.handleStart(MQTTService.java:285)
at org.mosquitto.android.powerviewer.MQTTService$2.run(MQTTService.java:209)
at java.lang.Thread.run(Thread.java:1019)
If someone can help me, thank's and sorry for my english ;)
If you really must use the IA92 code referenced in Dale's blog post you shouldn't be using the J2ME libraries on Android you want the J2SE version.
The IA92 code is deprecated, you should be using the eclipse paho code found here: http://www.eclipse.org/paho/

Categories

Resources