Google Android Development Agency SASS
Showing posts with label problems. Show all posts
Showing posts with label problems. Show all posts

Tuesday, 5 May 2009

Lots of weird errors with iPhone 3.0 SDK Beta

Today is the first day I've been doing iPhone 2.2.1 development alongside the iPhone 3.0 beta and I can tell you that things have not gone to plan.

The first nightmare I encountered was to do with the naming of my 2.2.1 app. The name has a space in it (which is not technically allowed I now understand although nothing has ever moaned before). When I tried to compile the app using the 2.2.1 framework I get the error:

com.apple.tools.product-pkg-utility: error: CFBundleIdentifier 'com.yourcompany.Project_name' contains illegal character '_'


The first thing to note here is that the only thing that's changed on this Mac since the last time I compiled the app is that I've installed the iPhone 3.0 beta SDK.

The only way I've found to get around this so far is to manually edit the "Identifier" field in the project settings to remove the space, and hard code to package identifier (not good).

The next weird thing happened when I tried running the app on a connected iPhone. (In fact the iPhone that I've been using for all of the development up until now).
When I first ran the app from XCode I received the error "The application is already installed on the device".

Obviously the app is already installed, I've been developing it for months! Normally XCode would just overwrite the app and keep all of your application settings and data, but now it seems I have to manually delete the app from the phone before hitting build and go. Extremely frustrating!

This last problem seems a little unpredictable too - I've just ran the app twice from XCode without uninstalling it and it hasn't popped up the error yet. We shall see...

I should state that all of this is with me targetting 2.2.1, I haven't ran it under 3.0 yet.

If I come up with anymore solutions or problems, I'll update this post but for now I'd better get back to making it work!

Friday, 24 April 2009

Problems with Android 1.5 pre release

Just been trying the pre-release of Android 1.5 and hit a problem with one of the new features of the emulator.

With this version, you can create "Android Virtual Devices" (AVDs) which allow you to run multiple configurations of the emulator side-by-side without having to run long command line switches.

I'd created my new 1.5 AVD using

android create avd --name cc --target 3 --sdcard 16M --skin HVGA

but then trying to invoke (emulator @cc) it gave the error

could not locate a virtual device named 'cc'

If you run into this problem, you can diagnose what's wrong by running

emulator -debug avd_config -avd cc

Running this gave me a weird path problem, the emulator was trying to find the .ini file for my AVD in c:\Users\Andy\ instead of e:\andy\. (I'm on Vista and my profile is on drive e:\).

To fix this, all I had to do was create a new environment variable ANDROID_SDK_HOME and point this at the moved profile directory. Restarted the command line so that it would register the variable and all was well.

Now for some Cupcake fun!