Running CommCare ODK locally

Hi,
I'm trying to get CommCare ODK running on my local machine - I followed
instructions from this page:
https://bitbucket.org/commcare/commcare-odk/wiki/devsetup

I'm using Eclipse for development, resolved all dependencies issues using
compiled javarosa-libraries.jar and commcare-libraries.jar. When I try to
run this app on emulator or real Device I got following stacktrace:

07-10 16:04:38.096: E/AndroidRuntime(905): FATAL EXCEPTION: main
07-10 16:04:38.096: E/AndroidRuntime(905): java.lang.RuntimeException:
Unable to instantiate activity
ComponentInfo{org.commcare.dalvik/org.commcare.dalvik.activities.CommCareHomeActivity}:
java.lang.ClassNotFoundException:
org.commcare.dalvik.activities.CommCareHomeActivity
07-10 16:04:38.096: E/AndroidRuntime(905): at
android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1880)
07-10 16:04:38.096: E/AndroidRuntime(905): at
android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:1981)
07-10 16:04:38.096: E/AndroidRuntime(905): at
android.app.ActivityThread.access$600(ActivityThread.java:123)
07-10 16:04:38.096: E/AndroidRuntime(905): at
android.app.ActivityThread$H.handleMessage(ActivityThread.java:1147)
07-10 16:04:38.096: E/AndroidRuntime(905): at
android.os.Handler.dispatchMessage(Handler.java:99)
07-10 16:04:38.096: E/AndroidRuntime(905): at
android.os.Looper.loop(Looper.java:137)
07-10 16:04:38.096: E/AndroidRuntime(905): at
android.app.ActivityThread.main(ActivityThread.java:4424)
07-10 16:04:38.096: E/AndroidRuntime(905): at
java.lang.reflect.Method.invokeNative(Native Method)
07-10 16:04:38.096: E/AndroidRuntime(905): at
java.lang.reflect.Method.invoke(Method.java:511)
07-10 16:04:38.096: E/AndroidRuntime(905): at
com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:784)
07-10 16:04:38.096: E/AndroidRuntime(905): at
com.android.internal.os.ZygoteInit.main(ZygoteInit.java:551)
07-10 16:04:38.096: E/AndroidRuntime(905): at
dalvik.system.NativeStart.main(Native Method)
07-10 16:04:38.096: E/AndroidRuntime(905): Caused by:
java.lang.ClassNotFoundException:
org.commcare.dalvik.activities.CommCareHomeActivity
07-10 16:04:38.096: E/AndroidRuntime(905): at
dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:61)
07-10 16:04:38.096: E/AndroidRuntime(905): at
java.lang.ClassLoader.loadClass(ClassLoader.java:501)
07-10 16:04:38.096: E/AndroidRuntime(905): at
java.lang.ClassLoader.loadClass(ClassLoader.java:461)
07-10 16:04:38.096: E/AndroidRuntime(905): at
android.app.Instrumentation.newActivity(Instrumentation.java:1023)
07-10 16:04:38.096: E/AndroidRuntime(905): at
android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1871)
07-10 16:04:38.096: E/AndroidRuntime(905): ... 11 more

Unfortunately following page:
https://confluence.dimagi.com/display/commcarepublic/Common+CommCare+Mobile+Dev+Workspace+Build+Errors
doesn't contain any clue what could be causing this issue.
I believe this might be some trivial error related to project Java Build
Path. Tried to follow instructions for similar problems, but without
results. I would appreciate any advices regarding this issue - I could
provide more config details/screenshots If needed.

Regards,
Marcin

Hi Marcin,

We usually encounter Dex errors when there are more than one copiy of the
source code in our project or we're accidentally importing some library
twice. I'd make sure that there's only one copy of the source for each
project in your workspace, make sure that all libraries are only in one
place, and particularly pay attention to the "Order and Export" tab of your
Build Properties screen for all packages - if you're exporting a lib from a
package that you're importing to another package its easy to end up with
two copies.

Best,
Will

··· On Thu, Jul 10, 2014 at 11:07 AM, sienioslav wrote:

Hi,
I'm trying to get CommCare ODK running on my local machine - I followed
instructions from this page:
https://bitbucket.org/commcare/commcare-odk/wiki/devsetup

