Hello,
Finally, we migrated from old Ant native build system to Android Studio I have a question about that! On Previous build system(old corona enterprise) there was and “build.sh” script for Android platform that we used it on our custom build script for building apk files on an automated build system(Jenkins). And my question is:
Is there a script like old ‘build.sh’ in Corona Native/Android Studio that I can use it for my building process?!
There are two files: gradlew.bat and gradlew(unix executable file).
I executed “gradlew” file and it started to download/install gradle dependencies(a lot of unknown jar file from jCenter domain).
In previous versions(ant system), We simply execute “build.sh” in our build script.
I don’t know what are these two scripts. Let me research more about gradle mechanism, if I had an update, I will share.
Just slightly off topic: the presence of “gradlew.bat” is a promising sight… can we expect a Corona Native development environment on Windows? At least for Android and Win32 development?
Hello again, Finally I prepared my build script and built an apk. after opening apk on test device i get this error:
WARNING: Could not load ‘network.LuaLoader’
java.lang.ClassNotFoundException: network.LuaLoader
…
?:0: attempt to index field ‘network’ (a nil value)
In my build.gradle I have this line:
compile fileTree(dir: “$coronaEnterpriseAndroidLibDir/libs”, include: ‘*.jar’)
I think this line will added needed jar files like network.jar and … to the project. nah?
additional note: I use last public release of corona and multidex is enabled on gradle script.
Update: App works perfect on Android 5 and above! error only happened on android 4(different versions: 4.1.2, 4.3)
what can i do?
You stated that you want to convert an older Ant-based Enterprise project to Corona Native, correct? So then you are using at least build 3100 or higher right? If you’re using 3068 (latest public release), that pre-dates Corona Native… perhaps we have a minor miscommunication on versions in this chat?
Hello Brent,
Yes I migrated to Corona Native(android studio build system) from Ant build system and my problem solved.
I don’t know why mentioned problem occurred but it solved by extending “CoronaApplication” class from “MultiDexApplication” instead of “Application” I think Corona should update its documentation about it.
There are two files: gradlew.bat and gradlew(unix executable file).
I executed “gradlew” file and it started to download/install gradle dependencies(a lot of unknown jar file from jCenter domain).
In previous versions(ant system), We simply execute “build.sh” in our build script.
I don’t know what are these two scripts. Let me research more about gradle mechanism, if I had an update, I will share.
Just slightly off topic: the presence of “gradlew.bat” is a promising sight… can we expect a Corona Native development environment on Windows? At least for Android and Win32 development?
Hello again, Finally I prepared my build script and built an apk. after opening apk on test device i get this error:
WARNING: Could not load ‘network.LuaLoader’
java.lang.ClassNotFoundException: network.LuaLoader
…
?:0: attempt to index field ‘network’ (a nil value)
In my build.gradle I have this line:
compile fileTree(dir: “$coronaEnterpriseAndroidLibDir/libs”, include: ‘*.jar’)
I think this line will added needed jar files like network.jar and … to the project. nah?
additional note: I use last public release of corona and multidex is enabled on gradle script.
Update: App works perfect on Android 5 and above! error only happened on android 4(different versions: 4.1.2, 4.3)
what can i do?
You stated that you want to convert an older Ant-based Enterprise project to Corona Native, correct? So then you are using at least build 3100 or higher right? If you’re using 3068 (latest public release), that pre-dates Corona Native… perhaps we have a minor miscommunication on versions in this chat?
Hello Brent,
Yes I migrated to Corona Native(android studio build system) from Ant build system and my problem solved.
I don’t know why mentioned problem occurred but it solved by extending “CoronaApplication” class from “MultiDexApplication” instead of “Application” I think Corona should update its documentation about it.