Error Application has been corrupted Android

Hi Folks,

I have a build that shows up fine in the emulator but when i port to a Galaxy Tab 10.1. (honeycomb) i get an error message saying “This application has been corrupted”

Any Ideas?

Thanks [import]uid: 120979 topic_id: 21137 reply_id: 321137[/import]

That has happened to me too. Make sure your not requiring any .lua files that aren’t necessary, like for instance require “main”. That is something you don’t want to do. Usually those errors are compile errors that are mistakes on your part. If you post the code, we can take a look and see if we can catch the problem.

Regards,
Jordan Schuetz
Ninja Pig Studios [import]uid: 29181 topic_id: 21137 reply_id: 83669[/import]

I have checked all the casing and require

I have image files in folders like images/test/test.png

Will this make any difference?

Thanks [import]uid: 120979 topic_id: 21137 reply_id: 83677[/import]

That actually may make a difference. I’m not sure, but if you don’t own a copy of Corona, then you may have an old build that doesn’t support pictures in separate folders. Try that and tell me what happens :slight_smile:

Regards,
Jordan Schuetz
Ninja Pig Studios [import]uid: 29181 topic_id: 21137 reply_id: 83691[/import]

Hi

I was able to find out where the problem was. How can i fix it?

If i comment out this code, the android package works fine.

[code]
house_glow = sprite.newSpriteSheetFromData( “images/Sprite_Source/house_glow.png”, require(“images/Sprite_Source/house_glow”).getSpriteSheetData() )

local spriteSet = sprite.newSpriteSet(house_glow,1,10)

sprite.add(spriteSet,“house_glow”,1,10,1000,0)
local spriteInstance = sprite.newSprite(spriteSet)

[/code] [import]uid: 120979 topic_id: 21137 reply_id: 83782[/import]

Are the file names exactly like that?

You can sometimes get away with case in the simulator but not on device.

this.png vs This.png can be the result of failure or success.

If you have adb installed. While running your app (keep usb cable plugged in) type this in terminal

adb logcat

that will report the error. [import]uid: 84637 topic_id: 21137 reply_id: 83862[/import]

Danny,

I checked the case, it is fine. [import]uid: 120979 topic_id: 21137 reply_id: 83881[/import]

so you got it working ? [import]uid: 84637 topic_id: 21137 reply_id: 83983[/import]

No still the problem [import]uid: 120979 topic_id: 21137 reply_id: 84056[/import]

Ok how large is your sprite sheet ? (1024x1024… larger? [import]uid: 84637 topic_id: 21137 reply_id: 84059[/import]

spriteSourceSize = { width = 189, height = 215 },

189 x 215

11 frame animation [import]uid: 120979 topic_id: 21137 reply_id: 84061[/import]

Try moving your sprite sheet and data file to the root directory and try again [import]uid: 84637 topic_id: 21137 reply_id: 84064[/import]

OK, moving to the root worked. What happened here, are you saying that I have to keep all my animated PNGs and spritesheets at the root level? Why does the folder path not work?

Thanks [import]uid: 120979 topic_id: 21137 reply_id: 84085[/import]

I had this problem a while ago.

Maybe this will fix?

[code]

local spritepath = system.pathForFile(“images/Sprite_Source/house_glow.png”, system.ResourceDirectory )

local spriteSourcePath = system.pathForFile(“images/Sprite_Source/house_glow”, system.ResourceDirectory )

house_glow = sprite.newSpriteSheetFromData( spritepath, require(spriteSourcePath).getSpriteSheetData() )

[import]uid: 84637 topic_id: 21137 reply_id: 84088[/import]

I am getting an error bad argument #1 to require (string expected, got nil)

[lua]local spritepath = system.pathForFile(“images/Sprite_Source/house_glow.png”, system.ResourceDirectory )

local spriteSourcePath = system.pathForFile(“images/Sprite_Source/house_glow”, system.ResourceDirectory )

house_glow = sprite.newSpriteSheetFromData( spritepath, require(spriteSourcePath).getSpriteSheetData() )

local spriteSet = sprite.newSpriteSet(house_glow,1,10)

sprite.add(spriteSet,“house_glow”,1,10,1000,0)
local spriteInstance = sprite.newSprite(spriteSet)[/lua]

Any ideas what this error is?

Thanks for your help [import]uid: 120979 topic_id: 21137 reply_id: 84227[/import]

just a thought I had the same problem with upper and lower case, consider making all your assets lowercase, including the folder names

eg I can see

“Sprite_Source” is in mixed case. this will work on a PC, but when deployed may cause a problem. So to catchj all rename your folder “Sprite_Source” to lowercase and reference it in lowercase from the code. [import]uid: 74338 topic_id: 21137 reply_id: 95902[/import]