Krystian was kind enough to take a look at this for me, but we’ve had no joy yet.
Can someone from Corona maybe comment on anything that could be causing this problem?
There’s more detail in the earlier posts, but to sum it up:
-
Needed to use multidexing due to dalvik 65536 method limit.
-
Added multidexing, the apk built successfully but on running it said that some Corona files were missing.
-
@krystian6 suggested copying the Corona files from the Enterprise folder into the project, instead of referencing them in project.properties - this worked and the app would run.
-
Facebook login now fails - it seems for the same reason that the Corona files did. However I do not seem to be able to just copy the Facebook SDK files into my project, because there are some src/com/facebook files which require the AndroidManifest that is in the Facebook SDK project and I cannot have 2 in my project (unless I’m missing something).
-
Now stuck as I cannot work out how to include the referenced project in my multidex build.
My CoronaApplication.java contains this:
package com.quiztix.mygame; import android.util.Log; import com.naef.jnlua.LuaState; import android.os.\*; import android.content.Context; import android.support.multidex.\*; public class CoronaApplication extends MultiDexApplication { /\*\* Called when your application has started. \*/ @Override public void onCreate() { // Set up a Corona runtime listener used to add custom APIs to Lua. com.ansca.corona.CoronaEnvironment.addRuntimeListener(new CoronaApplication.CoronaRuntimeEventHandler()); } @Override protected void attachBaseContext(Context base) { super.attachBaseContext(base); MultiDex.install(base); }
I’ve added the android-support-multidex.jar library to my project, and my build.xml is unchanged from my earlier post, and I’ve tried with and without having
android.library.reference.1=../../../../quiztixmain/enterprise/Plugins/sdk-facebook/android
in my project.properties file (the location of the SDK is valid btw, it’s worked in my project for over a year when not using multidexing).
After trying lots of different things I still can’t get it to detect the FB-sdk project files (for all I know it’s not actually building them in as it would when not using multi-dexing).
If a Corona engineer could give some advice that would be a huge help.