Closed ppyordanov closed 9 years ago
Android SDK has been installed. Here are some issues that I have documented in case they occur during system configuration (Windows OS):
>android -version
Error: Unable to access jarfile lib\archquery.jar
Invalid path
Access is denied.
ERROR: SWT folder '' does not exist.
Please set ANDROID_SWT to point to the folder containing swt.jar for your platform.
Those were resolved by editing the android.bat executable script file and explicitly declaring the path to the java.exe executable:
rem Check we have a valid Java.exe in the path.
set java_exe="%JAVA_HOME%\bin\java.exe"
if not defined java_exe goto :EOF
However, the manager could not still access the archquery.jar file and this is what was the most time consuming part and took quite a lot of research as there are many different options to try and solve it. What worked at the end for me was to give it the explicit relative path to the file:
rem Set SWT.Jar path based on current architecture (x86 or x86_64)
for /f "delims=" %%a in ('"%java_exe%" -jar lib\archquery.jar') do set swt_path=lib\x86
<uses-sdk android:minSdkVersion="10" android:targetSdkVersion="19" ... />
>phonegap create phonegap
Creating android project...
Creating Cordova project for the Android platform:
Path: platforms\android
Package: com.phonegap.helloworld
Name: Hello World
Android target: android-19
Copying template files...
Project successfully created.
Also installed Apache Ant to enable PhoneGap to build the project:
>ant -version
Apache Ant(TM) version 1.9.4 compiled on April 29 2014
Then tested building the new project:
>phonegap platform add android
>phonegap build
[phonegap] executing 'cordova build'...
[phonegap] completed 'cordova build'
This task is relevant to #50 .
This task has been completed and can be closed now.
Android SDK needs to be installed as a standalone package in order to be able to build PhoneGap/ Cordova projects from sources for the relevant operating system.