App not running on android phone

hi i built a new app with corona , my app works fine in simulator but when i install it on phone it crash on startup and exit can you help please

Hi @hotrodsaadd.

Welcome to our community forums.

You need to look at your device’s console log and see what’s going on. Depending on your setup the instructions will vary somewhat. 

Are you on a Mac or Windows?

How are you installing your APK on your device?

You might also want to read: https://docs.coronalabs.com/guide/basics/debugging/index.html

It also has a list of common issues that crop up when testing on a device as well has how to look at your console.log.

Rob

Hey rob im on windows  i build the apk and move it to my phone using usb cable… when i install on run it it crash on startup 

You will need to either install Android Studio or “Android Debug Bridge” or “ADB” tools. Once you have that, you can look at your device’s console log for errors.

This is all covered in the debug guide.

We can’t really help you until we can see the error messages.

Rob

tbZiylg.jpg

Unfortunately that’s not very helpful. Messages are cut off. I don’t see any Corona generated messages. Why are you searching for “jetpack”?

Rob

because its my application what i need to search and screenshot??

Install ADB an run this command in a dos box with your phone connected via USB.  It should be obvious what the problem is.

Also make sure you are using a debug key and you haven’t suppressed errors.

adb logcat Corona:v \*:s

here is log for corona : 

JH8B95s.jpg

ZFQuPm9.jpg

3PMu2eR.jpg

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).