I'm using Eclipse for development, resolved all dependencies issues using
compiled javarosa-libraries.jar and commcare-libraries.jar. When I try to
run this app on emulator or real Device I got following stacktrace:

07-10 16:04:38.096: E/AndroidRuntime(905): FATAL EXCEPTION: main
07-10 16:04:38.096: E/AndroidRuntime(905): java.lang.RuntimeException:
Unable to instantiate activity
ComponentInfo{org.commcare.dalvik/org.commcare.dalvik.activities.CommCareHomeActivity}:
java.lang.ClassNotFoundException:
org.commcare.dalvik.activities.CommCareHomeActivity
07-10 16:04:38.096: E/AndroidRuntime(905): at
android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1880)
07-10 16:04:38.096: E/AndroidRuntime(905): at
android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:1981)
07-10 16:04:38.096: E/AndroidRuntime(905): at
android.app.ActivityThread.access$600(ActivityThread.java:123)
07-10 16:04:38.096: E/AndroidRuntime(905): at
android.app.ActivityThread$H.handleMessage(ActivityThread.java:1147)
07-10 16:04:38.096: E/AndroidRuntime(905): at
android.os.Handler.dispatchMessage(Handler.java:99)
07-10 16:04:38.096: E/AndroidRuntime(905): at
android.os.Looper.loop(Looper.java:137)
07-10 16:04:38.096: E/AndroidRuntime(905): at
android.app.ActivityThread.main(ActivityThread.java:4424)
07-10 16:04:38.096: E/AndroidRuntime(905): at
java.lang.reflect.Method.invokeNative(Native Method)
07-10 16:04:38.096: E/AndroidRuntime(905): at
java.lang.reflect.Method.invoke(Method.java:511)
07-10 16:04:38.096: E/AndroidRuntime(905): at
com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:784)
07-10 16:04:38.096: E/AndroidRuntime(905): at
com.android.internal.os.ZygoteInit.main(ZygoteInit.java:551)
07-10 16:04:38.096: E/AndroidRuntime(905): at
dalvik.system.NativeStart.main(Native Method)
07-10 16:04:38.096: E/AndroidRuntime(905): Caused by:
java.lang.ClassNotFoundException:
org.commcare.dalvik.activities.CommCareHomeActivity
07-10 16:04:38.096: E/AndroidRuntime(905): at
dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:61)
07-10 16:04:38.096: E/AndroidRuntime(905): at
java.lang.ClassLoader.loadClass(ClassLoader.java:501)
07-10 16:04:38.096: E/AndroidRuntime(905): at
java.lang.ClassLoader.loadClass(ClassLoader.java:461)
07-10 16:04:38.096: E/AndroidRuntime(905): at
android.app.Instrumentation.newActivity(Instrumentation.java:1023)
07-10 16:04:38.096: E/AndroidRuntime(905): at
android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1871)
07-10 16:04:38.096: E/AndroidRuntime(905): ... 11 more

Unfortunately following page:
Common CommCare Mobile Dev Workspace Build Errors - CommCare Public - CommCare Public
doesn't contain any clue what could be causing this issue.
I believe this might be some trivial error related to project Java Build
Path. Tried to follow instructions for similar problems, but without
results. I would appreciate any advices regarding this issue - I could
provide more config details/screenshots If needed.

Regards,
Marcin

--


You received this message because you are subscribed to the Google Groups
"CommCare Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an
email to commcare-developers+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Hi Will,

Thanks for your helpful suggestions, now It works.

Regards,
Marcin

W dniu czwartek, 10 lipca 2014 17:21:50 UTC+2 użytkownik William Pride
napisał:

