Error while executing a Corona Example in Device

Hello,

I downloades the following example about accelerometer funcionts trought this link: http://developer.coronalabs.com/content/accelerometer-1 I built for Android 2.2 and installed in my device to test accelerometer features.

When I execute this application it shows a wrong message in my device that says:

The application Accelerometer1 (process com.accelerometer) was interruped. Try again.

Every time that I execute the application is not posible to show anything.

My device is Samsung Galaxy Mini.

Is there any solution?

Many thanks.

What version of Corona are you using?

Were there any additional error messages?

Have you installed the Android Debug Bridge (adb) tools yet?  If so what is the output from an “adb logcat” command?

Hello Rob Miracle,

Thanks for your support. I’m using the last version of Corona SDK (2013.1076), in Corona SImulator terminal only appears this two messages:

Warning: could not load font verdana-bold. Using default font.

Warning: could not load font verdana-bold. Using default font.

Warning: Simulator does not support accelerometer events.

Today I installed SDK Android and ADB, but I detected that ADB is with console command interfase. Can do you explain me ( a little hoy can steps I do to it?

If so what is the output from an “adb logcat” command?

Many thanks,

Hi @gturmo,

The sample you’ve downloaded is somewhat old and outdated. Can you please test the current sample app on your device? It’s located in your local Corona SDK application directory here:

Corona SDK > SampleCode > Hardware > Accelerometer1

Take care,

Brent

Hi Brent,

I test again with this other example and it happens the same error message in my device. I don0t know what can be happening.

Also, I installed ADB tools but when I pu: “adb devices” without " it shows a blank list only: “List of devices attached”. I don’t know any solution or next steps that I can do.

Many thanks for your support.

If ADB devices is not showing you your connected device then the problem is possibly on your PC/Mac in drivers or the fact that you might not be putting your Android device in a mode called “USB Debugging”. See below : 

Please install or reinstall the Samsung Galaxy support software. The application which normal users use to synch their music etc. This will install the device drivers for your Samsung device so your PC or Mac can talk to it. 

Then you need to put your Samsung Galaxy into “USB Debugging” mode.

On Android 3.2 or older… Goto Applications - Settings - Applications - Development - Check USB Debugging

or 

On Android 4.0 and newer, it’s in Settings > Developer options.

Note: On Android 4.2 and newer, Developer options is hidden by default. To make it available, go to Settings > About phone and tap Build number seven times. Return to the previous screen to find Developer options.

Good info at the following URL : http://developer.android.com/tools/device.html

Hope this helps. 

There are several blog posts you can find by googling’ for “installing adb on mac” (or windows) and they will walk you through the needed steps to get your phone setup. 

Hello at all,

Finally I can install, test and use adb logcat to see hat happens when I run com.accelerometer application (many thaks for the explanation: ksan, the problem was with debug option in my Android device.

I attached a logcat.txt file with the error message. Now I found that log messages when I run Corona application are starting line:

I/ActivityThread( 3153): Pub com.accelerometer.files: com.ansca.corona.FileContentProvider

But I don’t understand any string.

I attached logcat here:

Many thanks for your support.

Glad you managed to get connected to your device. I took a quick look at your logcat.txt. Seems like it is the full listing. Suggest you use the following parameters to get the Corona related entries only. This will cut it down to a more manageable level. 

adb logcat Corona:v *:s

Good luck.

Here is the relevant lines:

I/ActivityThread( 3153): Pub com.accelerometer.files: com.ansca.corona.FileContentProvider W/dalvikvm( 3153): Exception Ljava/lang/UnsatisfiedLinkError; thrown while initializing Lcom/ansca/corona/JavaToNativeShim; W/dalvikvm( 3153): Exception Ljava/lang/ExceptionInInitializerError; thrown while initializing Lcom/ansca/corona/CoronaEnvironment; W/dalvikvm( 3153): threadid=1: thread exiting with uncaught exception (group=0x40018578) E/AndroidRuntime( 3153): FATAL EXCEPTION: main E/AndroidRuntime( 3153): java.lang.ExceptionInInitializerError E/AndroidRuntime( 3153): &nbsp;&nbsp; &nbsp;at com.ansca.corona.CoronaActivity.onCreate(CoronaActivity.java:107) E/AndroidRuntime( 3153): &nbsp;&nbsp; &nbsp;at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1047) E/AndroidRuntime( 3153): &nbsp;&nbsp; &nbsp;at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1615) E/AndroidRuntime( 3153): &nbsp;&nbsp; &nbsp;at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:1667) E/AndroidRuntime( 3153): &nbsp;&nbsp; &nbsp;at android.app.ActivityThread.access$1500(ActivityThread.java:117) E/AndroidRuntime( 3153): &nbsp;&nbsp; &nbsp;at android.app.ActivityThread$H.handleMessage(ActivityThread.java:935) E/AndroidRuntime( 3153): &nbsp;&nbsp; &nbsp;at android.os.Handler.dispatchMessage(Handler.java:99) E/AndroidRuntime( 3153): &nbsp;&nbsp; &nbsp;at android.os.Looper.loop(Looper.java:130) E/AndroidRuntime( 3153): &nbsp;&nbsp; &nbsp;at android.app.ActivityThread.main(ActivityThread.java:3687) E/AndroidRuntime( 3153): &nbsp;&nbsp; &nbsp;at java.lang.reflect.Method.invokeNative(Native Method) E/AndroidRuntime( 3153): &nbsp;&nbsp; &nbsp;at java.lang.reflect.Method.invoke(Method.java:507) E/AndroidRuntime( 3153): &nbsp;&nbsp; &nbsp;at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:867) E/AndroidRuntime( 3153): &nbsp;&nbsp; &nbsp;at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:625) E/AndroidRuntime( 3153): &nbsp;&nbsp; &nbsp;at dalvik.system.NativeStart.main(Native Method) E/AndroidRuntime( 3153): Caused by: java.lang.ExceptionInInitializerError E/AndroidRuntime( 3153): &nbsp;&nbsp; &nbsp;at com.ansca.corona.CoronaEnvironment.setLuaErrorHandler(CoronaEnvironment.java:373) E/AndroidRuntime( 3153): &nbsp;&nbsp; &nbsp;at com.ansca.corona.CoronaEnvironment.\<clinit\>(CoronaEnvironment.java:41) E/AndroidRuntime( 3153): &nbsp;&nbsp; &nbsp;... 14 more E/AndroidRuntime( 3153): Caused by: java.lang.UnsatisfiedLinkError: Couldn't load lua: findLibrary returned null E/AndroidRuntime( 3153): &nbsp;&nbsp; &nbsp;at java.lang.Runtime.loadLibrary(Runtime.java:429) E/AndroidRuntime( 3153): &nbsp;&nbsp; &nbsp;at java.lang.System.loadLibrary(System.java:554) E/AndroidRuntime( 3153): &nbsp;&nbsp; &nbsp;at com.ansca.corona.JavaToNativeShim.\<clinit\>(JavaToNativeShim.java:95) E/AndroidRuntime( 3153): &nbsp;&nbsp; &nbsp;... 16 more

