Problem with Android examples

Post here your questions about the Java client / Android API for SFS2X

Moderators: Lapo, Bax

ViliamVolosV
Posts: 1
Joined: 17 Apr 2012, 18:33

Problem with Android examples

Postby ViliamVolosV » 17 Apr 2012, 18:44

Hi. Please help me

iIl try compile this examples on my computer, and all app have errors like this :

Code: Select all

04-17 18:01:18.493: E/AndroidRuntime(271): FATAL EXCEPTION: main

04-17 18:01:18.493: E/AndroidRuntime(271): java.lang.RuntimeException: Unable to instantiate activity ComponentInfo{sfs2x.example.android.tris/sfs2x.example.android.tris.Tris}: java.lang.ClassNotFoundException: sfs2x.example.android.tris.Tris in loader dalvik.system.PathClassLoader[/data/app/sfs2x.example.android.tris-2.apk]

04-17 18:01:18.493: E/AndroidRuntime(271):    at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2585)

04-17 18:01:18.493: E/AndroidRuntime(271):    at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2679)

04-17 18:01:18.493: E/AndroidRuntime(271):    at android.app.ActivityThread.access$2300(ActivityThread.java:125)

04-17 18:01:18.493: E/AndroidRuntime(271):    at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2033)

04-17 18:01:18.493: E/AndroidRuntime(271):    at android.os.Handler.dispatchMessage(Handler.java:99)

04-17 18:01:18.493: E/AndroidRuntime(271):    at android.os.Looper.loop(Looper.java:123)

04-17 18:01:18.493: E/AndroidRuntime(271):    at android.app.ActivityThread.main(ActivityThread.java:4627)

04-17 18:01:18.493: E/AndroidRuntime(271):    at java.lang.reflect.Method.invokeNative(Native Method)

04-17 18:01:18.493: E/AndroidRuntime(271):    at java.lang.reflect.Method.invoke(Method.java:521)

04-17 18:01:18.493: E/AndroidRuntime(271):    at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:868)

04-17 18:01:18.493: E/AndroidRuntime(271):    at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:626)

04-17 18:01:18.493: E/AndroidRuntime(271):    at dalvik.system.NativeStart.main(Native Method)

04-17 18:01:18.493: E/AndroidRuntime(271): Caused by: java.lang.ClassNotFoundException: sfs2x.example.android.tris.Tris in loader dalvik.system.PathClassLoader[/data/app/sfs2x.example.android.tris-2.apk]

04-17 18:01:18.493: E/AndroidRuntime(271):    at dalvik.system.PathClassLoader.findClass(PathClassLoader.java:243)

04-17 18:01:18.493: E/AndroidRuntime(271):    at java.lang.ClassLoader.loadClass(ClassLoader.java:573)

04-17 18:01:18.493: E/AndroidRuntime(271):    at java.lang.ClassLoader.loadClass(ClassLoader.java:532)

04-17 18:01:18.493: E/AndroidRuntime(271):    at android.app.Instrumentation.newActivity(Instrumentation.java:1021)

04-17 18:01:18.493: E/AndroidRuntime(271):    at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2577)

04-17 18:01:18.493: E/AndroidRuntime(271):    ... 11 more



I have:
Windows 7 X64, Eclipse and Android NDK last versions.
And i download late version od SmartFox server.

Please help me.
User avatar
A51Integrated
Posts: 240
Joined: 03 Jan 2012, 19:55
Location: Toronto, Canada
Contact:

Re: Problem with Android examples

Postby A51Integrated » 18 Apr 2012, 20:19

Have you had a look at this: viewtopic.php?f=22&t=13785&p=56229#p56229

It may have something to do with it.
A51 Integrated
http://a51integrated.com / +1 416-703-2300
protell
Posts: 2
Joined: 24 Apr 2012, 08:23

Re: Problem with Android examples

Postby protell » 24 Apr 2012, 08:26

I am having the exact same issue, same errors. I tried making the changes suggested in the link provided (changing lib folder to libs and cleaning), still getting same errors.

Image
protell
Posts: 2
Joined: 24 Apr 2012, 08:23

Re: Problem with Android examples

Postby protell » 24 Apr 2012, 10:14

I found the fix, it was on the link you provided. I did not need to change the lib to libs but instead needed to do the following:

To export the references: simply go to “Properties > Java Build Path > Order and Export”, and check all the references you want exported.

Thanks!
User avatar
A51Integrated
Posts: 240
Joined: 03 Jan 2012, 19:55
Location: Toronto, Canada
Contact:

Re: Problem with Android examples

Postby A51Integrated » 24 Apr 2012, 14:46

Glad you figured it out. Let us know if you have any other difficulties.
A51 Integrated

http://a51integrated.com / +1 416-703-2300
shravan.yadav
Posts: 15
Joined: 18 Jun 2012, 07:56

Re: Problem with Android examples

Postby shravan.yadav » 20 Jun 2012, 07:58

Hi All,

I am getting same problem when i try to run connector example . Stil i am getting froblem even i add the libs as acordingly to you.

06-20 13:16:56.264: E/AndroidRuntime(273): FATAL EXCEPTION: main
06-20 13:16:56.264: E/AndroidRuntime(273): java.lang.NullPointerException
06-20 13:16:56.264: E/AndroidRuntime(273): at sfs2x.example.android.connector.Connector$1.handleMessage(Connector.java:124)
06-20 13:16:56.264: E/AndroidRuntime(273): at android.os.Handler.dispatchMessage(Handler.java:99)
06-20 13:16:56.264: E/AndroidRuntime(273): at android.os.Looper.loop(Looper.java:123)
06-20 13:16:56.264: E/AndroidRuntime(273): at android.app.ActivityThread.main(ActivityThread.java:4627)
06-20 13:16:56.264: E/AndroidRuntime(273): at java.lang.reflect.Method.invokeNative(Native Method)
06-20 13:16:56.264: E/AndroidRuntime(273): at java.lang.reflect.Method.invoke(Method.java:521)
06-20 13:16:56.264: E/AndroidRuntime(273): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:868)
06-20 13:16:56.264: E/AndroidRuntime(273): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:626)
06-20 13:16:56.264: E/AndroidRuntime(273): at dalvik.system.NativeStart.main(Native Method)
06-20 13:16:57.034: W/lientSocketPipelineSink(273): Unexpected exception in the selector loop.
06-20 13:16:57.034: W/lientSocketPipelineSink(273): java.nio.channels.ClosedSelectorException
06-20 13:16:57.034: W/lientSocketPipelineSink(273): at org.apache.harmony.nio.internal.SelectorImpl.closeCheck(SelectorImpl.java:204)
06-20 13:16:57.034: W/lientSocketPipelineSink(273): at org.apache.harmony.nio.internal.SelectorImpl.selectInternal(SelectorImpl.java:236)
06-20 13:16:57.034: W/lientSocketPipelineSink(273): at org.apache.harmony.nio.internal.SelectorImpl.select(SelectorImpl.java:224)
06-20 13:16:57.034: W/lientSocketPipelineSink(273): at org.jboss.netty.channel.socket.nio.NioClientSocketPipelineSink$Boss.run(NioClientSocketPipelineSink.java:239)

Return to “SFS2X Java / Android API”

Who is online

Users browsing this forum: No registered users and 1 guest