Build does not build

Hello people. New guy here. Decided to check this out and run a few demos. I installed the latest Corona SDK and the Java SE 6 Update 26 JDK. I opened up the simple pool demo and it runs fine in the simulator. But when I try building it does not build. The following is the full output.

Windows simulator build date: May 18 2011 @ 15:25:09  
  
Copyright (C) 2009-2011 A n s c a , I n c .  
 Version: 2.0.0  
 Build: 2011.505  
WARNING: display.setStatusBarMode() not supported in the simulator for the curre  
nt device  
 [copy] Warning: Could not find file C:\Program Files (x86)\Ansca\Corona SDK  
\Sample Code\Physics\SimplePool\Icon-hdpi.png to copy.  
 [copy] Warning: Could not find file C:\Program Files (x86)\Ansca\Corona SDK  
\Sample Code\Physics\SimplePool\Icon-ldpi.png to copy.  
 [copy] Warning: Could not find file C:\Program Files (x86)\Ansca\Corona SDK  
\Sample Code\Physics\SimplePool\Icon-mdpi.png to copy.  
Failed to copy C:\Users\Pedro\AppData\Local\Temp\Anscamobile\1312069554\MyCorona  
Activity-signed-aligned.apk to C:\Program Files (x86)\Ansca\Corona SDK\Sample Co  
de\Physics\SimplePool\Test Game.apk due to java.io.FileNotFoundException C:\Prog  
ram Files (x86)\Ansca\Corona SDK\Sample Code\Physics\SimplePool\Test Game.apk (A  
ccess is denied)  

Was a “MyCoronaActivity-signed-aligned.apk” file suppose to be included in the instal? Thanks. [import]uid: 78875 topic_id: 13072 reply_id: 313072[/import]

Hello Pedro,

The build fails because you are trying to build the application under the Program Files folder, which your user account does not have write permission to. Try building the app to a location that you do have permission to such as under “My Documents” or your “Desktop”. [import]uid: 32256 topic_id: 13072 reply_id: 48101[/import]

Wow, what a damn noob error. I need to start thinking like a developer again. Thanks. [import]uid: 78875 topic_id: 13072 reply_id: 48226[/import]

Don’t be so hard on yourself. It happens to the best of us. :slight_smile: [import]uid: 32256 topic_id: 13072 reply_id: 48235[/import]

Hello,

I have a similar problem - except I can build. The issue is that I get the same error with respect to being unable to find the icon files. They are in the root directory (same as main.lua) and have the correct names, sizes, etc. I would really appreciate it if somebody could tell me what I need to do to have them “found” during the build process.

Thanks,
JFish [import]uid: 81347 topic_id: 13072 reply_id: 66446[/import]

Hey Jayme,
Are you sure that your build.settings and config.lua are well setup?

PS: You have to “declare” the Icons in the build.settings file as well.

*Follow a example of the file build.settings for you to have a look.

[lua]settings =
{
orientation = {

supported = { “portrait”, “portraitUpsideDown” },

},

iphone =
{
plist =
{
CFBundleIconFile = “Icon.png”,
CFBundleIconFiles = {
“Icon.png”,
“Icon@2x.png”,
“Icon-72.png”,
},
},
}
}[/lua]
Regards,
Rodrigo. [import]uid: 89165 topic_id: 13072 reply_id: 66521[/import]

Thanks for that information and the quick reply. I have been ble to get the icons to work for iPhone. My problem is the Android build. When I do android it says it cannot find them. It still compiles, but with the standard ansca icon. Do you have an example of what I need to do in the settings and build files for Android? [import]uid: 81347 topic_id: 13072 reply_id: 66573[/import]

You need to create 3 more image files to be used as your Android app icon. They must be named as follows…
Icon-hdpi.png
Icon-mdpi.png
Icon-ldpi.png

Check out the sample apps included with the Corona SDK for an example of how these icon files should be named. Also notice the image dimensions of this image files… that’s important. You do not have to add anything to the build.settings file for the build process to pickup these Android files. The build process will automatically include the above file names if they exist in the root Corona project directory (as seen in the sample projects).
[import]uid: 32256 topic_id: 13072 reply_id: 66575[/import]

Thanks for that reply Joshua. The problem is that I did that. They have the exact names and dimensions. I placed them in the same directory as main.lua. For some reason the build process refuses to find them. The only differnce from my other builds is that I am doing this one on Windows. I am not sure if that has anything to do with it. It is worth noting that I was drawn to this thread because when I searched for the error I saw the exact same icon error in the original post. The permissions issue was solved for that post but I believe the icon error was different because it was not about writing the file, it was about finding the resources. I note that the path in that output looks like a Windows machines also. It could be operator error but I have triple checked this and even bought an icon generating program to make sure the dimmensions were correct … [import]uid: 81347 topic_id: 13072 reply_id: 66644[/import]