I don’t see anything that stands out to me other than it crashed.  I’ll ask one of the engineers to look at it.  The are typically able to spot things.

A couple of questions:

  1. What is the device?

  2. What version of Android is it running?

  3. Are you sure it supports the accelerometer?

Hello ksan,

I test with this:

adb logcat Corona:v *:s

But console not works anymore only appears this message:

----------- beginning of dev/log/main

----------- beginning of dev/log/system

Hi Rob, thank you for your support.

  1. What is the device?

I’m working with Samsung Galaxy Mini (GT-S5570)

  1. What version of Android is it running?

I’m working with Android 2.3.6

  1. Are you sure it supports the accelerometer?

Yes, I played in other circumstances with games that needs accelerometer function.

Thank for your support.

Gerard

I’m afraid the device is the problem.  It has a: 600 MHz ARMv6 processor.  Corona SDK requires an ARMv7 or higher processor family.

What a pity! Many thanks for your support :wink: I’m seeing that I must buy someother modern device. Did Corona SDK programmers some roadmap to disable ARMv7 processors in a few months or years? I say it because I’m interested to buy some ARMv7 device (for example Galaxy mini 3) and I don’t want that in a short period I can’t use it.

Thank for this great support.

It’s a performance issues.  The ARMv7 family of processors (not to be confused with the ARM7 processor) is the minimum performance standard for Corona SDK.  I doubt that we will hit a point where ARMv7’s wouldn’t be fast enough in the future if they are fast enough today.

What version of Corona are you using?

Were there any additional error messages?

Have you installed the Android Debug Bridge (adb) tools yet?  If so what is the output from an “adb logcat” command?

Hello Rob Miracle,

Thanks for your support. I’m using the last version of Corona SDK (2013.1076), in Corona SImulator terminal only appears this two messages:

Warning: could not load font verdana-bold. Using default font.

Warning: could not load font verdana-bold. Using default font.

Warning: Simulator does not support accelerometer events.

Today I installed SDK Android and ADB, but I detected that ADB is with console command interfase. Can do you explain me ( a little hoy can steps I do to it?

If so what is the output from an “adb logcat” command?

Many thanks,

Hi @gturmo,

The sample you’ve downloaded is somewhat old and outdated. Can you please test the current sample app on your device? It’s located in your local Corona SDK application directory here:

Corona SDK > SampleCode > Hardware > Accelerometer1

Take care,

Brent

Hi Brent,

I test again with this other example and it happens the same error message in my device. I don0t know what can be happening.

Also, I installed ADB tools but when I pu: “adb devices” without " it shows a blank list only: “List of devices attached”. I don’t know any solution or next steps that I can do.

Many thanks for your support.

If ADB devices is not showing you your connected device then the problem is possibly on your PC/Mac in drivers or the fact that you might not be putting your Android device in a mode called “USB Debugging”. See below : 

Please install or reinstall the Samsung Galaxy support software. The application which normal users use to synch their music etc. This will install the device drivers for your Samsung device so your PC or Mac can talk to it. 

Then you need to put your Samsung Galaxy into “USB Debugging” mode.

On Android 3.2 or older… Goto Applications - Settings - Applications - Development - Check USB Debugging

or 

On Android 4.0 and newer, it’s in Settings > Developer options.

Note: On Android 4.2 and newer, Developer options is hidden by default. To make it available, go to Settings > About phone and tap Build number seven times. Return to the previous screen to find Developer options.

Good info at the following URL : http://developer.android.com/tools/device.html

Hope this helps. 

There are several blog posts you can find by googling’ for “installing adb on mac” (or windows) and they will walk you through the needed steps to get your phone setup.