so guys error is NOT in my code i get some kind of jenkins error on my android phone i tried everything so here is build settings:
- settings =
- {
- orientation=
- {
- default=“portrait”,
- su
- }
- plugins =
- {
- [“plugin.coronaAds”] =
- {
- publisherId = “com.coronalabs”,
- supportedPlatforms = { iphone=true, android=true }
- },
- [“plugin.google.play.services”] =
- {
- publisherId = “com.coronalabs”,
- supportedPlatforms = { android=true }
- },
- [“shared.android.support.v4”] =
- {
- publisherId = “com.coronalabs”,
- supportedPlatforms = { android=true }
- },
- [“plugin.chartboost”] =
- {
- publisherId = “com.coronalabs”,
- supportedPlatforms = { iphone=true, android=true }
- },
- [“plugin.adcolony”] =
- {
- publisherId = “com.coronalabs”,
- supportedPlatforms = { iphone=true, android=true }
- }
- },
- – If building for iOS, add these three entries to the “plist” table
- iphone =
- {
- plist =
- {
- NSAppTransportSecurity = { NSAllowsArbitraryLoads=true },
- NSLocationAlwaysUsageDescription = { “” },
- NSLocationWhenInUseUsageDescription = { “” },
- },
- },
- }
and here is my code:
- –
- – Corona Ads
- –
- local coronaAds = require( “plugin.coronaAds” )
- – Substitute your own placement IDs when generated
- local bannerPlacement = “top-banner-320x50”
- local interstitialPlacement = “interstitial-1”
- – Corona Ads listener function
- local function adListener( event )
- – Successful initialization of Corona Ads
- if ( event.phase == “init” ) then
- – Show an ad
- coronaAds.show( bannerPlacement, false )
- –coronaAds.show( interstitialPlacement, true )
- end
- end
- – Initialize Corona Ads (substitute your own API key when generated)
- coronaAds.init( “5223c2c3-cf81-4c43-ae41-2d4ed16552bc”, adListener )
- –
- – Chartboost
- –
- local chartboost = require( “plugin.chartboost” )
- – Chartboost listener function
- local function cbListener( event )
- if ( event.phase == “init” ) then – Successful initialization
- chartboost.load( “interstitial” )
- elseif ( event.phase == “loaded” ) then
- if ( event.type == “interstitial” ) then
- chartboost.show( “interstitial” )
- end
- end
- end
- – Initialize the Chartboost plugin with your Corona Ads API key
- chartboost.init( cbListener, { apiKey=“5223c2c3-cf81-4c43-ae41-2d4ed16552bc”, appOrientation=“portrait” } )
- –
- – AdColony
- –
- local adcolony = require( “plugin.adcolony” )
- – AdColony listener function
- local function acListener( event )
- if ( event.phase == “init” ) then – Successful initialization
- print( event.provider )
- end
- end
- – Initialize the AdColony plugin with your Corona Ads API key
- adcolony.init( acListener, { apiKey=“5223c2c3-cf81-4c43-ae41-2d4ed16552bc” } )
- – Sometime later, show an ad
- if ( adcolony.isLoaded( “interstitial” ) ) then
- adcolony.show( “interstitial” )
- end
- local widget = require(“widget”)
- local pizzeria = display.newImage(“background.png”)
- pizzeria.x=160
- pizzeria.y=230
- pizzeria:scale(1,1)
- local pizzas=0
- local chefs=0
- local cookers=0
- local robot=0
- local autostove=0
- local musicswitch = 1
- local backgroundMusic = audio.loadStream(“b.mp3”)
- local backgroundMusicChannel = audio.play( backgroundMusic, { channel=1, loops=-1, fadein=5000 } )
- local textmaker = 0
- local robotcost=display.newText(“cost-70”,150,300,display.contentWidth*0.7,display.contentHeight*0.7,native.systemFont,16)
- robotcost:setFillColor(10,5,0)
- local chefcost=display.newText(“cost-10”,150,350,display.contentWidth*0.7,display.contentHeight*0.7,native.systemFont,16)
- chefcost:setFillColor(0,0,0)
- local cookercost=display.newText(“cost-25”,300,350,display.contentWidth*0.7,display.contentHeight*0.7,native.systemFont,16)
- cookercost:setFillColor(10,5,0)
- local autostovecost=display.newText(“cost-250”,220,440,display.contentWidth*0.7,display.contentHeight*0.7,native.systemFont,16)
- autostovecost:setFillColor(10,5,0)
- local pizzatext = display.newText(“pizzas:”, 100, 200, display.contentWidth*0.6, display.contentHeight * 0.7, native.systemFont, 16)
- pizzatext:setFillColor( 0, 0, 0)
- local pizzacount = display.newText(pizzas,165,200,display.contentWidth*0.7,display.contentHeight*0.7,native.systemFont,16)
- pizzacount:setFillColor(10,5,0)
- local chefstext = display.newText(“chefs:”,320,200,display.contentWidth*0.7,display.contentHeight*0.7,native.systemFont,16)
- chefstext:setFillColor(0,10,10)
- local chefscount = display.newText(chefs,363,200,display.contentWidth*0.7,display.contentHeight*0.7,native.systemFont,16)
- chefscount:setFillColor(10,5,0)
- local cooktext = display.newText(“coookers:”,320,230,display.contentWidth*0.7,display.contentHeight*0.7,native.systemFont,16)
- cooktext:setFillColor(10,5,0)
- local cookcount = display.newText(cookers,390,230,display.contentWidth*0.7,display.contentHeight*0.7,native.systemFont,16)
- cookcount:setFillColor(0,0,0)
- local robottext = display.newText(“robot:”,320,260,display.contentWidth*0.7,display.contentHeight*0.7,native.systemFont,16)
- robottext:setFillColor(0,10,10)
- local robotcount = display.newText(robot,363,260,display.contentWidth*0.7,display.contentHeight*0.7,native.systemFont,16)
- robotcount:setFillColor(10,5,0)
- local autostovetext = display.newText(“autostove:”,320,290,display.contentWidth*0.7,display.contentHeight*0.7,native.systemFont,16)
- autostovetext:setFillColor(0,0,0)
- local autostovecount = display.newText(autostove,395,290,display.contentWidth*0.7,display.contentHeight*0.7,native.systemFont,16)
- autostovecount:setFillColor(10,5,0)
- local objective = display.newText(“Reach 1000000000 pizzas”,400,100)
- local function makeChefPizza()
- pizzas=pizzas+chefs+cookers*2+robot*3+4*autostove
- pizzacount.text=pizzas
- end
- local function pizzamaker( event )
- if (pizzas>=10000000000) then
- winscreen=display.newImage(“youwin.jpeg”)
- winscreen:translate(150,200)
- winscreen:scale(1.5,3)
- end
- if ( “ended” == event.phase ) then
- pizzas=pizzas+1
- pizzacount.text=pizzas
- end
- end
- local function addchef( event )
- if(“ended” == event.phase) then
- if(pizzas>=10) then
- chefs=chefs+1
- chefscount.text=chefs
- pizzas=pizzas-10
- pizzacount.text=pizzas
- end
- end
- end
- local function addcooker( event )
- if(“ended”== event.phase) then
- if(pizzas>=25) then
- cookers=cookers+1
- cookcount.text=cookers
- pizzas=pizzas-25
- pizzacount.text=pizzas
- end
- end
- end
- local function addrobot( event )
- if(“ended”==event.phase) then
- if(pizzas>=70) then
- robot=robot+1
- robotcount.text=robot
- pizzas=pizzas-70
- pizzacount.text=pizzas
- end
- end
- end
- local function addautostove( event )
- if(“ended”==event.phase) then
- if(pizzas>=250) then
- autostove=autostove+1
- autostovecount.text=autostove
- pizzas=pizzas-250
- pizzacount.text=pizzas
- end
- end
- end
- local pizzamaker = widget.newButton
- {
- left = 200,
- top = 400,
- defaultFile=“button.jpeg”,
- overFile = “button.jpeg”,
- label = “Make Pizza”,
- height = 50,
- width= 100,
- onEvent =pizzamaker
- }
- local addchef = widget.newButton
- {
- left = 60,
- top = 200,
- defaultFile=“pizzachef.png”,
- overFile=“pizzachef.png”,
- height = 70,
- width = 70,
- onEvent = addchef
- }
- local addcooker = widget.newButton
- {
- left = 150,
- top = 200,
- defaultFile=“pizzacooker.jpeg”,
- overFile=“pizzacooker.jpeg”,
- height=70,
- width=70,
- onEvent=addcooker
- }
- local addrobot = widget.newButton
- {
- left = 100,
- top = 100,
- defaultFile=“robot.png”,
- overFile=“robot.png”,
- height=70,
- width=70,
- onEvent=addrobot
- }
- local addautostove = widget.newButton
- {
- left = 100,
- top = 300,
- defaultFile=“autostove.jpg”,
- overFile=“autostove.jpg”,
- height=70,
- width=100,
- onEvent=addautostove
- }
- timer.performWithDelay(1000, makeChefPizza, -1)
and here is the error
:
02:35:57 I Corona : /Users/jenkins/slaveroot/workspace/Templates/label/android/platform/resources/init.lua:853: module 'plugin.coronaAds' not found:resource (plugin.coronaAds.lu) does not exist in archive 02:35:57 I Corona : no field package.preload['plugin.coronaAds'] 02:35:57 I Corona : no file '(null)/plugin/coronaAds.lua' 02:35:57 I Corona : no file '(null)/plugin/coronaAds.lua' 02:35:57 I Corona : no file '/data/app/com.gmail.davitzuroshvili.pizza\_tycoon-1/lib/arm/libplugin/coronaAds.so' 02:35:57 I Corona : no file './plugin/coronaAds.so' 02:35:57 I Corona : no file '(null)/plugin/coronaAds.so' 02:35:57 I Corona : no file '/data/app/com.gmail.davitzuroshvili.pizza\_tycoon-1/lib/arm/libplugin.so' 02:35:57 I Corona : no file './plugin.so' 02:35:57 I Corona : no file '(null)/plugin.so' 02:35:57 I Corona : no file '/data/app/com.gmail.davitzuroshvili.pizza\_tycoon-1/lib/arm/libplugin.coronaAds.so' 02:35:57 I Corona : no file './plugin.coronaAds.so' 02:35:57 I Corona : no file '(null)/plugin.coronaAds.so' 02:35:57 I Corona : stack traceback: 02:35:57 I Corona : [C]: in function 'require' 02:35:57 I Corona : /Users/jenkins/slaveroot/workspace/Templates/label/android/platform/resources/init.lua:853: in function 'require' 02:35:57 I Corona : ?: in main chunk
gusy please help me