Search code examples
androidfiremonkeydelphi-11-alexandria

Delphi 11 - tcp:64311: cannot resolve name: No address associated with hostname Exiting


Trying to launch an Android Application previously made on 10.4.2 in the new delphi 11 but this error occurs. Some forums discuss about adb.exe if it can find the device, it can, the device is plugged in and is recognizable by the IDE.

Adding clarification: The app being tested is a default "helloworld" app: blank screen with a label in the center saying "hello world".

The pictures below show the configuration for SDK 30 but I already tried with the SDK 29 and SDK 28, no luck. Also tried NDK 17.2b from 10.3.3 Rio, NDK 20.1 from 10.4.2 and this time NDK 21.2 from Alexandria, but none of them works.

  • With the lower NDKs (17.2 and 20.1) the app installs, open but freezes on the splash screen and then android hangs it with TCP 64311 error.
  • With latest NDK v21 from Google, the app freezes on the splash screen, gives a method error with Android JNI class and hangs the debugger, then android hangs the app.
  • With v21.2 or v21.3 the app launches properly but throws a TCP 64311 error and hangs the debugger.
  • With NDK 22 it doesn't even configure properly.
  • With a mix of NDK 22 for all options except the ones from NDK_BASE/platforms/android-23 and NDK v21 for those, the app launches, but throws TCP 64311 error along with another signal 39 error.

Any ideas on what should I do?

SDK configuration:

SDK configuration

NDK configuration:

NDK configuration

JAVA OpenJDK configuration:

JAVA OpenJDK configuration


Solution

  • Found this solution, which actually works ;-) at a Delphi Czech Forum. Embarcadero installs a patched NDK with Delphi, so if you install one by your own, you need to use a patched "gdbserver" file (For instance with RAD Studio 11 "C:\Users\Public\Documents\Embarcadero\Studio\22.0\CatalogRepository\AndroidNDK-21-22.0.42600.6491\android-ndk-r21\prebuilt\android-arm\gdbserver"), here you my find two files, the original gdbserver file renamed to gdbserver.orig and a patched one named gdbserver. You need to copy this file where whenever you installed and pointed at Delphi the NDK inside the "prebuilt\android-arm\gdbserver" folder