Perfect, thanks Brice. One thing you're definitely not doing is wasting my time!
Perfect, thanks Brice. One thing you're definitely not doing is wasting my time!
Hi Brice,
I am having similar issue as airaid, except I dont get the following msg in Command
ANDROID_BIN="$'{'ANDROID_BIN:=$( which android )'}'"This is mine out put:
Any idea what is going on? I should have all the latest required files as I grabbed everything today.Code:[INF] -init-android-internal:
[INF] [echo] initializating android build...
[INF] [echo] creating android project with the following details:
[INF] [echo] project path: C:\inetpub\wwwroot\NoteApp\build\NoteA
pp\android
[INF] [echo] project namespace: com.developiq.NoteApp
[INF] [echo] project name: NoteApp
[INF] [exec] Missing one of the following:
[INF] [exec] JDK: http://java.oracle.com
[INF] [exec] Android SDK: http://developer.android.com
[INF] [exec] Apache ant: http://ant.apache.org
[ERR] [exec] Result: 1
[ERR] BUILD FAILED
[ERR] com.sencha.exceptions.BasicException: C:\inetpub\wwwroot\NoteApp
\build\NoteApp\android does not exist.
[ERR] at com.sencha.exceptions.BasicException.wrap(BasicExcept
ion.java:43)
[ERR] at com.sencha.cli.Command.dispatch(Command.java:104)
[ERR] at com.sencha.cli.Commands.dispatch(Commands.java:49)
[ERR] at com.sencha.cli.AbstractCommand.dispatch(AbstractComma
nd.java:182)
[ERR] at com.sencha.ant.SenchaCommandTask.doExecute(SenchaComm
andTask.java:58)
[ERR] at com.sencha.ant.BaseAntTask.execute(BaseAntTask.java:2
2)
[ERR] at org.apache.tools.ant.UnknownElement.execute(UnknownEl
ement.java:291)
[ERR] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native M
ethod)
[ERR] at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown S
ource)
[ERR] at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unkno
wn Source)
[ERR] at java.lang.reflect.Method.invoke(Unknown Source)
[ERR] at org.apache.tools.ant.dispatch.DispatchUtils.execute(D
ispatchUtils.java:106)
[ERR] at org.apache.tools.ant.Task.perform(Task.java:348)
[ERR] at org.apache.tools.ant.Target.execute(Target.java:392)
[ERR] at org.apache.tools.ant.Target.performTasks(Target.java:
413)
[ERR] at org.apache.tools.ant.Project.executeSortedTargets(Pro
ject.java:1399)
[ERR] at org.apache.tools.ant.Project.executeTarget(Project.ja
va:1368)
[ERR] at org.apache.tools.ant.helper.DefaultExecutor.executeTa
rgets(DefaultExecutor.java:41)
[ERR] at org.apache.tools.ant.Project.executeTargets(Project.j
ava:1251)
[ERR] at com.sencha.ant.AntRunner.run(AntRunner.java:156)
[ERR] at com.sencha.ant.AntRunner.run(AntRunner.java:72)
[ERR] at com.sencha.command.BasePluginCommands$BasePluginComma
nd.run(BasePluginCommands.java:87)
[ERR] at com.sencha.command.BasePluginCommands$BasePluginComma
nd.run(BasePluginCommands.java:91)
[ERR] at com.sencha.command.BasePluginCommands$BaseNamePathCom
mand.run(BasePluginCommands.java:135)
[ERR] at com.sencha.command.app.AppCommands$BuildCommand.execu
te(AppCommands.java:106)
[ERR] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native M
ethod)
[ERR] at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown S
ource)
[ERR] at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unkno
wn Source)
[ERR] at java.lang.reflect.Method.invoke(Unknown Source)
[ERR] at com.sencha.cli.Command.dispatch(Command.java:78)
[ERR] at com.sencha.cli.Commands.dispatch(Commands.java:49)
[ERR] at com.sencha.cli.Commands.dispatch(Commands.java:49)
[ERR] at com.sencha.command.Sencha.main(Sencha.java:71)
[ERR] Caused by: C:\Users\Documents\_SRC\_sencha\bricemas
on-sencha-cordova-builder-75c7c5b\build-cordova-android.xml:59: C:\inetpub\wwwro
ot\NoteApp\build\NoteApp\android does not exist.
[ERR] at org.apache.tools.ant.types.AbstractFileSet.getDirecto
ryScanner(AbstractFileSet.java:483)
[ERR] at org.apache.tools.ant.taskdefs.MatchingTask.getDirecto
ryScanner(MatchingTask.java:192)
[ERR] at org.apache.tools.ant.taskdefs.Replace.execute(Replace
.java:542)
[ERR] at org.apache.tools.ant.UnknownElement.execute(UnknownEl
ement.java:291)
[ERR] at sun.reflect.GeneratedMethodAccessor8.invoke(Unknown S
ource)
[ERR] at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unkno
wn Source)
[ERR] at java.lang.reflect.Method.invoke(Unknown Source)
[ERR] at org.apache.tools.ant.dispatch.DispatchUtils.execute(D
ispatchUtils.java:106)
[ERR] at org.apache.tools.ant.Task.perform(Task.java:348)
[ERR] at org.apache.tools.ant.Target.execute(Target.java:392)
[ERR] at org.apache.tools.ant.Target.performTasks(Target.java:
413)
[ERR] at org.apache.tools.ant.Project.executeSortedTargets(Pro
ject.java:1399)
[ERR] at org.apache.tools.ant.Project.executeTarget(Project.ja
va:1368)
[ERR] at org.apache.tools.ant.helper.DefaultExecutor.executeTa
rgets(DefaultExecutor.java:41)
[ERR] at org.apache.tools.ant.Project.executeTargets(Project.j
ava:1251)
[ERR] at com.sencha.ant.AntRunner.run(AntRunner.java:156)
[ERR] at com.sencha.ant.AntRunner.run(AntRunner.java:80)
[ERR] at com.sencha.command.ant.AntCommand.execute(AntCommand.
java:75)
[ERR] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native M
ethod)
[ERR] at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown S
ource)
[ERR] at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unkno
wn Source)
[ERR] at java.lang.reflect.Method.invoke(Unknown Source)
[ERR] at com.sencha.cli.Command.dispatch(Command.java:78)
[ERR] ... 31 more
[ERR] Total time: 17 seconds
[ERR] com.sencha.exceptions.BasicException: C:\inetpub\wwwroot\NoteApp
\build\NoteApp\android does not exist.
Cheers
Karen
Hi Karen,
It looks like you're missing one or more requirements of PhoneGap. This snippet from your log output:
relates to that. Make sure that each of these requirements is also in your system PATH. You can confirm this by issuing the commands:Code:[INF] [echo] project path: C:\inetpub\wwwroot\NoteApp\build\NoteA
pp\android
[INF] [echo] project namespace: com.developiq.NoteApp
[INF] [echo] project name: NoteApp
[INF] [exec] Missing one of the following:
[INF] [exec] JDK: http://java.oracle.com
[INF] [exec] Android SDK: http://developer.android.com
[INF] [exec] Apache ant: http://ant.apache.org
[ERR] [exec] Result: 1
If you see output like not recognized as an internal command, then it's not installed and/or not in your system PATH. I also believe on Windows you should be able to issue commands:Code:java
javac
android
ant
to find out where they've been installed to. Not totally sure on that but give it a try if need be.Code:where java
where android
where ant
Try these tips and let us know if you run into more trouble.
Brice
Cheers Brice for the uber quick response. I dunno how I missed them.
I've added them to my path. they seems fine now.
However now when I do the package generation I get the following error
Any idea what can be those ios resources that I missing?Code:ruby 1.9.3p362 (2012-12-25) [i386-mingw32]
C:\Users\dc>cd C:\inetpub\wwwroot\NoteApp
C:\inetpub\wwwroot\NoteApp>sencha app build package
Sencha Cmd v3.0.0.250
[INF] init-properties:
[INF] init-sencha-command:
[INF] init:
[INF] -before-app-build:
[INF] app-build-impl:
[INF] package:
[INF] -before-init-local:
[INF] -init-local:
[INF] -after-init-local:
[INF] init-local:
[INF] find-cmd:
[INF] -before-init:
[INF] -init:
[INF] -after-init:
[INF] init:
[INF] -before-build:
[INF] sass:
[INF] -before-sass:
[INF] -sass:
[INF] [shellscript]
[INF] [shellscript] C:\inetpub\wwwroot\NoteApp\resources\sass>compass
compile --boring --force
[INF] [shellscript] identical ../css/app.css
[INF] -after-sass:
[INF] page:
[INF] -before-page:
[INF] -page:
[INF] building application
[INF] Deploying your application to C:\inetpub\wwwroot\NoteApp\build\N
oteApp\package
[INF] Copied app.js
[INF] Copied resources/css/app.css
[INF] Copied C:\inetpub\wwwroot\NoteApp\resources\images
[INF] Copied C:\inetpub\wwwroot\NoteApp\resources\icons
[INF] Copied C:\inetpub\wwwroot\NoteApp\resources\startup
[INF] Resolving your application dependencies (file:///C:/inetpub/wwwr
oot/NoteApp/index.html)
[INF] Compiling app.js and dependencies
[INF] Processing classPath entry : C:\inetpub\wwwroot\NoteApp\sencha-c
ompile-temp-dir
[INF] Processing classPath entry : C:\inetpub\wwwroot\NoteApp\touch\sr
c
[INF] Processing classPath entry : C:\inetpub\wwwroot\NoteApp\app.js
[INF] Processing classPath entry : C:\inetpub\wwwroot\NoteApp\app
[INF] Processing class inheritance graph
[INF] Processing instantiation refereces to classes and aliases
[INF] Processing source dependencies
[INF] Concatenating output to file C:\inetpub\wwwroot\NoteApp\build\No
teApp\package\app.js
[INF] Completed compilation.
[INF] Processed remote file touch/sencha-touch.js
[INF] Processed local file app.js
[INF] Minified app.js
[INF] Minified resources/css/app.css
[INF] Generated app.json
[INF] Embedded microloader into index.html
[INF] Successfully deployed your application to C:\inetpub\wwwroot\Not
eApp\build\NoteApp\package
[INF] -after-page:
[INF] run:
[INF] -build:
[INF] -check-os:
[INF] -make-unix-property-paths:
[INF] -make-windows-property-paths:
[INF] -init-properties:
[INF] -is-android-built:
[INF] -set-windows-create-script:
[INF] -set-unix-create-script:
[INF] -is-android-init-ready:
[INF] [echo] checking android initialization using the following
resources:
[INF] [echo] cordova library \Users\dc\Documents\_SRC\_
sencha\phonegap-2.3.0
[INF] [echo] android tools \Users\dc\Documents\_SRC\_se
ncha\phonegap-2.3.0\lib\android\bin
[INF] [echo] android create script \Users\dc\Documents\
_SRC\_sencha\phonegap-2.3.0\lib\android\bin\\create.bat
[INF] [echo] android project C:\inetpub\wwwroot\NoteApp\build\Not
eApp\android
[INF] [echo] android project built state...true
[INF] -before-init-android-internal:
[INF] -init-android-internal:
[INF] -after-init-android-internal:
[INF] -init-android:
[INF] -before-build-android-internal:
[INF] -build-android-internal:
[INF] -after-build-android-internal:
[INF] -is-android-deploy-ready:
[INF] -deploy-android:
[INF] -build-android:
[INF] -build-cordova-all:
[INF] -check-os:
[INF] -make-unix-property-paths:
[INF] -make-windows-property-paths:
[INF] -init-properties:
[INF] -is-ios-built:
[INF] -set-windows-create-script:
[INF] -set-unix-create-script:
[INF] -is-ios-init-ready:
[INF] [echo] checking ios initialization using the following reso
urces:
[INF] [echo] cordova library \Users\dc\Documents\_SRC\_
sencha\phonegap-2.3.0
[INF] [echo] ios tools \Users\dc\Documents\_SRC\_sencha
\phonegap-2.3.0\lib\ios\bin
[INF] [echo] ios create script \Users\dc\Documents\_SRC
\_sencha\phonegap-2.3.0\lib\ios\bin\\create.bat
[INF] [echo] ios project C:\inetpub\wwwroot\NoteApp\build\NoteApp
\ios
[INF] [echo] ios project built state...false
[ERR] BUILD FAILED
[ERR] com.sencha.exceptions.BasicException: The following error occurr
ed while executing this line:
[ERR] C:\Users\dc\Documents\_SRC\_sencha\bricemason-sencha-c
ordova-builder-75c7c5b\check-cordova.xml:122: one or more of the resources requi
red to initialize the ios project cannot be resolved
[ERR] at com.sencha.exceptions.BasicException.wrap(BasicExcept
ion.java:43)
[ERR] at com.sencha.cli.Command.dispatch(Command.java:104)
[ERR] at com.sencha.cli.Commands.dispatch(Commands.java:49)
[ERR] at com.sencha.cli.AbstractCommand.dispatch(AbstractComma
nd.java:182)
[ERR] at com.sencha.ant.SenchaCommandTask.doExecute(SenchaComm
andTask.java:58)
[ERR] at com.sencha.ant.BaseAntTask.execute(BaseAntTask.java:2
2)
[ERR] at org.apache.tools.ant.UnknownElement.execute(UnknownEl
ement.java:291)
[ERR] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native M
ethod)
[ERR] at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown S
ource)
[ERR] at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unkno
wn Source)
[ERR] at java.lang.reflect.Method.invoke(Unknown Source)
[ERR] at org.apache.tools.ant.dispatch.DispatchUtils.execute(D
ispatchUtils.java:106)
[ERR] at org.apache.tools.ant.Task.perform(Task.java:348)
[ERR] at org.apache.tools.ant.Target.execute(Target.java:392)
[ERR] at org.apache.tools.ant.Target.performTasks(Target.java:
413)
[ERR] at org.apache.tools.ant.Project.executeSortedTargets(Pro
ject.java:1399)
[ERR] at org.apache.tools.ant.Project.executeTarget(Project.ja
va:1368)
[ERR] at org.apache.tools.ant.helper.DefaultExecutor.executeTa
rgets(DefaultExecutor.java:41)
[ERR] at org.apache.tools.ant.Project.executeTargets(Project.j
ava:1251)
[ERR] at com.sencha.ant.AntRunner.run(AntRunner.java:156)
[ERR] at com.sencha.ant.AntRunner.run(AntRunner.java:72)
[ERR] at com.sencha.command.BasePluginCommands$BasePluginComma
nd.run(BasePluginCommands.java:87)
[ERR] at com.sencha.command.BasePluginCommands$BasePluginComma
nd.run(BasePluginCommands.java:91)
[ERR] at com.sencha.command.BasePluginCommands$BaseNamePathCom
mand.run(BasePluginCommands.java:135)
[ERR] at com.sencha.command.app.AppCommands$BuildCommand.execu
te(AppCommands.java:106)
[ERR] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native M
ethod)
[ERR] at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown S
ource)
[ERR] at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unkno
wn Source)
[ERR] at java.lang.reflect.Method.invoke(Unknown Source)
[ERR] at com.sencha.cli.Command.dispatch(Command.java:78)
[ERR] at com.sencha.cli.Commands.dispatch(Commands.java:49)
[ERR] at com.sencha.cli.Commands.dispatch(Commands.java:49)
[ERR] at com.sencha.command.Sencha.main(Sencha.java:71)
[ERR] Caused by: C:\Users\dc\Documents\_SRC\_sencha\bricemas
on-sencha-cordova-builder-75c7c5b\build-cordova.xml:36: The following error occu
rred while executing this line:
[ERR] C:\Users\dc\Documents\_SRC\_sencha\bricemason-sencha-c
ordova-builder-75c7c5b\check-cordova.xml:122: one or more of the resources requi
red to initialize the ios project cannot be resolved
[ERR] at org.apache.tools.ant.ProjectHelper.addLocationToBuild
Exception(ProjectHelper.java:551)
[ERR] at org.apache.tools.ant.taskdefs.Ant.execute(Ant.java:44
4)
[ERR] at org.apache.tools.ant.taskdefs.CallTarget.execute(Call
Target.java:105)
[ERR] at org.apache.tools.ant.UnknownElement.execute(UnknownEl
ement.java:291)
[ERR] at sun.reflect.GeneratedMethodAccessor8.invoke(Unknown S
ource)
[ERR] at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unkno
wn Source)
[ERR] at java.lang.reflect.Method.invoke(Unknown Source)
[ERR] at org.apache.tools.ant.dispatch.DispatchUtils.execute(D
ispatchUtils.java:106)
[ERR] at org.apache.tools.ant.Task.perform(Task.java:348)
[ERR] at org.apache.tools.ant.Target.execute(Target.java:392)
[ERR] at org.apache.tools.ant.Target.performTasks(Target.java:
413)
[ERR] at org.apache.tools.ant.Project.executeSortedTargets(Pro
ject.java:1399)
[ERR] at org.apache.tools.ant.Project.executeTarget(Project.ja
va:1368)
[ERR] at org.apache.tools.ant.helper.DefaultExecutor.executeTa
rgets(DefaultExecutor.java:41)
[ERR] at org.apache.tools.ant.Project.executeTargets(Project.j
ava:1251)
[ERR] at com.sencha.ant.AntRunner.run(AntRunner.java:156)
[ERR] at com.sencha.ant.AntRunner.run(AntRunner.java:80)
[ERR] at com.sencha.command.ant.AntCommand.execute(AntCommand.
java:75)
[ERR] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native M
ethod)
[ERR] at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown S
ource)
[ERR] at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unkno
wn Source)
[ERR] at java.lang.reflect.Method.invoke(Unknown Source)
[ERR] at com.sencha.cli.Command.dispatch(Command.java:78)
[ERR] ... 31 more
[ERR] Caused by: C:\Users\dc\Documents\_SRC\_sencha\bricemas
on-sencha-cordova-builder-75c7c5b\check-cordova.xml:122: one or more of the reso
urces required to initialize the ios project cannot be resolved
[ERR] at org.apache.tools.ant.taskdefs.Exit.execute(Exit.java:
164)
[ERR] at org.apache.tools.ant.UnknownElement.execute(UnknownEl
ement.java:291)
[ERR] at sun.reflect.GeneratedMethodAccessor8.invoke(Unknown S
ource)
[ERR] at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unkno
wn Source)
[ERR] at java.lang.reflect.Method.invoke(Unknown Source)
[ERR] at org.apache.tools.ant.dispatch.DispatchUtils.execute(D
ispatchUtils.java:106)
[ERR] at org.apache.tools.ant.Task.perform(Task.java:348)
[ERR] at org.apache.tools.ant.Target.execute(Target.java:392)
[ERR] at org.apache.tools.ant.Target.performTasks(Target.java:
413)
[ERR] at org.apache.tools.ant.Project.executeSortedTargets(Pro
ject.java:1399)
[ERR] at org.apache.tools.ant.helper.SingleCheckExecutor.execu
teTargets(SingleCheckExecutor.java:38)
[ERR] at org.apache.tools.ant.Project.executeTargets(Project.j
ava:1251)
[ERR] at org.apache.tools.ant.taskdefs.Ant.execute(Ant.java:44
2)
[ERR] ... 52 more
[ERR] Total time: 16 seconds
[ERR] com.sencha.exceptions.BasicException: The following error occurr
ed while executing this line:
C:\Users\dc\Documents\_SRC\_sencha\bricemason-sencha-cordova-builder-7
5c7c5b\check-cordova.xml:122: one or more of the resources required to initializ
e the ios project cannot be resolved
C:\inetpub\wwwroot\NoteApp>
Can it be coursed cos I am on Win?
Thanks for everything once again
Karen,
You're right about iOS on Windows. That's not going to happen, however it should have at least created the project using the PhoneGap create scripts. If you just want to build for android, I'd recommend just implementing the -build-android target instead of -build-cordova-all.
Your earlier post showed the proper paths like
however your most recent log snippet includes paths such as:Code:[INF] [echo] project path: C:\inetpub\wwwroot\NoteApp\build\NoteApp\android
This current attempt failed because of these paths. You'll notice that the same type of paths were also in your android build but since that project was already created and initialized if wouldn't matter.Code:[INF] [echo] cordova library \Users\dc\Documents\_SRC\_sencha\phonegap-2.3.0
[INF] [echo] ios tools \Users\dc\Documents\_SRC\_sencha\phonegap-2.3.0\lib\ios\bin
[INF] [echo] ios create script \Users\dc\Documents\_SRC\_sencha\phonegap-2.3.0\lib\ios\bin\\create.bat
Would you please post your complete cordova.properties file? I want to check it out to see if I have a bug in the builder.
If you're willing/able to, I would also recommend that you delete the build and start again by:Since you're on Windows, you will need to delete those _<platform>.built and _<platform>.deploy files before each build. I'm working on better scripts for Windows folks so you won't have to do that anymore.
- Delete all _<platform>.built and _<platform>.deploy files in the root of your Sencha app
- Delete all cordova-android.js and cordova-ios.js files in the root of your Sencha app
- Delete all directories under the build directory of your Sencha app
- Change your build.xml to only build for android using -build-android
Let me know if you run into any more issues. Your feedback helps out a lot.
Brice
Hi,
Could you please help me understand why I would wrap my Sencha Touch developed application with PhoneGap versus through the Sencha SDK?
Ive been trying to find a reason or pros or advantages of doing this? I would highly appreciate your response.
Thanks,
S
Hi S,
Just off the top of my head I would offer the following advantages to using PhoneGap over the Sencha native APIs:Brice
- PhoneGap has broader support for different platforms (android, ios, blackberry, symbian, webOS, windows phone 7, windows phone 8, windows 8, bada, tizen)
- PhoneGap has broader support for native APIs. The Sencha native APIs only account for a handful
- PhoneGap has a rich plugin framework which you can both leverage what's already been written or create your own
That's good to know. As a future state we intend on accessing native SQLite storage and I believe the SQLite Plugins for PhoneGap will come to use.
I've heard that wrapping a Sencha Touch application in PhoneGap adds unnecessary baggage making the application bloated. Is there any truth to that? or if it is true, to what extent? Making the application unusable?
Hi Brice,
It's a Success! I've deleted all those files you have mentioned and changed to -build-android istead of -build-all. Now If I run the packaging it all goes through fine. Cheers for all your help. I guess I will need to use my Mac for iOS builds. Also will it be any options with Cordova in the close future to deploy to Windows 8 and BB10 by any chance?
Once again, thanks for you prompt assistance and your great screencast. keep up the good work!:)
Hi Brice,
I am following your screencast and downloaded the code from Github. I am working on Mac Mountain Lion, with Sencha 2.1 and Phonegap 2.3. Android SDK (latest version not sure what version)
Screencast is very straight forward and clear. However, in your readme file you say to run sencha install command. This is not done in the screen cast.
When I run the sencha app build package command - I only get the package no ios or android in the build directory. There are no errors.
I am thinking I am missing something in the install - however, I pretty sure I followed everything from the screencast - exactly!
Thanks in advance in any help you can provide
Regards
JRS
UPDATE: Brice - I ran ./sencha install and then tried to build just for ios and that worked.
I will try to build for android only and see how that turns out.
Android alone also worked - problem appears to be when trying to build both using build-cordova-all.