Java Question bindService in a Wrapper

TheMightySwe

Active Member
Licensed User
Longtime User
Don't wrap a full activity or service unless you must. It will be simpler. You can call it from anywhere you like as long as it gets called once.


OK, now i get this error instead.

I have tried to copy the .so files to /lib didn't work. I have tried to copy them to both /armeabi-v7 and /armeabi-v7b

Any suggestions?

java.lang.UnsatisfiedLinkError: Couldn't load pclapi: findLibrary returned null
at java.lang.Runtime.loadLibrary(Runtime.java:365)
at java.lang.System.loadLibrary(System.java:535)
at se.iqpd.checkout.plus.ISMP_Companion.Initialize(ISMP_Companion.java:130)
at se.iqpd.checkout.plus.main._activity_resume(main.java:1434)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:511)
at anywheresoftware.b4a.BA.raiseEvent2(BA.java:174)
at anywheresoftware.b4a.BA.raiseEvent(BA.java:158)
at se.iqpd.checkout.plus.main.afterFirstLayout(main.java:104)
at se.iqpd.checkout.plus.main.access$100(main.java:16)
at se.iqpd.checkout.plus.main$WaitForLayout.run(main.java:76)
at android.os.Handler.handleCallback(Handler.java:605)
at android.os.Handler.dispatchMessage(Handler.java:92)
at android.os.Looper.loop(Looper.java:137)
at android.app.ActivityThread.main(ActivityThread.java:4514)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:511)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:790)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:557)
at dalvik.system.NativeStart.main(Native Method)
** Activity (main) Resume **
 

TheMightySwe

Active Member
Licensed User
Longtime User
The folder should be named lib.

I still can't get it to work, it's very very frustrating.

I just post the source i someone want to have a quick look at it, it's probably something really dumb i'm missing.
 

Attachments

  • ISMP2.zip
    335.7 KB · Views: 278

TheMightySwe

Active Member
Licensed User
Longtime User
Did you get the same error? If the lib folder included in the jar file?

Yes

B4X:
ISMPWrapper(IsInitialized): IsInitialized=false
ISMPWrapper: Initialize
java.lang.UnsatisfiedLinkError: Couldn't load pclapi: findLibrary returned null
    at java.lang.Runtime.loadLibrary(Runtime.java:365)
    at java.lang.System.loadLibrary(System.java:535)
    at se.iqpd.checkout.plus.ISMP_Companion.Initialize(ISMP_Companion.java:133)
    at se.iqpd.checkout.plus.main._activity_resume(main.java:1434)
    at java.lang.reflect.Method.invokeNative(Native Method)
    at java.lang.reflect.Method.invoke(Method.java:511)
    at anywheresoftware.b4a.BA.raiseEvent2(BA.java:174)
    at anywheresoftware.b4a.BA.raiseEvent(BA.java:158)
    at se.iqpd.checkout.plus.main.afterFirstLayout(main.java:104)
    at se.iqpd.checkout.plus.main.access$100(main.java:16)
    at se.iqpd.checkout.plus.main$WaitForLayout.run(main.java:76)
    at android.os.Handler.handleCallback(Handler.java:605)
    at android.os.Handler.dispatchMessage(Handler.java:92)
    at android.os.Looper.loop(Looper.java:137)
    at android.app.ActivityThread.main(ActivityThread.java:4514)
    at java.lang.reflect.Method.invokeNative(Native Method)
    at java.lang.reflect.Method.invoke(Method.java:511)
    at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:790)
    at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:557)
    at dalvik.system.NativeStart.main(Native Method)
** Activity (main) Resume **
 

TheMightySwe

Active Member
Licensed User
Longtime User
Wait a minute, did you mean the B4A lib dirctory or inside Eclipse or Librarys in B4A?
 

TheMightySwe

Active Member
Licensed User
Longtime User
Did you get the same error? If the lib folder included in the jar file?


Wait a minute, I just saw something when i make the JAR.

Get this error message....

JAR export finished with warnings. See details for additional information.
Can not export external class folder at 'C:\B4A Projekt\ISMP2\lib'.


What can that mean?
 

TheMightySwe

Active Member
Licensed User
Longtime User
You should read about SLC and how it should be configured.


Yes, I got past this error, but now I get a really small .jar without .so files. What do you tink i'm missing, or shall i add the /lib/*.so manually?
 
Cookies are required to use this site. You must accept them to continue using the site. Learn more…