Friday, March 4, 2011

Delphi For Android: Invalid Android SDK Directory

When you run the compiler "dccdroid.exe" and get the following error:

"Invalid Android SDK directory, please make sure that the 'AndroidSDKDirectory' application config points to a valid Android SDK location."

There are a few things you need to check:

1. Update the "DCCDroid.exe.config" file:

Change this to point to location of your Android SDK directory.

2. Make sure that "adb.exe" can be found in that directory e.g on my location machine:



neko said...

Hello, I finally fixed the error message... But when I run dccdroid.exe it says

Create Android project...

'C:\Program' is not recognized as an internal or external command,
operable program or batch file.

Convert DFM to text...

Get Form Layout...

Compiler halt error, unable to continue because:

Unable to create Android solution, please make sure that the Android SDK is prop
erly setup.

I installed the Android SDK several times, I am out of ideas...
One more question, about the dccdroid arguments, what is the Project name, is the name of the delphi project and what is Activity name? Thanks in advance.
Sorry if I posted this in the wrong place...

Spyd said...

I have the exact same problem as Neko here.

This is trying to compile the demo program as it compiles ok from the source after changing the uses clausule from "AndroidDialog" to "Android.Dialog".

When I had the same error as Neko, I updated the DCDroid.exe.config file to use the short names (In my case PROGRA~2), and now my error message is this:

"C:\Progra~2\Android\android-sdk-windows\platform-tools\android" no se reconoce como un comando interno o externo, programa o archivo por lotes ejecutable.

Note that my android SDK path on the config file is "C:\Progra~2\Android\android-sdk-windows\platform-tools", as I had to add the platform-tools dir at the end because is where the adb.exe file resides in my android SDK.

The last issue I'm having is that the compiler process freezes on "Get form layout...". It never ends, only if I press Ctrl+C.

Lennie De Villiers said...

Hi Guys, please post your questions in the forum:

Lennie De Villiers said...

neko: Project name is the name of the Delphi project and activity the name of the Android activity... Please refer to the Android development documentation about Activities.

Lennie De Villiers said...

Spyd: Please check what the following is set to in the .config file:

Matheus Galeti said...

hello am from Brazil need to know if you need to use any emulator for android delphi
sorry if my English algun error

Matheus Galeti said...
This comment has been removed by the author.