App not running on android phone

You have likely got am image file case error.  This is usually the problem associated with this issue.

Ex:  File name in code: bob.png versus actual spelling: Bob.png

Dang… looks like an issue with your use admob?

Q: Why does that look like a screenshot from your phone?  You should be able to run ADB in a console on your computer to make it a lot more accessible and legible.  

I think Rob and others will probably give better help here, but I am wondering what your build.settings file looks like as well as the code where you’re using admob.* calls.

Here is my build.settings : 

settings = { android = { googlePlayGamesAppId = "962898591734", usesPermissions = { "android.permission.INTERNET", "android.permission.ACCESS\_NETWORK\_STATE", "com.android.vending.BILLING", "com.android.vending.CHECK\_LICENSE", }, }, orientation = { default = "landscape", supported = { "landscape", } }, plugins = { --key is the name passed to the Lua "require()" ["CoronaProvider.gameNetwork.google"] = { --required! publisherId = "com.coronalabs", }, ["plugin.google.play.services"] = { publisherId = "com.coronalabs" }, ["CoronaProvider.ads.vungle"] = { publisherId = "com.vungle", }, ["plugin.google.iap.v3"] = { publisherId = "com.coronalabs", supportedPlatforms = { android=true } }, ["CoronaProvider.native.popup.social"] = { publisherId = "com.coronalabs" }, } }

and here is my edit.lua : 

musicEnabled = false -- turn to false if you don't want to use music in the game soundsEnabled = false -- turn to false if you don't want to use sounds in the game default\_duration = 7000 -- how much time powerups persist resurrection\_cost\_edit = 100 -- how much first resurrection costs, second costs 3x more, third 9x etc. max\_bg = 4 -- number of backgrounds which player can unlock - depends how many graphics you have shop1\_cost = 200 -- the cost of unlocking each background max\_chars = 6 -- number of characters which player can unlock -- remember that characters 2,3,4 start game with 1 star, characters 5,6,7 with 2 stars and characters 8,9 with 3 stars shop2\_cost = {} -- don't change this line shop2\_cost[1] = 0 -- player owns first character shop2\_cost[2] = 1000 -- how many coins player should pay for unlocking each character - character 2 shop2\_cost[3] = 2000 -- character 3 shop2\_cost[4] = 3000 -- character 4 shop2\_cost[5] = 4000 -- character 5 shop2\_cost[6] = 5000 -- character 6 max\_consumables = 3 -- how many consumables can be used - 3 are used consumable\_cost = {} -- don't change this line consumable\_cost[1] = 20 -- magnet - costs 20 coins consumable\_cost[2] = 40 -- shield consumable\_cost[3] = 10 -- bomb creditsDescription = "developer: ....., music: Kevin MacLeod www.incompetech.com track: Slow SKA game loop" -- keep the music author if you want to use the same music appUrl = "https://play.google.com/store/apps/details?id=com.jetpackridejoy.fraggapps" -- your app's google play url facebookUrl = "https://www.facebook.com/fgrteam" -- your game/publisher facebook site url share\_message = "I played Ridejoy Jetpack game!!" -- share message used with social share button along with the screenshot --@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ -- ADVERTISEMENT BELOW: -- by default you will see TEST ADS if you install apk on android device - ads are shown after game over TEST\_ADS = false -- change to false before submitting to the store adsAdmob = true -- change to true if you want to use admob Ads admob\_id = "ca-app-pub-5360730589530819/7605684946" -- put your admob id g\_ad\_timer = 1000 -- minimum time to show next interstitial ad (in miliseconds) adsVungle = false -- change to true if you want to use Vungle incentivized video ads vungle\_id = "vungle\_id" -- your vungle id --@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ -- GLOBAL LEADERBOARDS - GOOGLE PLAY SERVICES BELOW: googleplayservices = true -- turn to TRUE to enable global leaderboards -- OPEN build.settings and put your googlePlayGamesAppId, obtained from google play developer console highscoreId = {} -- DON'T CHANGE THIS LINE - table containing highscore IDs -- get from google play developer console highscoreId[1] = "best\_score\_id" -- best score highscoreId[2] = "games\_played\_id" -- number of games played -- ACHIEVEMENTS IDS - GET THEM FROM GOOGLE PLAY DEVELOPER CONSOLE: achiev = {} -- don't change this line achiev[1] = "CgkI9v\_piYMcEAIQAA" -- first\_game achiev[2] = "CgkI9v\_piYMcEAIQAQ" -- 10 games achiev[3] = "CgkI9v\_piYMcEAIQAg" -- 100 games achiev[4] = "CgkI9v\_piYMcEAIQAw" -- 1000 games achiev[5] = "CgkI9v\_piYMcEAIQBA" -- 10000 score achiev[6] = "CgkI9v\_piYMcEAIQBQ" -- 25000 score achiev[7] = "CgkI9v\_piYMcEAIQBg" -- 50000 score achiev[8] = "CgkI9v\_piYMcEAIQBw" -- 100000 score achiev[9] = "CgkI9v\_piYMcEAIQCA" -- buy something for real money achiev[10] = "CgkI9v\_piYMcEAIQCQ" -- unlock first background achiev[11] = "CgkI9v\_piYMcEAIQCg" -- unlock first character achiev[12] = "CgkI9v\_piYMcEAIQCw" -- use a consumable achiev[13] = "CgkI9v\_piYMcEAIQDA" -- unlock all backgrounds achiev[14] = "CgkI9v\_piYMcEAIQDQ" -- unlock all characters --@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ -- IN APP PURCHASE BELOW: InAppPurchase = false -- turn on or off in app purchase -- OPEN config.lua and change the IAP key corresponding to yours, obtained from google play developer console IAP\_item = {} -- DON'T CHANGE THIS LINE-- IAP\_item[1] = "com.jetpackridejoy.fraggapps.small\_coins\_pack" -- provide product IDs for all in app purchase items - get them from google play developer console IAP\_item[2] = "com.jetpackridejoy.fraggapps.medium\_coins\_pack" IAP\_item[3] = "com.jetpackridejoy.fraggapps.big\_coins\_pack" IAP\_item[4] = "com.jetpackridejoy.fraggapps.remove\_ads" IAP\_small = 500 -- how many coins in each package IAP\_medium = 5000 IAP\_big = 15000 --@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@

