Android Question Tag Cloud

swabygw

Active Member
Licensed User
Longtime User
Is this (https://www.b4x.com/android/forum/threads/tag-cloud.35707/) being maintained? I ran version 092, with libraries Core, JavaObject, and SLColorUT checked, and got the following error:

** Activity (main) Create, isFirst = true **
** Activity (main) Resume **
java.lang.NoSuchMethodError: anywheresoftware.b4j.object.JavaObject.InitializeStatic
at b4a.example.slcolorlut._setcolors(slcolorlut.java:177)
at b4a.example.slcolorlut._initialize(slcolorlut.java:166)
at com.stevel05.tagcloud.sltagcloud._initialize(sltagcloud.java:93)
at com.stevel05.tagcloud.main._activity_resume(main.java:398)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:515)
at anywheresoftware.b4a.shell.Shell.runMethod(Shell.java:708)
at anywheresoftware.b4a.shell.Shell.raiseEventImpl(Shell.java:337)
at anywheresoftware.b4a.shell.Shell.raiseEvent(Shell.java:247)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:515)
at anywheresoftware.b4a.ShellBA.raiseEvent2(ShellBA.java:134)
at anywheresoftware.b4a.BA.raiseEvent(BA.java:153)
at com.stevel05.tagcloud.main.afterFirstLayout(main.java:108)
at com.stevel05.tagcloud.main.access$000(main.java:17)
at com.stevel05.tagcloud.main$WaitForLayout.run(main.java:80)
at android.os.Handler.handleCallback(Handler.java:733)
at android.os.Handler.dispatchMessage(Handler.java:95)
at android.os.Looper.loop(Looper.java:136)
at android.app.ActivityThread.main(ActivityThread.java:5017)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:515)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:779)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:595)
at dalvik.system.NativeStart.main(Native Method)
 

stevel05

Expert
Licensed User
Longtime User
Just downloaded and tested, it works OK here. What version of B4a and JavaObject library do you have?
 
Upvote 0

swabygw

Active Member
Licensed User
Longtime User
Copy of emulator

upload_2016-12-17_19-14-24.png
 
Upvote 0

swabygw

Active Member
Licensed User
Longtime User
Also have these libraries installed in Libraries folder:

upload_2016-12-17_19-17-15.png
 

Attachments

  • upload_2016-12-17_19-16-50.png
    upload_2016-12-17_19-16-50.png
    27 KB · Views: 131
Upvote 0

stevel05

Expert
Licensed User
Longtime User
Strange, I tried the pre-compiled library as well and it works as expected. Have you tried running it from the source?
 
Upvote 0

swabygw

Active Member
Licensed User
Longtime User
You've given me an idea - here's my project. I'm thinking that I have both the source on that second tab (the Class Module tab) and the compiled .jar in the Libraries directory. Could it be because they're in both places - the compiled in the directory and the source in the project?

upload_2016-12-17_19-26-2.png


I tried removing the compiled from the directory and running it again, but same error.
 
Upvote 0

stevel05

Expert
Licensed User
Longtime User
To remove it, you would need to deselect the library in the libraries Manager, then right click and select Refresh. Or clean the project (Tools menu). But it would cause an error with the library selected and the source in the project, but I'm not sure why you get the JavaObject NoSuchMethodError
 
Upvote 0

swabygw

Active Member
Licensed User
Longtime User
Didn't know I could do it without restarting. Here's what I did - I shut down B4A, took the .jar and .xml out of the directory, restarted B4A, loaded the TC project (0.92), cleaned the project, and run it...same error. Not sure about the Java error, either...could it be my version of JRE (1.8.0_112)?
 
Upvote 0

stevel05

Expert
Licensed User
Longtime User
Unlikely to be the JRE I would have though, I'm using 1.8.0_51. More likely to be to do with the emulator. Can you try it on a real device?
 
Upvote 0

swabygw

Active Member
Licensed User
Longtime User
Got a slightly different error running it on my Xperia:

Installing file.
PackageAdded: package:com.stevel05.tagcloud
** Activity (main) Create, isFirst = true **
** Activity (main) Resume **
java.lang.NoSuchMethodError: No virtual method InitializeStatic(Ljava/lang/String;)V in class Lanywheresoftware/b4j/object/JavaObject; or its super classes (declaration of 'anywheresoftware.b4j.object.JavaObject' appears in /data/app/com.stevel05.tagcloud-2/base.apk)
at b4a.example.slcolorlut._setcolors(slcolorlut.java:177)
at b4a.example.slcolorlut._initialize(slcolorlut.java:166)
at com.stevel05.tagcloud.sltagcloud._initialize(sltagcloud.java:93)
at com.stevel05.tagcloud.main._activity_resume(main.java:398)
at java.lang.reflect.Method.invoke(Native Method)
at java.lang.reflect.Method.invoke(Method.java:372)
at anywheresoftware.b4a.shell.Shell.runMethod(Shell.java:708)
at anywheresoftware.b4a.shell.Shell.raiseEventImpl(Shell.java:337)
at anywheresoftware.b4a.shell.Shell.raiseEvent(Shell.java:247)
at java.lang.reflect.Method.invoke(Native Method)
at java.lang.reflect.Method.invoke(Method.java:372)
at anywheresoftware.b4a.ShellBA.raiseEvent2(ShellBA.java:134)
at anywheresoftware.b4a.BA.raiseEvent(BA.java:153)
at com.stevel05.tagcloud.main.afterFirstLayout(main.java:108)
at com.stevel05.tagcloud.main.access$000(main.java:17)
at com.stevel05.tagcloud.main$WaitForLayout.run(main.java:80)
at android.os.Handler.handleCallback(Handler.java:739)
at android.os.Handler.dispatchMessage(Handler.java:95)
at android.os.Looper.loop(Looper.java:211)
at android.app.ActivityThread.main(ActivityThread.java:5317)
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:1016)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:811)
 
Upvote 0

stevel05

Expert
Licensed User
Longtime User
I've tried downloading all of the files and they all work as expected here. You don't have any old libraries in your 'additional libraries' folder that shouldn't be there do you? Core.jar, or JavaObject.jar maybe?
 
Upvote 0

swabygw

Active Member
Licensed User
Longtime User
I cleared out the Additional Libraries and Shared Modules, restarted, cleaned project, and same error. Could it be the SLColorLUT.jar file causing it?
 
Upvote 0

stevel05

Expert
Licensed User
Longtime User
It's strange if you don't get the problem running anything else. But nobody else has reported it.

If you reinstall it it won't clean out your additional libraries folder if it needs it.
 
Upvote 0
Top