-
24 Feb 2013 6:42 PM #71
@webdev13, try to modify this part of your build.xml:
to this:Code:<exec executable="ant"> <arg value="-buildfile" /> <arg value="${cordova.android.project}/build.xml" /> <arg value="debug" /> </exec>
I was running into the same issue as you but when I ran this using the ant batch script, it worked. Give that a go,Code:<exec executable="ant.bat"> <arg value="-buildfile" /> <arg value="${cordova.android.project}/build.xml" /> <arg value="debug" /> </exec>
BriceBrice Mason
Front End Developer
Modus Create
@bricemason
bricemason.com
Sencha Touch Screencasts
Vimeo - Sencha Touch Channel
Github Projects:
Sencha Cordova Builder enables the automatic creation, building, and running of PhoneGap (Cordova) projects with Sencha Touch.
Am I Sencha Touch Ready? checks your system to determine what you need to do to start Sencha Touch development. If you're having trouble getting up and running, try this out.
Sencha Tools Bridge allows Sencha SDK Tools to co-exist with Sencha Cmd on the same system.
-
25 Feb 2013 12:07 AM #72
@ bricemason
thankssssssssssssssssssss , its working !!!
phonegap is working , really thank you so much
-
25 Feb 2013 7:15 PM #73
@giorgio, your 'test6' handler looks correct. I created a project using the sencha touch default generated app and added the following button config to the main view:
Just to confirm, are you able to load your app in the android emulator? Is the only error you experience when you attempt to click one of those buttons?Code:{ xtype: 'button', text: 'Load URL', handler: function() { navigator.app.loadUrl('http://www.google.com'); } }
You said your app shows the correct version of phonegap. How is that happening? Are you displaying the phonegap version using the phonegap api device class?
If you have any questions regarding how to use the loadUrl method, you'll have to look at the source code of the android version of the cordova library. If your project generated correctly, open up the file cordova-android.js in the root of your sencha touch project. The loadUrl method has pretty good comments which currently is the only sort of documentation on this.
If you're still having trouble, please post the complete view where that segmentedbutton lives.
BriceBrice Mason
Front End Developer
Modus Create
@bricemason
bricemason.com
Sencha Touch Screencasts
Vimeo - Sencha Touch Channel
Github Projects:
Sencha Cordova Builder enables the automatic creation, building, and running of PhoneGap (Cordova) projects with Sencha Touch.
Am I Sencha Touch Ready? checks your system to determine what you need to do to start Sencha Touch development. If you're having trouble getting up and running, try this out.
Sencha Tools Bridge allows Sencha SDK Tools to co-exist with Sencha Cmd on the same system.
-
25 Feb 2013 7:35 PM #74
@rob.n, when you modify the namespace in your cordova.properties file to something like this:
it doesn't create the xcode project naming convention you posted. It will still be the name of your sencha app. Are you referring to the cordova.ios.project.name property instead?Code:cordova.ios.project.namespace=monitoring.Environment.${cordova.ios.project.name}
Also if I'm understanding your question correctly, are you asking if you can specify these properties that are normally used in the properties file at build time?
BriceBrice Mason
Front End Developer
Modus Create
@bricemason
bricemason.com
Sencha Touch Screencasts
Vimeo - Sencha Touch Channel
Github Projects:
Sencha Cordova Builder enables the automatic creation, building, and running of PhoneGap (Cordova) projects with Sencha Touch.
Am I Sencha Touch Ready? checks your system to determine what you need to do to start Sencha Touch development. If you're having trouble getting up and running, try this out.
Sencha Tools Bridge allows Sencha SDK Tools to co-exist with Sencha Cmd on the same system.
-
27 Feb 2013 2:09 AM #75
Hi and thanks for your reply!
Its correct, this only creates my base namespace (com.foo.internal), its when i want to create my app specific namespace that i change ".sencha/app/sencha.cfg" "app.name=monitoring.Environment".
This create my app specific namespace "com.foo.internal.monitoring.Environment".
I could use multiple copies of sencha-cordova-builder with different namespaces and the "app.name" only contains the name (no prefix) but i want to avoid that.
I found some trouble using this approach when building for Android, does not like the "." in "app.name=monitoring.Environment" so perhaps i need to make multiple copies of sencha-cordova-builder and config "cordova.properties" such as "cordova.ios.project.namespace=com.foo.internal.monitoring" and leave "app.name" to "Environment" (my app name) in ".sencha/app/sencha.cfg".
Would be nice though to be able to specify a namespace as an argument in the app "build.xml".
//Robert
-
27 Feb 2013 2:05 PM #76
Robert,
I struggled with this when I first created the project. I went back and forth on whether to build in support for specifying a different property file as an argument to the android and ios build routines. Obviously I decided not to in the interest of getting something up and running that was effective and covered the best number of use cases.
I am closer to thinking about refactoring this to support it. One thing for example that I'd like to do is be able to build my app for different versions of phonegap.
Thanks for your feedback and I'm sorry the project in it's current state doesn't easily support your scenario. I will put this request in my queue and strongly consider it.
BriceBrice Mason
Front End Developer
Modus Create
@bricemason
bricemason.com
Sencha Touch Screencasts
Vimeo - Sencha Touch Channel
Github Projects:
Sencha Cordova Builder enables the automatic creation, building, and running of PhoneGap (Cordova) projects with Sencha Touch.
Am I Sencha Touch Ready? checks your system to determine what you need to do to start Sencha Touch development. If you're having trouble getting up and running, try this out.
Sencha Tools Bridge allows Sencha SDK Tools to co-exist with Sencha Cmd on the same system.
-
28 Feb 2013 4:07 AM #77
Whom the gods would destroy, they first introduce to Sencha Touch. At least that's what I thought until I discovered your utility, which looks like it could yet save what remains of my sanity. However (isn't there always a 'however'?) when I run your utility it informs me that:
They are in fact all on my system (windows 8 Pro 64 bit) and all referenced in the PATH variable. I have verified each with "where xxx" and get the following:Code:[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
java:
ant:Code:C:\Windows\System32\java.exe C:\Program Files\Java\jdk1.7.0_10\jre\bin\java.exe C:\Program Files\Java\jdk1.7.0_15\bin\java.exe
android:Code:C:\apache-ant-1.8.4\bin\ant C:\apache-ant-1.8.4\bin\ant.bat C:\apache-ant-1.8.4\bin\ant.cmd
I'm using phonegap-2.3.0 downloaded from http://phonegap.com/download/Code:c:\AndroidDevelopment\sdk\tools\android.bat
Sorry to bug you with this. But if you have any advice as to what I'm doing wrong, I'd be very grateful. Thanks.Last edited by munder; 28 Feb 2013 at 4:11 AM. Reason: forgot some info
-
28 Feb 2013 2:01 PM #78
@munder,
No apologies necessary, I'm glad you're trying out the tool and I'm happy to help. That error is coming from the create.bat script in the phonegap library. Here is the snippet of what it's testing for:
Assuming you have java.exe, javac.exe, ant.bat, and android.bat in your PATH, the only missing thing could be the JAVA_HOME environment variable. Could you check to verify that you have an environment variable named JAVA_HOME that is pointing to the root of your JDK installation?Code:@ECHO OFF IF NOT DEFINED JAVA_HOME GOTO MISSING FOR %%X in (java.exe javac.exe ant.bat android.bat) do ( SET FOUND=%%~$PATH:X IF NOT DEFINED FOUND GOTO MISSING ) cscript "%~dp0\create.js" %* GOTO END :MISSING ECHO Missing one of the following: ECHO JDK: http://java.oracle.com ECHO Android SDK: http://developer.android.com ECHO Apache ant: http://ant.apache.org EXIT /B 1 :END
BriceBrice Mason
Front End Developer
Modus Create
@bricemason
bricemason.com
Sencha Touch Screencasts
Vimeo - Sencha Touch Channel
Github Projects:
Sencha Cordova Builder enables the automatic creation, building, and running of PhoneGap (Cordova) projects with Sencha Touch.
Am I Sencha Touch Ready? checks your system to determine what you need to do to start Sencha Touch development. If you're having trouble getting up and running, try this out.
Sencha Tools Bridge allows Sencha SDK Tools to co-exist with Sencha Cmd on the same system.
-
28 Feb 2013 4:37 PM #79
Of course! I swear I just get dafter. Thank you so much, Brice.
-
1 Mar 2013 5:51 AM #80
Hi
[INF] [echo] android project D:\sencha\hello\build\hello\android
[INF] [echo] android project built state...false
[ERR] BUILD FAILED
[ERR] com.sencha.exceptions.BasicException: one or more of the resources required to initialize the android project cannot be resolved
What I am missing here..
I have Java, android and ant in my PATH.
I dont know 'D:\sencha\hello\build\hello\android' it is looking for. Is that folder I am missing?
-Ram


Reply With Quote