I'm using PhoneGap in my graduation project which finishes after approximately one month. I need in my project to create two PhoneGap applications (Android & IOS) from within a PHP webpage. I'm using the command line as PhoneGap community said and everything is ok on Windows I can create Android project (for sure not IOS because it's only on Mac). However, recently I moved all my work to MAC Pro laptop and prepared PhoneGap environment and tested it perfectly working. What has shocked me is that when I'm trying to create Android project from PHP page it's not working and gives me this error
**An unexpected error occurred:
ANDROID_BIN="${ANDROID_BIN:=$( which android )}" exited with 1 Deleting project…**
Whereas if I copy the same command using in PHP to MAC terminal it's working perfectly. Also what has shocked me is that creating IOS app has no problem. I asked and searched a lot on the Internet but I can't find exactly what I need and honestly I can't understand the problem. (What is different between using exec()
in PHP and terminal
in MAC ?).
Also related to the above error after some search I found someone said that you need to configure the create file in android/bin. I did that and the above problem fixed but appear a new one said that's you need to download Android version even that I have one. I'm Android developer by the way and what makes me stop changing the create file that's from terminal working which means no problem in create file.
Regards.