··· > > Hi Marcin, > > We usually encounter Dex errors when there are more than one copiy of the > source code in our project or we're accidentally importing some library > twice. I'd make sure that there's only one copy of the source for each > project in your workspace, make sure that all libraries are only in one > place, and particularly pay attention to the "Order and Export" tab of your > Build Properties screen for all packages - if you're exporting a lib from a > package that you're importing to another package its easy to end up with > two copies. > > Best, > Will > > > On Thu, Jul 10, 2014 at 11:07 AM, sienioslav <sieni...@gmail.com > wrote: > >> Hi, >> I'm trying to get CommCare ODK running on my local machine - I followed >> instructions from this page: >> https://bitbucket.org/commcare/commcare-odk/wiki/devsetup >> >> I'm using Eclipse for development, resolved all dependencies issues using >> compiled javarosa-libraries.jar and commcare-libraries.jar. When I try to >> run this app on emulator or real Device I got following stacktrace: >> >> 07-10 16:04:38.096: E/AndroidRuntime(905): FATAL EXCEPTION: main >> 07-10 16:04:38.096: E/AndroidRuntime(905): java.lang.RuntimeException: >> Unable to instantiate activity >> ComponentInfo{org.commcare.dalvik/org.commcare.dalvik.activities.CommCareHomeActivity}: >> java.lang.ClassNotFoundException: >> org.commcare.dalvik.activities.CommCareHomeActivity >> 07-10 16:04:38.096: E/AndroidRuntime(905): at >> android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1880) >> 07-10 16:04:38.096: E/AndroidRuntime(905): at >> android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:1981) >> 07-10 16:04:38.096: E/AndroidRuntime(905): at >> android.app.ActivityThread.access$600(ActivityThread.java:123) >> 07-10 16:04:38.096: E/AndroidRuntime(905): at >> android.app.ActivityThread$H.handleMessage(ActivityThread.java:1147) >> 07-10 16:04:38.096: E/AndroidRuntime(905): at >> android.os.Handler.dispatchMessage(Handler.java:99) >> 07-10 16:04:38.096: E/AndroidRuntime(905): at >> android.os.Looper.loop(Looper.java:137) >> 07-10 16:04:38.096: E/AndroidRuntime(905): at >> android.app.ActivityThread.main(ActivityThread.java:4424) >> 07-10 16:04:38.096: E/AndroidRuntime(905): at >> java.lang.reflect.Method.invokeNative(Native Method) >> 07-10 16:04:38.096: E/AndroidRuntime(905): at >> java.lang.reflect.Method.invoke(Method.java:511) >> 07-10 16:04:38.096: E/AndroidRuntime(905): at >> com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:784) >> 07-10 16:04:38.096: E/AndroidRuntime(905): at >> com.android.internal.os.ZygoteInit.main(ZygoteInit.java:551) >> 07-10 16:04:38.096: E/AndroidRuntime(905): at >> dalvik.system.NativeStart.main(Native Method) >> 07-10 16:04:38.096: E/AndroidRuntime(905): Caused by: >> java.lang.ClassNotFoundException: >> org.commcare.dalvik.activities.CommCareHomeActivity >> 07-10 16:04:38.096: E/AndroidRuntime(905): at >> dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:61) >> 07-10 16:04:38.096: E/AndroidRuntime(905): at >> java.lang.ClassLoader.loadClass(ClassLoader.java:501) >> 07-10 16:04:38.096: E/AndroidRuntime(905): at >> java.lang.ClassLoader.loadClass(ClassLoader.java:461) >> 07-10 16:04:38.096: E/AndroidRuntime(905): at >> android.app.Instrumentation.newActivity(Instrumentation.java:1023) >> 07-10 16:04:38.096: E/AndroidRuntime(905): at >> android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1871) >> 07-10 16:04:38.096: E/AndroidRuntime(905): ... 11 more >> >> Unfortunately following page: >> https://confluence.dimagi.com/display/commcarepublic/Common+CommCare+Mobile+Dev+Workspace+Build+Errors >> doesn't contain any clue what could be causing this issue. >> I believe this might be some trivial error related to project Java Build >> Path. Tried to follow instructions for similar problems, but without >> results. I would appreciate any advices regarding this issue - I could >> provide more config details/screenshots If needed. >> >> Regards, >> Marcin >> >> -- >> >> --- >> You received this message because you are subscribed to the Google Groups >> "CommCare Developers" group. >> To unsubscribe from this group and stop receiving emails from it, send an >> email to commcare-developers+unsubscribe@googlegroups.com . >> For more options, visit https://groups.google.com/d/optout. >> > >