Can't start app from Android Studio(plugins not found)

Hello friends.

Please, help me with an error.
If i run my game with Corona Simulator - it works perfect.
But when i make native build via Android Studio - it fails with next error:

I/Corona: ERROR: Runtime error
    module 'plugin.notifications.v2' not found:resource (plugin.notifications.v2.lu) does not exist in archive
    	no field package.preload['plugin.notifications.v2']
    	no file '(null)/plugin/notifications/v2.lua'
    	no file '(null)/plugin/notifications/v2.lua'
    	no file '/data/app/com.mycompany.app-
        ...
    	L:\CoronaProjects\App\Corona\main.lua:16: in main chunk

There is my build settings:

   ....
plugins = 
	{
		
		["plugin.notifications.v2"] = {  publisherId = "com.coronalabs",  },
		["plugin.pasteboard"] = { publisherId = "com.coronalabs" },
		['plugin.cnkFileManager'] = { publisherId = 'es.cnksoft' }, 
		["plugin.openssl"] = { publisherId = "com.coronalabs", },  
		["plugin.notifications"] = { publisherId = "com.coronalabs" }, 
		["plugin.bit"] = { publisherId = "com.coronalabs" }
	},

...

As i said above, in Simulator all works as expected, all plugins also works.

And when i unzip generated apk - i saw that there is no libnotifications.so and no libopenssl.so .

When i’ve builded my another project in 2018 - there was folder app\libs that contains plugin.notifications.v2.jar and some other. Now there is no libs folder.

I’m using corona build 2100.9999(2100.1.16)

Thanks for help

Not sure this would help but…

1- Your build number is probably wrong. There is a reported issue(#337) about that on GitHub so you may want to make sure which link you downloaded it from.

2- About plugins, I found this - Solar2D build error - #3 by redbol .

Thank for help!
I saw this topic, it’s doesn’t solve my problem yesterday, so i decided to add plugins manually.
Hope this will help for everyone who faced same problem:

  1. I downloaded all plugins manually.
    Link for each plugin is like github.com/coronalabs/*publisher*-plugin.*plugin*/releases/

Replace publisher and plugin to your.
For example: for openssl its “com.coronalabs” and “openssl”.
So link will be like: http://github.com/coronalabs/com.coronalabs-plugin.openssl/releases/

Download 2016.2883-android.tgz, unzip it.

2.1) If you see a *.jar file - then you need to place it to the folder “Your_project/android/app/libs”

2.2) If you see a *.so file and folder jniLibs - then you need to copy all folders from “jniLibs” to the folder “Your_project/android/app/src/main/jniLibs”

That’s it. My project works well and all plugins also works

1 Like

Hey!
There is a script to do all that. In fact, it is used to make build from Simulator. I wrote a little instruction, on how to set up your project with plugins here:

1 Like

Thank you!

I’ll try it today

Hello, vlads.

Can you tell me how to run setUpCoronaAppAndPlugins Gradle task, please?
Thank you

This was coming up a lot. Here is a small writeup I made, hopefully it helps

Thank you very much!

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.