Reputation: 633
I wanted a little "play" the PhoneGap framework on Ubuntu , so I installed the necessary tools (ADT , Java, Node.js , PhoneGap , etc. . ), But from the very beginning haunt me some bad luck. I created a project command:
cordova create hello com.example.hello "HelloWorld"
then moved on to the project directory command 'cd ' and I wanted to add the Android platform to project command:
cordova platform add android
Unfortunately , the first time I received an error in the form of missing libraries - when I installed it I received another error (actually two errors ) that reads:
error while loading share libraries : libstdc + + . so.6 : can not open shared object file: No such file or directory
build.xml : 653 : The Following error occured while executing this line : ... build.xml : 698 : null returned : 127
And also I get : BUILD FAILED . Does anyone know how to fix it. Or maybe it at all, I make bad design (trying to imitate official guide -> http://docs.phonegap.com/en/edge/guide_platforms_android_index.md.html#Android%20Platform%20Guide)
Please help and best regards.
Upvotes: 0
Views: 1471
Reputation: 46
I had the same issue and tracked this down.
In the process of adding the platform support cordova calls the javascript file $HOME/.cordova/lib/android/cordova/3.2.0/bin/create
which includes $HOME/.cordova/lib/android/cordova/3.2.0/bin/lib/create.js
which then calls ant jar
in the directory $HOME/.cordova/lib/android/cordova/3.2.0/framework
. If you do this manually, you receive this error message
-code-gen:
[mergemanifest] No changes in the AndroidManifest files.
[echo] Handling aidl files...
[aidl] No AIDL files to compile.
[echo] ----------
[echo] Handling RenderScript files...
[echo] ----------
[echo] Handling Resources...
[aapt] Generating resource IDs...
[aapt] [your path to adt-bundle]/adt-bundle-linux-x86_64-20131030/sdk/build-tools/android-4.4/aapt: error while loading shared libraries: libstdc++.so.6: cannot open shared object file: No such file or directory
The solution on my Ubuntu 13.10 was to do a sudo apt-get install lib32stdc++6
.
Now the
cordova create hello com.example.hello "HelloWorld"
worked smoothly. Hope it works for you, too.
Upvotes: 3