Jump to content
at3s

Error while building an Android application in Delphi 10.4 Sydney

Recommended Posts

An Android application compiles fine in Delphi 10.3.3 Rio, but after I've migrated to Delphi 10.4 Sydney I started to get an error:

 

Quote

[DCC Error] E2597 C:\Users\Public\Documents\Embarcadero\Studio\21.0\CatalogRepository\AndroidNDK-21-21.0.37889.9797\android-ndk-r21\toolchains\arm-linux-androideabi-4.9\prebuilt\windows-x86_64\bin\arm-linux-androideabi-ld.exe: error: cannot find -lgnustl_static

 

Has anyone something similar?

Share this post


Link to post
Guest

my tip:

  • my tip main: DONT INSTALL THE SOFTWARES IN FOLDERS WITH LONG-NAME
    • reason: PATH variable on system operating!
    • mainly software like SDK/NDK that use many "tree-nodes" in your default "installation"
  • Android SDK/NDK is not "installed" in your system... just unziped and copyed to your disk!
    • then, you can copy it from any other pc with same versions and updates (if necessary) using SDKManager.exe in SDK Windows folder
  • As "IT" is not installed, just copyed, then, you can have it in any disk or folder
    • try copy to another place with shor-name, like:  C:\SDKs\.... or D:\SDKs\...
    • if you want try, you can just delete this whole directory (..\\AndroidNDK-21-21.0.37889.9797\) or copy to another place with shor-name, like:  C:\SDKs\.... or D:\SDKs\...
    • try dont use this "horrible-root-name" AndroidNDK-21-21.0.37889.9797 -- change it for: NDK21  (NDK is Android, 21 is Sydney)
      • same for SDK for MSWindows used by Android!
  • for last, use your IDE (menu SDK Manager) to re-config your paths for Android setup.

Last note: RAD 10.4 Sydney is a traged! if possible stay on RAD 10.3.3 Rio

Edited by Guest

Share this post


Link to post
23 minutes ago, emailx45 said:

my tip:

  • my tip main: DONT INSTALL THE SOFTWARES IN FOLDERS WITH LONG-NAME
    • reason: PATH variable on system operating!
    • mainly software like SDK/NDK that use many "tree-nodes" in your default "installation"
  • Android SDK/NDK is not "installed" in your system... just unziped and copyed to your disk!
    • then, you can copy it from any other pc with same versions and updates (if necessary) using SDKManager.exe in SDK Windows folder
  • As "IT" is not installed, just copyed, then, you can have it in any disk or folder
    • try copy to another place with shor-name, like:  C:\SDKs\.... or D:\SDKs\...
    • if you want try, you can just delete this whole directory (..\\AndroidNDK-21-21.0.37889.9797\) or copy to another place with shor-name, like:  C:\SDKs\.... or D:\SDKs\...
    • try dont use this "horrible-root-name" AndroidNDK-21-21.0.37889.9797 -- change it for: NDK21  (NDK is Android, 21 is Sydney)
      • same for SDK for MSWindows used by Android!
  • for last, use your IDE (menu SDK Manager) to re-config your paths for Android setup.

Last note: RAD 10.4 Sydney is a traged! if possible stay on RAD 10.3.3 Rio

Thanks, but your propositions did not help: I've created a hard link D:\SDKs\SDK-25 and D:\NDKs\NDK-21, but I still get the same error.
 

Quote


[DCC Error] E2597 D:\NDKs\NDK-21\android-ndk-r21\toolchains\arm-linux-androideabi-4.9\prebuilt\windows-x86_64\bin\arm-linux-androideabi-ld.exe: error: cannot find -lgnustl_static

 

 

Any idea?

Share this post


Link to post
Guest

the "magic" dont happens so easy!

if your files is not ok!

try on the order passed!

if dont have another Android SDK/NDK to copy from another pc, try "remove it and re-insalled" by RAD installer

if not possible, install your RAD in a VM and copy the Android SDK/NDK

if not possible, install the Android Studio by https://developer.android.com/studio

if not possible, hey friend, before "format c 😄", try a RAD re-install (delete all residual files and keys on Regedit --- if your license allow it)

if not possible, it's a bad news! 

Share this post


Link to post
1 hour ago, at3s said:

Has anyone something similar?

Yes - are you perhaps using an older version of the Grijjy Error Reporting code? The error in question was happening before they updated this unit:

 

https://github.com/grijjy/JustAddCode/blob/master/ErrorReporting/Grijjy.ErrorReporting.pas

 

Otherwise, you'd need to detail exactly what you're compiling and perhaps include a reproducible example.

 

 

  • Thanks 1

Share this post


Link to post
6 minutes ago, Dave Nottage said:

Yes - are you perhaps using an older version of the Grijjy Error Reporting code? The error in question was happening before they updated this unit:

 

https://github.com/grijjy/JustAddCode/blob/master/ErrorReporting/Grijjy.ErrorReporting.pas

 

Otherwise, you'd need to detail exactly what you're compiling and perhaps include a reproducible example.

 

 

Exactly! I'm using this unit. But I do not see any newer versions of this unit on github.

Share this post


Link to post
Guest
2 hours ago, at3s said:

An Android application compiles fine in Delphi 10.3.3 Rio, but after I've migrated to Delphi 10.4 Sydney I started to get an error:

...

Has anyone something similar?

Adopting the OpenJDK for Delphi Android Development - already used by Embarcadero at reason of Oracle license 

https://www.barnsten.com/adopting-the-openjdk-for-delphi-android-development/

Edited by Guest

Share this post


Link to post
32 minutes ago, at3s said:

I do not see any newer versions of this unit on github

It could be due to the version of the NDK. Try changing: 'libgnustl_static.a' to 'libc++abi.a'
 

  • Like 1

Share this post


Link to post
51 minutes ago, Dave Nottage said:

It could be due to the version of the NDK. Try changing: 'libgnustl_static.a' to 'libc++abi.a'
 

I'm sorry, but where I have to change it?

Share this post


Link to post
45 minutes ago, at3s said:

I'm sorry, but where I have to change it?

In the unit we've been discussing:

 

image.thumb.png.7ae81bdf49889553643c9481b46b0220.png

  • Thanks 1

Share this post


Link to post
11 hours ago, Dave Nottage said:

In the unit we've been discussing:

 

image.thumb.png.7ae81bdf49889553643c9481b46b0220.png

Thank you, this solution works.

Share this post


Link to post

Delphi 10.4 (finally) switched to a new version of the Android NDK. The GNU-STL had been deprecated for a long time, and Delphi finally switched to libc++.

 

Thanks for pointing this out. I will make the change in the official repo.

  • Like 1

Share this post


Link to post
On 12/14/2020 at 8:03 AM, at3s said:

Thank you, this solution works.

Hello, I have the same problem, how did you manage to solve this?
Where should I make the change?
Thank you

Share this post


Link to post
4 hours ago, Bertifox said:

Where should I make the change?

As per the earlier replies, in Grijjy.ErrorReporting.pas. Please read the replies to see exactly where in that unit, and what to change.

Share this post


Link to post
2 minutes ago, at3s said:

Erik@Grijjy already done required changes:

Weird.. I could have sworn when I checked earlier there had not been any commits for that file since my first reply. Thanks!

Share this post


Link to post
3 minutes ago, Dave Nottage said:

Weird.. I could have sworn when I checked earlier there had not been any commits for that file since my first reply. Thanks!

image.thumb.png.07d924a1f61f98b3dfdaa70288a2037e.png

 

Yup, he did it on Dec 21, 2020

  • Like 2

Share this post


Link to post

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×