On Tue, Oct 30, 2012 at 9:55 PM, sm8 <stats.ma
...@gmail.com> wrote:
> The following web site gives detailed instructions on building an Android
> app from the command line:
http://geosoft.no/development/Android.html
> If I want to enable EMMA instrumentation, for the Android build what are
> the extra commands that I would need to do?
> I tried the following:
> java -cp <Android sdk path>\tools\lib\emma.jar emma instr -instrpath obj -outdir objinstr
> dx --dex --output=<full_path>\bin\classes.dex <full_path>\objinstr <Android sdk path>\tools\lib\emma_device.jar
> Then followed the remaining instructions to build the APK (package the
> classes.dex using aapt, sign the app and zipalign).
> I am able to install the resultant APK on the device, but when I try to
> launch the app it crashes and I get the following error:
> W/dalvikvm( 1492): Exception Ljava/lang/Error; thrown while initializing Lcom/vladium/emma/rt/RT;
> W/dalvikvm( 1492): Exception Ljava/lang/ExceptionInInitializerError; thrown while initializing Lcom/mycompany/package1/HelloAndroid;
> W/dalvikvm( 1492): Class init failed in newInstance call (Lcom/mycompany/package1/HelloAndroid;)
> D/AndroidRuntime( 1492): Shutting down VM
> What am I missing while adding the instrumentation?
> Thanks!