Hi Adriano, Luciano, I tested the steps Adriano sent earlier in this thread. Initially I received the same error (related to "--core-library"), but after following [1] I no longer do. Before seeing something in eclipse, I experienced an error where it couldn't find the calculator.apk package. I then found out this was related to a missing .android/debug.keystore, that I suspect disappeared as a result of following [1] (although I'm still not sure).
Anyway, currently I am getting the errors shown below. I am getting these errors with and without the jar files for stax-api, which makes me suspicious. I'll continue looking into this and will keep you posted on any findings. 03-01 17:03:08.064: ERROR/AndroidRuntime(805): Uncaught handler: thread main exiting due to uncaught exception 03-01 17:03:08.093: ERROR/AndroidRuntime(805): java.lang.VerifyError: org.apache.tuscany.sca.host.embedded.impl.DefaultSCADomain 03-01 17:03:08.093: ERROR/AndroidRuntime(805): at org.apache.tuscany.sca.host.embedded.SCADomain.createNewInstance(SCADomain.java:183) 03-01 17:03:08.093: ERROR/AndroidRuntime(805): at org.apache.tuscany.sca.host.embedded.SCADomain.newInstance(SCADomain.java:63) 03-01 17:03:08.093: ERROR/AndroidRuntime(805): at calculator.android.CalculatorClient.onCreate(CalculatorClient.java:183) 03-01 17:03:08.093: ERROR/AndroidRuntime(805): at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1122) 03-01 17:03:08.093: ERROR/AndroidRuntime(805): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2104) 03-01 17:03:08.093: ERROR/AndroidRuntime(805): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2157) 03-01 17:03:08.093: ERROR/AndroidRuntime(805): at android.app.ActivityThread.access$1800(ActivityThread.java:112) 03-01 17:03:08.093: ERROR/AndroidRuntime(805): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1581) 03-01 17:03:08.093: ERROR/AndroidRuntime(805): at android.os.Handler.dispatchMessage(Handler.java:88) 03-01 17:03:08.093: ERROR/AndroidRuntime(805): at android.os.Looper.loop(Looper.java:123) 03-01 17:03:08.093: ERROR/AndroidRuntime(805): at android.app.ActivityThread.main(ActivityThread.java:3739) 03-01 17:03:08.093: ERROR/AndroidRuntime(805): at java.lang.reflect.Method.invokeNative(Native Method) 03-01 17:03:08.093: ERROR/AndroidRuntime(805): at java.lang.reflect.Method.invoke(Method.java:515) 03-01 17:03:08.093: ERROR/AndroidRuntime(805): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:739) 03-01 17:03:08.093: ERROR/AndroidRuntime(805): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:497) 03-01 17:03:08.093: ERROR/AndroidRuntime(805): at dalvik.system.NativeStart.main(Native Method) [1] http://commons.apache.org/scxml/usecases/scxml-stopwatch-on-android.html On Wed, Dec 24, 2008 at 11:40 PM, Luciano Resende <[email protected]>wrote: > On Sun, Dec 21, 2008 at 9:53 PM, Adriano Crestani > <[email protected]> wrote: > > Great Luciano, > > > > I'm trying the code you have commited. > > > > Instructions to get it running: > > > > 1. checkout the Java SCA 1.x from > > https://svn.apache.org/repos/asf/tuscany/branches/sca-java-1.x/, compile > and > > install it using mvn and etc > > > > 2. import all SCA modules, but tuscany-host-embedded, to your Eclipse > > workspace > > > > 3. rename the tuscany-host-android to tuscany-host-embedded, so you don't > > need to fix the other projects that are still referencing > > tuscany-host-embedded instead of tuscany-host-android > > > > Have you tried just updating the calculator-android to use > host-android ? this should avoid this step... > > > 3. Import samples/calculator-android to your workspace > > > > After these three steps, if you run calculator-android, you will get a no > > class not found exception when it tries to load XMLInputFactory, whihc > > belongs to stax api. It seems Android eclipse plugin still does not > include > > automatically the other projects' jar depencencies to Android project. So > > you need to add manually the stax-api and stax library jars to the > Android > > project. Unfortunatelly, when you try to compile it again, it will throw > > that error again about not allowing "core" libraries into Android > > applications. It happens because XMLInputFactory is defined in > > javax.xml.stream package, and this package is considered by android > compiler > > a core library :S > > > > So, here we go again back to this problem :S > > > > Luciano, when you get back from vacation, could you help me recompile the > > Android SDK with the stax classes and make it available for everybody?! : > ) > > > > Sorry i can't help now, my laptop broke on the 1st day of vacation :) > and I'm with very limited internet access from hotel library :) I'll > submit the patch to android project once I get back and I'll also try > to make some android.jar available for others to try in the meanwhile. > > > > Best Regards, > > Adriano Crestani > > > > > > > > On Sat, Dec 20, 2008 at 3:03 PM, Luciano Resende <[email protected]> > > wrote: > >> > >> Below are some updates on what I have done on Android on the last > >> couple days... > >> > >> - Store android sample app : a work in progress store app that runs on > >> android and consumes the services from Tuscany original store app. It > >> uses native JSON support from Android and uses JSON-RPC to invoke SCA > >> services. The catalog piece of this sample is working fine, but we > >> need to finish up the cart piece, mainly getting a button on the > >> catalog to add to cart and the logic behind this. > >> > >> - Android SCA Runtime (host-android / calculator-android) : This is > >> the effort we started during GSoC, I have made some progress in this > >> area, and right now I'm in the process of bootstrapping the tuscany > >> extensions in the host-android (similar to what we had before we > >> introduced the tuscany extension mechanism) to workaround the Android > >> limitation that concatenate all jars into a dex file and ignore the > >> META-INF pieces... this and the fixes on the android jar to allow > >> QNames should give us some progress on this effort. > >> > >> There is also a need to get some of these sample apps integrated to > >> the build environment, and I have looked into this in the past, but > >> haven't bring the android maven plugin to life yet. > >> > >> Well, anyone is welcome to help on both directions (the store-android > >> or Android SCA runtime)... > >> I'll also start working on this in the next couple days once I get > >> back from vacation... > >> > >> -- > >> Luciano Resende > >> Apache Tuscany, Apache PhotArk > >> http://people.apache.org/~lresende<http://people.apache.org/%7Elresende> > >> http://lresende.blogspot.com/ > > > > > > > > -- > Luciano Resende > Apache Tuscany, Apache PhotArk > http://people.apache.org/~lresende <http://people.apache.org/%7Elresende> > http://lresende.blogspot.com/ > -- best, -oscar Oscar CastaƱeda
