/android-4.4/aapt: error while loading shared libraries: libstdc++.so.6: ...

dareek

  • Posts: 91
Hi everyone.
I have just installed new Stencil on a newly set Ubuntu 14.04 64-bit Linux system.
I copied to my new 'stencylworks' catalog all content of the old folders 'games' and 'games-generated', cause I wanted to continue to work on my projects.
I have installed the android-sdk and ndk and other tools using script provided in the 'android-sdk' folder.
I am able to compile and run my game as a flash in the player and in the browser.
When I try to compile the android version, console shows the problem:
Code: [Select]
...
2015-02-05 11:13:23,056 INFO  [Thread-51] stencyl.sw.util.StreamGobbler:      [echo] ----------
2015-02-05 11:13:23,057 INFO  [Thread-51] stencyl.sw.util.StreamGobbler:      [echo] Handling Resources...
2015-02-05 11:13:23,062 INFO  [Thread-51] stencyl.sw.util.StreamGobbler:      [aapt] Generating resource IDs...
2015-02-05 11:13:23,088 INFO  [Thread-51] stencyl.sw.util.StreamGobbler:      [aapt] /home/me/stencylworks/android-sdk/android-sdk-linux/build-tools/android-4.4/aapt: error while loading shared libraries: libstdc++.so.6: wrong ELF class: ELFCLASS64
2015-02-05 11:13:23,105 INFO  [Thread-51] stencyl.sw.util.StreamGobbler: BUILD FAILED
2015-02-05 11:13:23,106 INFO  [Thread-51] stencyl.sw.util.StreamGobbler: /home/me/stencylworks/android-sdk/android-sdk-linux/tools/ant/build.xml:598: The following error occurred while executing this line:
2015-02-05 11:13:23,113 INFO  [Thread-51] stencyl.sw.util.StreamGobbler: /home/me/stencylworks/android-sdk/android-sdk-linux/tools/ant/build.xml:650: The following error occurred while executing this line:
2015-02-05 11:13:23,113 INFO  [Thread-51] stencyl.sw.util.StreamGobbler: /home/me/stencylworks/android-sdk/android-sdk-linux/tools/ant/build.xml:691: null returned: 127
2015-02-05 11:13:23,114 INFO  [Thread-51] stencyl.sw.util.StreamGobbler: Total time: 1 second
2015-02-05 11:13:23,141 INFO  [Thread-51] stencyl.sw.util.StreamGobbler: haxelib repository is now /home/me/Software/DEV/Stencyl-64-full/plaf/haxe/lib/
2015-02-05 11:13:23,143 INFO  [Util-CommandMonitor] stencyl.sw.io.write.resource.HXWriter: Finished building for Android.

Looks like I am stuck.

dareek

  • Posts: 91
I got it working. I just needed to install 32-bit version of the libstdc++6 library.
Somehow it is not installed after following official Stencyl's tutorial about installing Stencyl on Ubuntu Linux.
This is a command to fix it:
Quote
sudo apt-get install libstdc++6:i386

captaincomic

  • *
  • Posts: 6109
Thanks for sharing the solution, I'll add it to the article.