Forums

Home » Mobile » Liferay Mobile SDK

Combination View Flat View Tree View
Threads [ Previous | Next ]
toggle
Ravi Darji
Liferay Android Sample App Error
June 5, 2014 10:25 PM
Answer

Ravi Darji

Rank: New Member

Posts: 6

Join Date: May 14, 2014

Recent Posts

Hi, Bruno
I face some error in liferay android example which is given in your document. I import it in my Android Developer Tool.also SDK.jar,httpclient-android-4.3.3.jar and httpmime-4.3.3.jar library imported. But when i run it as a android application it throw this error in logcat. Which is mentioned below.
Please give me stepwise detail or doc because which doc you say in that not satisfied detail given. Please suggest me as a beginner. Because i use liferay poral but i m beginner in liferay Android.


06-06 05:13:08.207: E/dalvikvm(8068): Could not find class 'com.liferay.mobile.android.v62.user.UserService', referenced from method com.liferay.mobile.sample.task.UsersAsyncTask.doInBackground
06-06 05:13:08.230: E/dalvikvm(8068): Could not find class 'com.liferay.mobile.android.v62.group.GroupService', referenced from method com.liferay.mobile.sample.task.UsersAsyncTask.getGuestGroupId
06-06 05:13:12.197: E/AndroidRuntime(8068): FATAL EXCEPTION: AsyncTask #1
06-06 05:13:12.197: E/AndroidRuntime(8068): java.lang.RuntimeException: An error occured while executing doInBackground()
06-06 05:13:12.197: E/AndroidRuntime(8068): at android.os.AsyncTask$3.done(AsyncTask.java:299)
06-06 05:13:12.197: E/AndroidRuntime(8068): at java.util.concurrent.FutureTask.finishCompletion(FutureTask.java:352)
06-06 05:13:12.197: E/AndroidRuntime(8068): at java.util.concurrent.FutureTask.setException(FutureTask.java:219)
06-06 05:13:12.197: E/AndroidRuntime(8068): at java.util.concurrent.FutureTask.run(FutureTask.java:239)
06-06 05:13:12.197: E/AndroidRuntime(8068): at android.os.AsyncTask$SerialExecutor$1.run(AsyncTask.java:230)
06-06 05:13:12.197: E/AndroidRuntime(8068): at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1080)
06-06 05:13:12.197: E/AndroidRuntime(8068): at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:573)
06-06 05:13:12.197: E/AndroidRuntime(8068): at java.lang.Thread.run(Thread.java:856)
06-06 05:13:12.197: E/AndroidRuntime(8068): Caused by: java.lang.NoClassDefFoundError: com.liferay.mobile.android.service.SessionImpl
06-06 05:13:12.197: E/AndroidRuntime(8068): at com.liferay.mobile.sample.util.SettingsUtil.getSession(SettingsUtil.java:49)
06-06 05:13:12.197: E/AndroidRuntime(8068): at com.liferay.mobile.sample.task.UsersAsyncTask.doInBackground(UsersAsyncTask.java:46)
06-06 05:13:12.197: E/AndroidRuntime(8068): at com.liferay.mobile.sample.task.UsersAsyncTask.doInBackground(UsersAsyncTask.java:1)
06-06 05:13:12.197: E/AndroidRuntime(8068): at android.os.AsyncTask$2.call(AsyncTask.java:287)
06-06 05:13:12.197: E/AndroidRuntime(8068): at java.util.concurrent.FutureTask.run(FutureTask.java:234)
06-06 05:13:12.197: E/AndroidRuntime(8068): ... 4 more
Bruno Farache
RE: Liferay Android Sample App Error
June 6, 2014 6:41 AM
Answer

Bruno Farache

LIFERAY STAFF

Rank: Liferay Master

Posts: 505

Join Date: May 14, 2007

Recent Posts

Have you copied all jars to the "/libs" folder? Make sure you are not calling it "/lib", it must be "/libs".
Ravi Darji
RE: Liferay Android Sample App Error
June 9, 2014 2:21 AM
Answer

Ravi Darji

Rank: New Member

Posts: 6

Join Date: May 14, 2014

Recent Posts

Hi Bruno,
I was added jar in my project that i want to show you full path Right click on project>Build path>Configure Buildpath. In that Library Tab i added that 3 jar
is it ok or not? and 3 jar is (1) http client android 4.3.3
(2) http mime 4.3.3
(3) Liferay android sdk 6.2.0.5
i show in attachment image please see and tell me.
If anything is going wrong please inform me and also inform if it is ok.

Thanks.
Attachment

Attachments: liferay android jar.jpg (284.8k)
Bruno Farache
RE: Liferay Android Sample App Error
June 9, 2014 3:16 AM
Answer

Bruno Farache

LIFERAY STAFF

Rank: Liferay Master

Posts: 505

Join Date: May 14, 2007

Recent Posts

No, it doesn't look right.

As I told you previously, you need to copy these jars to inside the /libs folder, inside your project.

Our documentation is pretty clear about that and it's common to that in Android (except if you are using Gradle to build your project).
Ravi Darji
RE: Liferay Android Sample App Error
June 9, 2014 4:12 AM
Answer

Ravi Darji

Rank: New Member

Posts: 6

Join Date: May 14, 2014

Recent Posts

Hi Bruno
I dont use gradle it is already in the sample android project.
And i added 3 jar as shown in above snapshot was wrong? if wrong then please tell me directory at which i put all these jar
because in my project there is no lib folder.