OTP Android : fail to run the application on an emulator

234 views
Skip to first unread message

flivingstone

unread,
Jul 18, 2013, 10:14:57 AM7/18/13
to opentripp...@googlegroups.com
Hello guys,

I am trying to test the OTP Android app, and for that purpose, I have cloned the project on git hub (https://github.com/CUTR-at-USF/OpenTripPlanner-for-Android) and installed in Eclipse. Since I had to change the .pom  file, you will find below the environment configuration and the .pom file attached. At the end of my installation, I try to launch the application in my emulator and get the following error message.

E/AndroidRuntime(862): java.lang.RuntimeException: Unable to instantiate activity ComponentInfo{edu.usf.cutr.opentripplanner.android/edu.usf.cutr.opentripplanner.android.MyActivity}: java.lang.ClassNotFoundException: Didn't find class "edu.usf.cutr.opentripplanner.android.MyActivity" on path: /data/app/edu.usf.cutr.opentripplanner.android-1.apk

The same error message comes back with different emulators. Is there a bug in the code?


For information and since I had to update the Jackson dependencies for my installation, you will find below my environment and my .pom file.

Environment :
  • Windows 7 / Windows XP (tested on both)
  • Eclipse SDK Version: 4.2.0 (Juno)
  • Android API v17

Changes in the .pom file :

In order to have the deployment and the compilation successful, I had to change the original .pom file in order to load the Jackson dependencies. I couldn't get that working with the current .pom file. This file is attached and you can see the my changes below the original commented code. For example :

        <dependency>
            <groupId>com.fasterxml.jackson.core</groupId>
            <artifactId>jackson-core</artifactId>
            <!--<version>2.1.1-SNAPSHOT</version>-->
            <version>2.2.3-SNAPSHOT</version>
        </dependency>

And of course, I modified the .pom and .project file to run with my version of Android, which 17 compared to 15 by default in the original files.

Any help or feedback would be really appreciated.

Regards,





pom.xml

Sean Barbeau

unread,
Jul 19, 2013, 9:19:06 AM7/19/13
to opentripp...@googlegroups.com
flivingstone,
Thanks for the heads up on the Jackson module change.  I'm guessing some of us working on the app didn't notice this since we have had a copy of the older Jackson artifact in our local maven repo.  I'll see if I can push a fix for that today to the master (pull requests also accepted, if you want to submit it).

I believe the error you're seeing is a problem with the latest Android tools for Eclipse, in that they don't automatically configure the project properly on import to make sure that all necessary dependencies and included in the compiled application.

Try going to "Properties->Java Build Path" and then the "Order and Export" tab.  You'll need to make sure that the "android-support-v4.jar" and "Maven Dependencies" both have checks next to them.

Then, try cleaning and building, and see if it works.

Please let me know if that doesn't fix the problem.

Sean

Barbeau, Sean

unread,
Jul 19, 2013, 9:21:40 AM7/19/13
to Barbeau, Sean, opentripp...@googlegroups.com

Issue opened here for the Jackson artifact:

https://github.com/CUTR-at-USF/OpenTripPlanner-for-Android/issues/31

 

Sean

--
You received this message because you are subscribed to a topic in the Google Groups "OpenTripPlanner Developers" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/opentripplanner-dev/a9b_bCYyBVs/unsubscribe.
To unsubscribe from this group and all its topics, send an email to opentripplanner...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
 
 

Sean Barbeau

unread,
Jul 22, 2013, 3:55:09 PM7/22/13
to opentripp...@googlegroups.com, Barbeau, Sean
Jackson artifact issue #31 should now be resolved in master, please let me know if you still have problems.

Sean

To unsubscribe from this group and all its topics, send an email to opentripplanner-dev+unsub...@googlegroups.com.

flivingstone

unread,
Jul 23, 2013, 9:34:36 AM7/23/13
to opentripp...@googlegroups.com
Hello Sean,

Thanks for the reply. I was looking at how to commit the change this morning but I am glad you did it yourself. The problem is indeed in the way the Android tool in Eclipse configure the project. The fix you suggested (Try going to "Properties->Java Build Path" and then the "Order and Export" tab.  You'll need to make sure that the "android-support-v4.jar" and "Maven Dependencies" both have checks next to them.) worked like a charm.
I will keep playing with that.

Thanks a lot for your clear explanation.

On Thursday, July 18, 2013 10:14:57 AM UTC-4, flivingstone wrote:

Sean Barbeau

unread,
Jul 25, 2013, 10:59:30 AM7/25/13
to opentripp...@googlegroups.com
Fliningstone,
I also just (hopefully) pushed a fix for the support library export issue (https://github.com/CUTR-at-USF/OpenTripPlanner-for-Android/issues/32), if you want to try it out and let me know if it now works by default after a fresh clone of master.

Sean
Reply all
Reply to author
Forward
0 new messages