Unlike Windows, the Android file system is case sensitive. So, please make sure that the casing for these 3 files is exactly right and that these files all start with a capital ‘I’.

Also, are you editing a Corona sample project under the Program Files directory? If so, then that is the cause of the problem. Your user account under Windows 7 or Vista does not have write permissions to this folder by default, so all of your file edits end up going to a mirrored folder and your changes won’t get included in the build. If you want to play around with a sample project and make changes to it, then please copy and past the folder out of the Program Files directory and into a directory that you have permission to, such as your Documents directory. [import]uid: 32256 topic_id: 13072 reply_id: 66777[/import]

I did not modify an example. This is my from-scratch code for a game that I have already compiled for iOS. It is in iTunes. Here are the exact file names I am using for the Android icons (cut and pasted from properties):
Icon-hdpi.png
Icon-ldpi.png
Icon-mdpi.png
Also, please note the error message in the original post on this thread. It looks like “pedro4” had the same file names and that they could not be located either. [import]uid: 81347 topic_id: 13072 reply_id: 66848[/import]

Pedro’s file change were not being picked up because he was building from the “Program Files” directory. The proof is in the log he posted. My previous posting in this thread indicates why this would cause problems.

Are you building with the release versoin, build #591, or higher? I do know that older versions of Corona, older that build #591, had problems picking up the icon files. [import]uid: 32256 topic_id: 13072 reply_id: 66891[/import]

I am on 613. I will stop using pedro4’s post as an example - but I still can’t locate the icons on build. [import]uid: 81347 topic_id: 13072 reply_id: 66953[/import]

Upgraded to 657 - did not resolve the issue. [import]uid: 81347 topic_id: 13072 reply_id: 66970[/import]

Same issue verified on the Mac with build 613. Simulator output below:

[html]
Using Custom Build Id a79bd76f833238c98ff00eaebba457b5
[copy] Warning: Could not find file /Users/jayme_fishman/Desktop/Android Release Code/Icon.png to copy.
[copy] Warning: Could not find file /Users/jayme_fishman/Desktop/Android Release Code/Icon-hdpi.png to copy.
[copy] Warning: Could not find file /Users/jayme_fishman/Desktop/Android Release Code/Icon-ldpi.png to copy.
[copy] Warning: Could not find file /Users/jayme_fishman/Desktop/Android Release Code/Icon-mdpi.png to copy.
[/html]

screenshot of image files in my root folder:
www.geekfingers.com/images/droidfolder.png (dimensions verified)

Here are the settings from the build file:

[lua]settings =
{

android =
{

versionCode = “1”
},

orientation =
{
default = “portrait”,
supported =
{
“portrait”,
},
},
iphone =
{
plist =
{
UIPrerenderedIcon = true,
UIApplicationExitsOnSuspend = true,
CFBundleIconFile = “Icon.png”,
CFBundleIconFile = “Icon.png”,
CFBundleIconFiles = {
“Icon.png”,
“Icon@2x.png”,
“Icon-72.png”
},
},
}
}
[lua]Any help you could offer would be greatly appreciated. [import]uid: 81347 topic_id: 13072 reply_id: 67021[/import]

Just bumping the last post. Please let me know if you require any additional information to analyze the issue. [import]uid: 81347 topic_id: 13072 reply_id: 67596[/import]

Wait a minute. I know what’s wrong. Your Windows environment is set up to hide file extensions of known file types. That means your icon files are not named what you think they are. I bet you your “Icon-hdpi.png” is really named “Icon-hdpi.png.png” and that’s why the build system can’t find it.

To prove it, right click on your icon PNG file, select “Rename” from the popup menu, and remove the “.png” part of the file name. Do the same for the rest of your Android icon image files. Notice when you do this, Windows Explorer will still recognize that these files are PNGs because it won’t let you change the extension part of the file name. Build it and let me know if that does the trick. [import]uid: 32256 topic_id: 13072 reply_id: 67657[/import]

Awesome! You nailed it. I would never have thought to try that. It worked. THANK YOU. I bet I must have had the file type selected on creation and then somehow entered the full name including the extension when I saved it (but to your point, could not see it because it was hidden). Thanks again.

JFish [import]uid: 81347 topic_id: 13072 reply_id: 67711[/import]

I’m glad it’s working for you! Phew! What a relief! :slight_smile:

I recommend that you change your Windows settings to reveal all file extensions. You can do this as follows on Windows XP:

  1. Open “Windows Explorer”.
  2. Click on menu item “Tools\Folder Options”.
  3. Click on the “View” tab.
  4. Uncheck “Hide extensions for known file types”.
  5. Click the OK button.

If you are using Windows 7 or Vista, then press the ALT key to reveal Windows Explorer’s menu and follow the same steps above. [import]uid: 32256 topic_id: 13072 reply_id: 67789[/import]

I did as you suggested. Thanks again for all the help. [import]uid: 81347 topic_id: 13072 reply_id: 67938[/import]