Corona Native not compiling Lua files

Hello everybody. I’m trying to start with Corona Native and Android Studio.

I followed the instructions for Mac OS from here https://docs.coronalabs.com/native/android/index.html 

Everything is working fine, I’m able to build and start the template project on my device, BUT

when I change main.lua located at Corona folder, it’s ignored. It seems that it’s not used in the project at all.

It’s showing default template copied from  /Applications/Corona/Native/ , the project is building with no errors.

However Corona Simulator is showing the changes I made.

What am I doing wrong?

What version of Corona are you using?

Have you run the “Corona Native” script to setup all the necessary symlinks?

Rob

Hi Rob, thank you for your reply.

I am using Version: 3.0.0, Build: 2018.3326.

Yes, I have run the script and received the following message: 

Setup Corona Native

Created symbolic link:

… /Library/Application Support/Corona/Native

Corona Native is ready

Make sure you change main.lua in the proper folder. I mean when you build Corona Native project lua files should be placed along with Java code. Like 

├── android/

│   ├── app/

│   ├── build.gradle

│   ├── settings.gradle

│   └── etc…

├── Corona/

│   ├── build.settings

│   └── main.lua

│   └── etc…

I did it exactly like that. Here is the link to the project:https://drive.google.com/file/d/1Cnq7mZNRRNHrBKwU9a_azSc2ZlKR9CZD/view?usp=sharing

You will need to grant access to this file before anyone can look at it.

Rob

Sorry, I’ve updated the link.

I opened your project in Android Studio and clicked on the Play button. The app started on my Google Nexus 9 tablet. The display.newText() emitted “Hello World!” as expected.

I opened the main.lua using Sublime Text 3 and changed the display.newText() to “Hello World! How are you?”. I stopped the app in android studio and hit play again. I see  “ello World! How are you” on the screen. Of course, the text is cut off because it’s too big and is expected. But the main.lua did update.

I did disable the Instant Run because it didn’t like me having two accounts on the Nexus 9.

So for me, it’s working.

Rob

That’s strange… It seems that something is wrong with my environment, however I followed the instructions. Even if I rename or delete Corona folder from the project, nothing happens - it starts the same default template.

What version of Corona are you using?

Have you run the “Corona Native” script to setup all the necessary symlinks?

Rob

Hi Rob, thank you for your reply.

I am using Version: 3.0.0, Build: 2018.3326.

Yes, I have run the script and received the following message: 

Setup Corona Native

Created symbolic link:

… /Library/Application Support/Corona/Native

Corona Native is ready

Make sure you change main.lua in the proper folder. I mean when you build Corona Native project lua files should be placed along with Java code. Like 

├── android/

│   ├── app/

│   ├── build.gradle

│   ├── settings.gradle

│   └── etc…

├── Corona/

│   ├── build.settings

│   └── main.lua

│   └── etc…

I did it exactly like that. Here is the link to the project:https://drive.google.com/file/d/1Cnq7mZNRRNHrBKwU9a_azSc2ZlKR9CZD/view?usp=sharing

You will need to grant access to this file before anyone can look at it.

Rob

Sorry, I’ve updated the link.

I opened your project in Android Studio and clicked on the Play button. The app started on my Google Nexus 9 tablet. The display.newText() emitted “Hello World!” as expected.

I opened the main.lua using Sublime Text 3 and changed the display.newText() to “Hello World! How are you?”. I stopped the app in android studio and hit play again. I see  “ello World! How are you” on the screen. Of course, the text is cut off because it’s too big and is expected. But the main.lua did update.

I did disable the Instant Run because it didn’t like me having two accounts on the Nexus 9.

So for me, it’s working.

Rob

That’s strange… It seems that something is wrong with my environment, however I followed the instructions. Even if I rename or delete Corona folder from the project, nothing happens - it starts the same default template.