Corona native + any plugin fails to run

Hi, im working on mac and using latest Corona 2020.3582,and got Android Studio 3.6.3 and i’ve copied /Applications/Corona-3582/Native/ProjectTemplate to some local directory to start my new native project.
I’ve added plugins table to build.settings:

    settings = 
    {

	orientation =
	{
		default = "portrait",
		supported = { "portrait" }
	},


	iphone =
	{
		xcassets = "Images.xcassets",
		plist =
		{
			UILaunchStoryboardName = "LaunchScreen",
		},
	},
	plugins =
	{
	    ["plugin.OneSignal"] =
	    {
	        publisherId = "com.onesignal",
	    },
		["plugin.utf8"] =
        {
            publisherId = "com.coronalabs"
        },
	},
    }

then ive modified main.lua to look like this:

local oneSignal = require("plugin.OneSignal")

function IdsAvailable(userID, pushToken)

end

oneSignal.IdsAvailableCallback(IdsAvailable)

and i’ve got error when debugging from android studio:

V/Corona: > Class.forName: plugin.OneSignal.LuaLoader
2020-05-27 15:16:40.635 17006-17225/com.mycompany.app I/Corona: ERROR: Runtime error
    module 'plugin.OneSignal' not found:resource (plugin.OneSignal.lu) does not exist in archive
    	no field package.preload['plugin.OneSignal']
    	no file '(null)/plugin/OneSignal.lua'
    	no file '(null)/plugin/OneSignal.lua'
    	no file '/data/app/com.mycompany.app-Ng93PgxnrQ9OB1d13eGfOQ==/lib/arm64/libplugin/OneSignal.so'
    	no file './plugin/OneSignal.so'
    	no file '(null)/plugin/OneSignal.so'
    	no file '/data/app/com.mycompany.app-Ng93PgxnrQ9OB1d13eGfOQ==/lib/arm64/libplugin.so'
    	no file './plugin.so'
    	no file '(null)/plugin.so'
    	no file '/data/app/com.mycompany.app-Ng93PgxnrQ9OB1d13eGfOQ==/lib/arm64/libplugin.OneSignal.so'
    	no file './plugin.OneSignal.so'
    	no file '(null)/plugin.OneSignal.so'
    	no Java class 'plugin.OneSignal.LuaLoader'
    	no global loaded symbol 'luaopen_plugin_OneSignal'
    	no zipped .so symbol at '/data/app/com.mycompany.app-Ng93PgxnrQ9OB1d13eGfOQ==/base.apk!/lib/arm64-v8a/libplugin.OneSignal.so'

The same goes when i try to use utf8 plugin. How to solve this issue?

This thread might help

manually copy the “plugin.OneSignal.lua” to Corona folder. It is in the downloaded tgz in ~/Library/Application Support/Corona/Native Plugins/

I tried but when it run, OneSignal reported it the following message and the push notification is not displayed. Manifest.xml and the dependencies of OneSignal jar seems something missing.

I just added OneSignal.jar and OneSignalSDK.jar with plugin.OneSignal.lua to the Android Studio project. I have not resolved how to fix the following dependencies.

metadata.lua dependencies

  • ["shared.firebase.messaging"] = "com.coronalabs",
    
  • ["shared.android.support.v4"] = "com.coronalabs",
    
  • ["shared.android.support.v7.cardview"] = "com.coronalabs"
    

I used Solar2D 3597 Native build.

P.S. Offline build works fine for receiving a push notification. So the native build with Android Studio should work but I am just stuck in Android Studio

build.gradle.kts in Corona-3597/Native/Project Template/App/android/app/ seems not updated for offline build

So I extracted it from Native/Corona/android/resource/android-template.zip and put it in the app folder of my android native project. It is working now with OneSignal plugin

Thanks for tips! From where you downloaded Corona-3597? The last daily-build of Corona is 2020.3583 from https://developer.coronalabs.com/downloads/daily-builds