Is there any sample native-android project using plugin?

Hi. 

I’m trying to migrate my corona sdk project to corona-native-android project. 

(the only reason is app-name localization… )

But I’m struggling with plugins. 

What I hoped and done is below.

  1. copy App template

  2. replace ‘Corona’ folder to my code. (which works perfectly with normal corona build)

  3. run download plugin script. 

  4. build apk at android studio.

but error occurs at device. (says it cannot find plugins).

Please excuse I have no experience with native android development. 

What should I do further?

Is there any sample project that using plugins? (admob or something)

I want to check and compare what’s wrong my project. 

Thanks. 

Last i remember was for Android, the plugins can’t auto-download yet (xCode can download the Corona plugins).

See this blog : https://coronalabs.com/blog/2017/10/19/using-plugins-with-native-android-builds/

Try looking for the .jar files in 

https://bitbucket.org/coronalabs/

When you run the plugin download script, the files are downloaded to a standard predictable folder (different between Windows and Mac). It’s your responsibility to copy them from that download folder into your project folder. The location to copy to for .jar’s is different than .so files.

The folder structure along with descriptions of what goes where is here:  https://docs.coronalabs.com/native/android/index.html

You may have to do additional configuration in your native project settings depending on the plugin.

Rob

I have an example with 1 plugin here (smaato) it should give you an idea:

https://github.com/agramonte/smaato-corona-plugin

Also look at the manifest. You have to add the activities, permissions, and whatnot. There is also the signing and other random stuff that might fail even after it appears to run successfully through Android Studio.

Honestly, Corona does a lot to make your job super easy. This native stuff to me seems like a massive waste of time or for people that have larger teams. I’ll continue to hit the one button in Corona until they take it away.

Adrian

Hello Rob,

I have downloaded this sample and its not working for me, First it gives me error as could not find module for com.android.tool.build:gradle.3.0.1.

Though i googled and found i need to edit build.gradle and i edited that file for repository then restart and now it gives another error saying No Signature of method: java.util.ArryList.all() is applicable for argument types: Then says openFile and gives error in line no 54 of that build.gradle file.

I am very new to the Native and so have no knowedge of what is happening.Please forgive me if i am doing something wrong.

Thank you

I just downloaded it again into a separate location on my machine (my desktop). Opening it in Android Studio (by navigating to the folder), attached an android device via USB and running it resulted in the app launching on the device. Not sure where to take it from there. 

Hello, please help me to understand

I use

  plugins =
    {
      [“plugin.GBCLanguageCabinet”] = {
      publisherId = “com.gamesbycandlelight”,
      },
    },

I have downloaded plugin using script

https://coronalabs.com/blog/2017/10/19/using-plugins-with-native-android-builds/

It downloaded in a folder
“C:\Users\root\AppData\Roaming\Corona Labs\Corona Simulator\NativePlugins\android\plugin.GBCLanguageCabinet_com.gamesbycandlelight”

My project is in
C:\games\android\myprogramm

Inside of the downloaded archive

folders are:
  NativePlugins
    plugin.GBCLanguageCabinet_com.gamesbycandlelight.tgz.
    (inside there is lua file plugin.GBCLanguageCabinet_com.gamesbycandlelight\lua\lua_51\plugin    \GBCLanguageCabinet.lua))
  Plugin
    catalog.json
    plugin
    plugin.bit.zip
    plugin.GBCLanguageCabinet.zip
    plugin.iCloud.zip
    plugin_bit.dll
    plugin_icloud.lua
  Skins
    Empty

I also found GBCLanguageCabinet at https://bitbucket.org/coronalabs/
It has also lua file inside, but also contains manifest.json file.

Where should i put it all?
I tried to Native Plugins/Android - got error

[sharedmedia=core:attachments:7520]

[sharedmedia=core:attachments:7521]

about /Users/jenkins/slaveroot//workspace/Enterprise/OS/ios-11.2/release/release/perform/resources/init.lua:
9056 module ‘plugin.GBCLanguageCabinet’ not found:resource (plugin.GBCLanguageCabinet.lu) does not exist in archive
no field
and some more strings…

(sorry cannot post images here)

Can’t get any ideas. Why iOS? Is the path i put it correct?

 

@ysharoiko - Please stop posting the same question over and over:

The rules here are clear.  Only post the topic once.  

Additionally, posting to other folks’ threads is hijacking which is frowned upon because it dilutes the values of the hijacked posts.

You simply have to have patience and wait for a response to you post.  

Thanks,