If you want to use admob you don’t have all the correct code in place.  You’re missing the build.settings plugin for it and may be missing other parts.  Click link to left (in this answer) for admob docs.

can you help me solve this please??

The only way I could do that is to get your code and look at it.  I can’t do that for free sorry.  I put aside a little of my time to help here and answer questions, but at the end of the day I’ve gotta pay (a bunch of) bills.

The best I can do free is to answer your question as I have and to give you hints and places to look in the docs.

Note: Since you’re using admob, it tells me you want to make money on your app/game.  So, wanting to make money I’ll assume you’re willing to spend money.  I am a professional and have a service just for situations just like this: https://forums.coronalabs.com/topic/69420-hire-a-hitman-problem-solver-is-back/

This may not be useful to you now, but maybe in the future.

PS - Don’t be disappointed or give up.  Others here may have more available time than I do.

We can if you use ADB (as I said above) and post the output

i can’t use adb , can i send you the code to look please

Why can’t you use ADB?  You just need to download it, install it and run the command.  It is a mandatory for app development and debugging really.

If you need more extensive help I suggest you take Ed up on his offer as I am far to busy to go debugging your project for free (or paid for that matter).

adb still blocked in waiting for you device and my phone is already connected to pc with usb cable

Sound like you need to put your device in developer mode.

https://developer.android.com/studio/debug/dev-options.html

What version of Corona are you using?

Your build.settings does not include the AdMob plugin.  You also should remove the plugin.google.play.services plugin since it no longer exists for modern Corona builds.

AdMob is also a paid plugin. To use it, you have to purchase an annual license. See: https://marketplace.coronalabs.com/plugin/admob

Posting screen shots of the console log is better than nothing, but it’s much better if you can copy and paste it from the cmd.exe or powershell options on Windows. That way we avoid the wrapping lines and we can see more of the log to get a context of the various issues.

Your edit.lua doesn’t seem to have any code that’s trying to initialize anything. It seems to be just setting default values for things (and using Global variables). 

We will need to see the code where you’re also trying to call admob.init(), vungle.init() etc.

Rob

You need to enable developer mode on your device and switch on USB debugging.  This is all info readily available with a quick Google.

my device is already on developper mode and same prob with adb 

rob im using the last version of corona , you need this ? 

--@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ composer.gotoScene ( "menu" ) audio.setVolume(1) audio.setVolume( 1, { channel=0 } ) audio.setVolume( 0, { channel=2 } ) if musicEnabled then audio.play( sndMusic, { channel=10, loops=-1}) end if googleplayservices then gameNetwork.init( "google", gpgsInitCallback ) end if adsAdmob and playerData.removedads == 0 then ads.init( "admob", admob\_id) if TEST\_ADS then ads.load("interstitial", { appId = admob\_id, testMode = true }) else ads.load("interstitial", { appId = admob\_id, testMode = false }) end end if adsVungle then ads.init("vungle", vungle\_id, vungleAdListener) end fader = display.newRect(centerX,centerY,screenWidth,screenHeight) fader:setFillColor(0,0,0) fader:toFront() --@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@

Your problem is most likely you are not including the admob plugin in your build.settings.  Just add that and it will probably work.

Oh re ADB you need to have the correct USB drivers installed for your device otherwise ADB won’t recognise your device.

could you fix it for me on build.settings please here is the code : 

settings = { android = { googlePlayGamesAppId = "962898591734", usesPermissions = { "android.permission.INTERNET", "android.permission.ACCESS\_NETWORK\_STATE", "com.android.vending.BILLING", "com.android.vending.CHECK\_LICENSE", }, }, orientation = { default = "landscape", supported = { "landscape", } }, plugins = { --key is the name passed to the Lua "require()" ["CoronaProvider.gameNetwork.google"] = { --required! publisherId = "com.coronalabs", }, ["plugin.google.play.services"] = { publisherId = "com.coronalabs" }, ["CoronaProvider.ads.vungle"] = { publisherId = "com.vungle", }, ["plugin.google.iap.v3"] = { publisherId = "com.coronalabs", supportedPlatforms = { android=true } }, ["CoronaProvider.native.popup.social"] = { publisherId = "com.coronalabs" }, } }

If you’re having trouble connecting to the device still it might be worth,

  1. Unplug the cable from your PC

  2. Reboot.

  3. Wait for OS to load.

  4. Plug cable back in.

  5. Wait.  You should get a notice (audible or otherwise that the device was recognized by your machine).

  6. Go to command line and type:

adb devices

  1. If you get a list of devices, then try the ADB command:

adb logcat Corona:v *:s

Also, are you on a Windows machine or an OS X machine.  if the prior you may need to update your drivers to recognize the device.

You really need to read the docs!

settings = { plugins = { ["plugin.admob"] = { publisherId = "com.coronalabs" }, }, }