Great! I’m glad you got it working!
And thanks for posting your results too.
I’m sure it’ll help other Corona Enterprise developers as well. [import]uid: 32256 topic_id: 35089 reply_id: 140415[/import]
I am also having issues getting my project to run from within Eclipse. I have got the project compiling, pulling in the correct libraries and running. The issue I am hitting is a message saying that the Lua may be corrupted.
How am I supposed to handle the lua files? Do I build via the build.sh script which will update the data files within the eclipse project then switch to eclipse?
I would be very interested to hear how you are handling the data files as my productivity has hit rock bottom since switching from Pro, not what I wanted to happen … I didn’t really have enough hours in the day as it was.
Regards,
Bruce
Bruce,
Eclipse builds your Android app via the “ant” command line tool, just like our “build.sh” script. Your project’s “build.xml” file instructs “ant” how to build your app. If you look at the Corona Enterprise sample projects, notice that their “build.xml” files contain “-pre-build” and “-post-package” tasks which compile your Lua scripts and transfer your Corona files to your Android app project’s “assets” directory. I suspect that your Eclipse managed “build.xml” is missing these tasks. So, you’ll need to copy them into this file. But you can’t do a straight copy. Notice that there is a “${CoronaEnterpriseDir}” ant property that is not defined in the “build.xml” and is instead set via our “build.sh” script. The simplest solution here is to replace this property with the to your Corona Enterprise folder.
I created my project from existing source so the pre and post steps are there in the build.xml file. However, it simply looks like they are not being run for some reason. Is there any chance of a “Dummy’s guide” to setting up on of the Corona samples in Eclipse, please?
Did you copy the sample’s XML tags to your “build.xml” yourself instead of via Eclipse? As in editing the file by hand? Because I believe that’s what you need to do. The XML tag that needs to compile your Lua scripts actually needs to happen just before the pre-build step in the ant build.xml, which is why it is a “-pre-build” task name (notice the dash in front). Otherwise the Android SDK build system will compile your APK before your Corona assets get copied into your Android project’s “assets” directory.
Other than that, my knowledge of Eclipse is a bit limited. It’s absolutely possible to make Eclipse work with Corona (we’re just a library and a pre-build step afterall). Internally, we don’t use Eclipse for Android development anymore. Especially since we know that Google is going to switch over to their upcoming Android Studio IDE which is currently in beta. When that happens, Android projects will be set up very differently.
I am also having issues getting my project to run from within Eclipse. I have got the project compiling, pulling in the correct libraries and running. The issue I am hitting is a message saying that the Lua may be corrupted.
How am I supposed to handle the lua files? Do I build via the build.sh script which will update the data files within the eclipse project then switch to eclipse?
I would be very interested to hear how you are handling the data files as my productivity has hit rock bottom since switching from Pro, not what I wanted to happen … I didn’t really have enough hours in the day as it was.
Regards,
Bruce
Bruce,
Eclipse builds your Android app via the “ant” command line tool, just like our “build.sh” script. Your project’s “build.xml” file instructs “ant” how to build your app. If you look at the Corona Enterprise sample projects, notice that their “build.xml” files contain “-pre-build” and “-post-package” tasks which compile your Lua scripts and transfer your Corona files to your Android app project’s “assets” directory. I suspect that your Eclipse managed “build.xml” is missing these tasks. So, you’ll need to copy them into this file. But you can’t do a straight copy. Notice that there is a “${CoronaEnterpriseDir}” ant property that is not defined in the “build.xml” and is instead set via our “build.sh” script. The simplest solution here is to replace this property with the to your Corona Enterprise folder.
I created my project from existing source so the pre and post steps are there in the build.xml file. However, it simply looks like they are not being run for some reason. Is there any chance of a “Dummy’s guide” to setting up on of the Corona samples in Eclipse, please?
Did you copy the sample’s XML tags to your “build.xml” yourself instead of via Eclipse? As in editing the file by hand? Because I believe that’s what you need to do. The XML tag that needs to compile your Lua scripts actually needs to happen just before the pre-build step in the ant build.xml, which is why it is a “-pre-build” task name (notice the dash in front). Otherwise the Android SDK build system will compile your APK before your Corona assets get copied into your Android project’s “assets” directory.
Other than that, my knowledge of Eclipse is a bit limited. It’s absolutely possible to make Eclipse work with Corona (we’re just a library and a pre-build step afterall). Internally, we don’t use Eclipse for Android development anymore. Especially since we know that Google is going to switch over to their upcoming Android Studio IDE which is currently in beta. When that happens, Android projects will be set up very differently.
Then do you have any tutorial for integrating Corona Enterprise with Android Studio IDE? It would be very helpful.
Google is still making breaking changes with Android Studio, not making it worth investing time into it yet.
Really, how you integrate our Corona library for Android works just like how you would integrate other Android libraries, such as the Facebook SDK. You add a reference to our library project in the same manner. An experienced native Android developer would already know how to do this. So, my recommendation is to learn how to use Eclipse with Google’s sample projects that are bundled with the Android SDK first. That’ll teach you the fundamentals of native Android development.
Thanks. Actually I just migrated the template project to Gradle, pretty straightforward. Using ant + Eclipse is kinda painful to me as I can’t deploy the apk directly from Eclipse. Everytime I make a change in Eclipse and want to test it out, I have to open terminal and do “ant clean”, then “./build.sh”, then sign the apk, and finally push the apk into the Android device. This process could take up to some minutes that easily burn out productivity.
Yeah, I agree. Developing Android apps via Eclipse is kind of a pain, and I think Google knows this, which is why they’re going out of there way to make Android Studio.
Internally, we mostly build using “ant” because it’s simpler, less error prone (can do incremental builds “mostly” without issues), and debug apps the old school way via print statements. Most of our code is written on the C/C++ side, which Eclipse and Android Studio does not help you debug anyways. I do like where Google is going with Android Studio though. Anyways, that’s my 2 cents.
Then do you have any tutorial for integrating Corona Enterprise with Android Studio IDE? It would be very helpful.
Google is still making breaking changes with Android Studio, not making it worth investing time into it yet.
Really, how you integrate our Corona library for Android works just like how you would integrate other Android libraries, such as the Facebook SDK. You add a reference to our library project in the same manner. An experienced native Android developer would already know how to do this. So, my recommendation is to learn how to use Eclipse with Google’s sample projects that are bundled with the Android SDK first. That’ll teach you the fundamentals of native Android development.
Thanks. Actually I just migrated the template project to Gradle, pretty straightforward. Using ant + Eclipse is kinda painful to me as I can’t deploy the apk directly from Eclipse. Everytime I make a change in Eclipse and want to test it out, I have to open terminal and do “ant clean”, then “./build.sh”, then sign the apk, and finally push the apk into the Android device. This process could take up to some minutes that easily burn out productivity.
Yeah, I agree. Developing Android apps via Eclipse is kind of a pain, and I think Google knows this, which is why they’re going out of there way to make Android Studio.
Internally, we mostly build using “ant” because it’s simpler, less error prone (can do incremental builds “mostly” without issues), and debug apps the old school way via print statements. Most of our code is written on the C/C++ side, which Eclipse and Android Studio does not help you debug anyways. I do like where Google is going with Android Studio though. Anyways, that’s my 2 cents.