Ed

I’ve deleted one of the excessive posts. As @roamingamer stated, please be patient. Ask your question once. If you don’t have an answer you can bump your post if you wait at least 24 hours. If you’re not familiar with the forum rules, please see:

https://coronalabs.com/forum-rules/

See rules 2, 5 and 6.

Rob

Last i remember was for Android, the plugins can’t auto-download yet (xCode can download the Corona plugins).

See this blog : https://coronalabs.com/blog/2017/10/19/using-plugins-with-native-android-builds/

Try looking for the .jar files in 

https://bitbucket.org/coronalabs/

When you run the plugin download script, the files are downloaded to a standard predictable folder (different between Windows and Mac). It’s your responsibility to copy them from that download folder into your project folder. The location to copy to for .jar’s is different than .so files.

The folder structure along with descriptions of what goes where is here:  https://docs.coronalabs.com/native/android/index.html

You may have to do additional configuration in your native project settings depending on the plugin.

Rob

I have an example with 1 plugin here (smaato) it should give you an idea:

https://github.com/agramonte/smaato-corona-plugin

Also look at the manifest. You have to add the activities, permissions, and whatnot. There is also the signing and other random stuff that might fail even after it appears to run successfully through Android Studio.

Honestly, Corona does a lot to make your job super easy. This native stuff to me seems like a massive waste of time or for people that have larger teams. I’ll continue to hit the one button in Corona until they take it away.

Adrian

Hello Rob,

I have downloaded this sample and its not working for me, First it gives me error as could not find module for com.android.tool.build:gradle.3.0.1.

Though i googled and found i need to edit build.gradle and i edited that file for repository then restart and now it gives another error saying No Signature of method: java.util.ArryList.all() is applicable for argument types: Then says openFile and gives error in line no 54 of that build.gradle file.

I am very new to the Native and so have no knowedge of what is happening.Please forgive me if i am doing something wrong.

Thank you

I just downloaded it again into a separate location on my machine (my desktop). Opening it in Android Studio (by navigating to the folder), attached an android device via USB and running it resulted in the app launching on the device. Not sure where to take it from there. 

Hello, please help me to understand

I use

  plugins =
    {
      [“plugin.GBCLanguageCabinet”] = {
      publisherId = “com.gamesbycandlelight”,
      },
    },

I have downloaded plugin using script

https://coronalabs.com/blog/2017/10/19/using-plugins-with-native-android-builds/

It downloaded in a folder
“C:\Users\root\AppData\Roaming\Corona Labs\Corona Simulator\NativePlugins\android\plugin.GBCLanguageCabinet_com.gamesbycandlelight”

My project is in
C:\games\android\myprogramm

Inside of the downloaded archive

folders are:
  NativePlugins
    plugin.GBCLanguageCabinet_com.gamesbycandlelight.tgz.
    (inside there is lua file plugin.GBCLanguageCabinet_com.gamesbycandlelight\lua\lua_51\plugin    \GBCLanguageCabinet.lua))
  Plugin
    catalog.json
    plugin
    plugin.bit.zip
    plugin.GBCLanguageCabinet.zip
    plugin.iCloud.zip
    plugin_bit.dll
    plugin_icloud.lua
  Skins
    Empty

I also found GBCLanguageCabinet at https://bitbucket.org/coronalabs/
It has also lua file inside, but also contains manifest.json file.

Where should i put it all?
I tried to Native Plugins/Android - got error

[sharedmedia=core:attachments:7520]

[sharedmedia=core:attachments:7521]

about /Users/jenkins/slaveroot//workspace/Enterprise/OS/ios-11.2/release/release/perform/resources/init.lua:
9056 module ‘plugin.GBCLanguageCabinet’ not found:resource (plugin.GBCLanguageCabinet.lu) does not exist in archive
no field
and some more strings…

(sorry cannot post images here)

Can’t get any ideas. Why iOS? Is the path i put it correct?

 

@ysharoiko - Please stop posting the same question over and over:

The rules here are clear.  Only post the topic once.  

Additionally, posting to other folks’ threads is hijacking which is frowned upon because it dilutes the values of the hijacked posts.

You simply have to have patience and wait for a response to you post.  

Thanks,

Ed

I’ve deleted one of the excessive posts. As @roamingamer stated, please be patient. Ask your question once. If you don’t have an answer you can bump your post if you wait at least 24 hours. If you’re not familiar with the forum rules, please see:

https://coronalabs.com/forum-rules/

See rules 2, 5 and 6.

Rob