Android 6.0 crash - liblicensing.so: has text relocations

Our app is crashing immediately upon startup for Android 6.0 users with the following error:

error loading module ‘licensing’ from file ‘/data/app/com.sx.puzzingo-1/lib/arm/liblicensing.so’: dolmen failed: /data/app/com.sx.puzzingo-1/lib/arm/liblicensing.so: has text relocations

Looking at the logcat I see this:

10-12 12:06:50.964 12097 12097 D AndroidRuntime: Shutting down VM

--------- beginning of crash

10-12 12:06:50.964 12097 12097 E AndroidRuntime: FATAL EXCEPTION: main

10-12 12:06:50.964 12097 12097 E AndroidRuntime: Process: com.sx.puzzingo, PID: 12097

10-12 12:06:50.964 12097 12097 E AndroidRuntime: java.lang.RuntimeException: error loading module ‘licensing’ from file ‘/data/app/com.sx.puzzingo-1/lib/arm/liblicensing.so’:

10-12 12:06:50.964 12097 12097 E AndroidRuntime: dlopen failed: /data/app/com.sx.puzzingo-1/lib/arm/liblicensing.so: has text relocations

10-12 12:06:50.964 12097 12097 E AndroidRuntime: stack traceback:

10-12 12:06:50.964 12097 12097 E AndroidRuntime: [C]: ?

10-12 12:06:50.964 12097 12097 E AndroidRuntime: [C]: ?

10-12 12:06:50.964 12097 12097 E AndroidRuntime: [C]: in function ‘require’

10-12 12:06:50.964 12097 12097 E AndroidRuntime: /Users/jenkins/slaveroot/workspace/Enterprise/OS/xcode-6.4/release/release/platform/resources/init.lua:835: in function ‘require’

10-12 12:06:50.964 12097 12097 E AndroidRuntime: /Users/jenkins/slaveroot/workspace/Enterprise/OS/xcode-6.4/release/release/platform/android/ndk/shell.lua:64: in main chunk

10-12 12:06:50.973   596  1120 W ActivityManager:   Force finishing activity com.sx.puzzingo/com.ansca.corona.CoronaActivity

 

Does anyone know what’s causing this crash?  I tried a Corona SDK build and it worked on my Android 6.0 device, but my Enterprise build crashes.  Am I missing a library for my Enterprise build or a build setting?

Thanks,

Kenric

Forgot to mention that I’m using the latest Corona Enterprise build (2015.2731).

Can you file a bug report please. We are trying to gather all Android 6 bugs in the bug tracker so we can roll out support for Android 6 accordingly.

Rob

I filed the bug report.  Case # 43278

I managed to narrow down the issue to adding the following line in the AndroidManifest.xml file in the <application> section:

<meta-data android:name=“targetedAppStore” android:value=“google”/>

I ran into a similar crash involving the zip plugin after working around the above issue.  Just linking the zip plugin in the sample App project causes the runtime error.  I’ve filed the bug report - case # 43283.

Please expedite the fixes to these issues as these bugs are critical for us.

Thanks!

Kenric

Which Android “API level” are you targeting in your “AndroidManifest.xml” file?

That is, what number is your <application> element’s “android:targetSdkVersion” attribute set to?

For Corona Simulator built apps, we’re currently targeting API Level 21 (aka: Android 5.0) which works fine.

Typically, you would set the target API Level to what you’re compiling your app with, and not necessarily with what an Android library (such as Corona) targets.  So, you *should* be able to target API Level 23 fine, except I’ve noticed on stackoverflow that other developers are running into a similar error when target API Level 23 as well.  They solved it by targeting API Level 22 for the moment.

   http://stackoverflow.com/questions/32346402/libavcodec-so-has-text-relocations

I’m curious if this will solve the issue for you at the moment.  Worth a quick test.  Although, if you’re trying to get your app featured on Google Play, this might be a problem since Google wants featured apps to always target the latest/greatest API Level.

Thanks for the quick reply.

Yeah, I had set the targetSdkVersion to 23 because of the Google feature requirement.  Setting the targetSdkVersion to 21 fixes the problems, so we’re going to go with that for now.

Is there an estimate as to when API 23 will be fully supported by Corona?

We don’t have a time estimate for Android 6.0 support yet, because we keep getting yanked off of it to help out with all of the little fires/issues that have been discovered on Android 5.1 and 6.0.  We’re trying to take care of all of the little issues that’ll benefit everyone now before moving forward on targeting Android 6.0.  Typically, it takes us about 3 weeks (on average) to switch over everything on our end to target a new Android API level.  It’s a pretty large endeavor because it effects the Corona Simulator, our build server cluster, Corona Enterprise, CoronaCards, their sample/template projects, and our documentation.  Once we’re halfway into this, all other Android development needs to stop until this completed.  So, yeah, we’re trying to clear all of the little nagging issues that are blocking developers first before finishing our 6.0 support.

Forgot to mention that I’m using the latest Corona Enterprise build (2015.2731).

Can you file a bug report please. We are trying to gather all Android 6 bugs in the bug tracker so we can roll out support for Android 6 accordingly.

Rob

I filed the bug report.  Case # 43278

I managed to narrow down the issue to adding the following line in the AndroidManifest.xml file in the <application> section:

<meta-data android:name=“targetedAppStore” android:value=“google”/>

I ran into a similar crash involving the zip plugin after working around the above issue.  Just linking the zip plugin in the sample App project causes the runtime error.  I’ve filed the bug report - case # 43283.

Please expedite the fixes to these issues as these bugs are critical for us.

Thanks!

Kenric

Which Android “API level” are you targeting in your “AndroidManifest.xml” file?

That is, what number is your <application> element’s “android:targetSdkVersion” attribute set to?

For Corona Simulator built apps, we’re currently targeting API Level 21 (aka: Android 5.0) which works fine.

Typically, you would set the target API Level to what you’re compiling your app with, and not necessarily with what an Android library (such as Corona) targets.  So, you *should* be able to target API Level 23 fine, except I’ve noticed on stackoverflow that other developers are running into a similar error when target API Level 23 as well.  They solved it by targeting API Level 22 for the moment.

   http://stackoverflow.com/questions/32346402/libavcodec-so-has-text-relocations

I’m curious if this will solve the issue for you at the moment.  Worth a quick test.  Although, if you’re trying to get your app featured on Google Play, this might be a problem since Google wants featured apps to always target the latest/greatest API Level.

Thanks for the quick reply.

Yeah, I had set the targetSdkVersion to 23 because of the Google feature requirement.  Setting the targetSdkVersion to 21 fixes the problems, so we’re going to go with that for now.

Is there an estimate as to when API 23 will be fully supported by Corona?

We don’t have a time estimate for Android 6.0 support yet, because we keep getting yanked off of it to help out with all of the little fires/issues that have been discovered on Android 5.1 and 6.0.  We’re trying to take care of all of the little issues that’ll benefit everyone now before moving forward on targeting Android 6.0.  Typically, it takes us about 3 weeks (on average) to switch over everything on our end to target a new Android API level.  It’s a pretty large endeavor because it effects the Corona Simulator, our build server cluster, Corona Enterprise, CoronaCards, their sample/template projects, and our documentation.  Once we’re halfway into this, all other Android development needs to stop until this completed.  So, yeah, we’re trying to clear all of the little nagging issues that are blocking developers first before finishing our 6.0 support.