Hi again everyone
My game is finally finished after nearly 2 years working 7 days a week on it.
Right now I’m only targeting Android because I don’t have an Apple computer.
I just need to monetize it, so I’ve gone with the first world being free with ads using admob because I’m new to this and want it to be as simple as possible.
I can’t get the ads to work at all.
I’m using Corona SDK daily build 2015.2688
My Build Settings…
settings = { orientation = { default = "landscapeRight", supported = { "landscapeRight" }, }, android = { versionCode = "10", googlePlayGamesAppId = "76XXXXXXXXXX", isGame = true, usesPermissions = { "android.permission.INTERNET", "android.permission.ACCESS\_NETWORK\_STATE", "android.permission.WRITE\_EXTERNAL\_STORAGE", "android.permission.READ\_EXTERNAL\_STORAGE" }, CFBundleIconFile = "Icon.png", CFBundleIconFiles = { "Icon-xxhdpi.png", "Icon-xhdpi.png", "Icon-hdpi.png", "Icon-mdpi.png", "Icon-ldpi.png" }, usesFeatures = { { name = "android.hardware.camera", required = false }, { name = "android.hardware.location", required = false }, { name = "android.hardware.location.gps", required = false } }, plugins = { ["CoronaProvider.native.popup.social"] = { publisherId = "com.coronalabs" }, ["CoronaProvider.gameNetwork.google"] = { publisherId = "com.coronalabs", supportedPlatforms = { android=true }, }, ["plugin.google.play.services"] = { publisherId = "com.coronalabs" }, }, } }
The ad code…
local ads = require( "ads" ) local MyappID = "ca-app-pub-XXXXXXXXXXXXXXXX/XXXXXXXXXX" -- I'm using the ID I set up in admob local adProvider = "admob" local function adListener( event ) local msg = event.response print( "Message from the ads library: ", msg ) if ( event.isError ) then print( "Error, no ad received", msg ) else ads.show( "interstitial", { appId=MyappID, testMode = true } ) end end ads.init( adProvider, MyappID, adListener ) ads:setCurrentProvider("admob")
This is the error log on my actual device…
ERROR:Could not load provider(admob) due to the following reason:/Users/jenkins/slaveroot/workspace/Templates/label/android/platform/resources/init.lua;835:module’CoronaProvider.ads.admob’ not found:resource(CoronaProvider.ads.admob.lu) does not exist in archive
no field
package.preload[‘CoronaProvider.ads.admob’]
no file ‘(null)/CoronaProvider/ads/admob.lua’
no file ‘(null)/CoronaProvider/ads/admob.lua’
no file ‘/data/app-lib/’
It looks like the ads plugin has not been installed when building the app, have I missed something in the build.settings? This feature does exist outside of Enterprise, right?