1. #51
    Sencha User
    Join Date
    Feb 2013
    Posts
    9
    Vote Rating
    0
    ashishpok is on a distinguished road

      0  

    Default


    Brice, excellent tool... just what I was looking for !!!!

    I am set building package in Windows environment for android, one thing I am missing is build.xml file within the build folder. It looks like ant is not able to find the file and my debug / emulate step doesn't work.

    Would can you give any pointers on why build.xml file might be missing in build\<my-app>\android folder?

    Thanks,

    - A

  2. #52
    Sencha User
    Join Date
    Feb 2013
    Posts
    9
    Vote Rating
    0
    ashishpok is on a distinguished road

      0  

    Default


    Brice has already answered this if you scroll to the page 2 (i believe)...

    You are probably using newer version of PhoneGap / Cordova (2.3+)..

  3. #53
    Sencha User
    Join Date
    Jan 2012
    Posts
    15
    Vote Rating
    0
    bcichowlas is on a distinguished road

      0  

    Default


    Just to clarify, can you use Adobe Phonegap Build with Sencha Architect 2.0? Is there a particular build of Cordova or PhoneGap you would use?

  4. #54
    Sencha User
    Join Date
    Dec 2012
    Posts
    27
    Vote Rating
    0
    webdev13 is on a distinguished road

      0  

    Default


    thanks

    but also when i add the following script

    Code:
    {
                    title: 'Welcome',
                    iconCls: 'home',
    
                    styleHtmlContent: true,
                    tpl:[
                        'device: {name}</br>',
                        'phonegap version {cordova}'
                    ].join(''),
                    
                    listeners :{                    
                        initialize : function(){
                            
                            this.setData(device);
                            
                        }
                    
                    }
                }
    i see the following error
    Uncaught ReferenceError: device is not defined

    and its not working on virtual device
    , any idea please ?

    best regards


  5. #55
    Sencha User
    Join Date
    Dec 2012
    Posts
    27
    Vote Rating
    0
    webdev13 is on a distinguished road

      0  

    Default


    i have generated .apk files located in bin folder , but debug still not working , here is my build.xml file

    HTML Code:
     <import file="${basedir}/.sencha/app/build-impl.xml"/>
        <import file="/sencha-cordova-builder-master/build-cordova.xml" />
        <target name="-after-build" depends="-build-android" />
        
        <target name="-after-build-android">
        
        <exec executable="ant">
            <arg value="-buildfile" />
            <arg value="${cordova.android.project}/build.xml" />
            <arg value="debug" />
        </exec>
    
        <exec executable="adb">
            <arg value="install" />
            <arg value="-r" />
            <arg value="${cordova.android.project}/bin/${app.name}-debug.apk" />
        </exec>
        </target>

    and i get the following error

    HTML Code:
    [ERR]           BUILD FAILED
    [ERR]           com.sencha.exceptions.BasicException: The following error occurr
    ed while executing this line:
    [ERR]           C:\wamp\www\myApp1\build.xml:9: Execute failed: java.io.IOExcept
    ion: Cannot run program "ant": CreateProcess error=2, The system cannot find the
     file specified
    [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:\sencha-cordova-builder-master\build-cordova-androi
    d.xml:40: The following error occurred while executing this line:
    [ERR]           C:\wamp\www\myApp1\build.xml:9: Execute failed: java.io.IOExcept
    ion: Cannot run program "ant": CreateProcess error=2, The system cannot find the
     file specified
    [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:\wamp\www\myApp1\build.xml:9: Execute failed: java.
    io.IOException: Cannot run program "ant": CreateProcess error=2, The system cann
    ot find the file specified
    [ERR]                   at org.apache.tools.ant.taskdefs.ExecTask.runExec(ExecTa
    sk.java:675)
    [ERR]                   at org.apache.tools.ant.taskdefs.ExecTask.execute(ExecTa
    sk.java:498)
    [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]           Caused by: java.io.IOException: Cannot run program "ant": Create
    Process error=2, The system cannot find the file specified
    [ERR]                   at java.lang.ProcessBuilder.start(Unknown Source)
    [ERR]                   at java.lang.Runtime.exec(Unknown Source)
    [ERR]                   at org.apache.tools.ant.taskdefs.Execute$Java13CommandLa
    uncher.exec(Execute.java:862)
    [ERR]                   at org.apache.tools.ant.taskdefs.Execute.launch(Execute.
    java:481)
    [ERR]                   at org.apache.tools.ant.taskdefs.Execute.execute(Execute
    .java:495)
    [ERR]                   at org.apache.tools.ant.taskdefs.ExecTask.runExecute(Exe
    cTask.java:631)
    [ERR]                   at org.apache.tools.ant.taskdefs.ExecTask.runExec(ExecTa
    sk.java:672)
    [ERR]                   ... 65 more
    [ERR]           Caused by: java.io.IOException: CreateProcess error=2, The syste
    m cannot find the file specified
    [ERR]                   at java.lang.ProcessImpl.create(Native Method)
    [ERR]                   at java.lang.ProcessImpl.<init>(Unknown Source)
    [ERR]                   at java.lang.ProcessImpl.start(Unknown Source)
    [ERR]                   ... 72 more
    [ERR]           Total time: 56 seconds
    [ERR]           com.sencha.exceptions.BasicException: The following error occurr
    ed while executing this line:
    C:\wamp\www\myApp1\build.xml:9: Execute failed: java.io.IOException: Cannot run
    program "ant": CreateProcess error=2, The system cannot find the file specified


    best regards

  6. #56
    Sencha User
    Join Date
    Feb 2013
    Posts
    9
    Vote Rating
    0
    ashishpok is on a distinguished road

      0  

    Default Resolved Build Issue in Windows

    Resolved Build Issue in Windows


    Quote Originally Posted by ashishpok View Post
    Brice, excellent tool... just what I was looking for !!!!

    I am set building package in Windows environment for android, one thing I am missing is build.xml file within the build folder. It looks like ant is not able to find the file and my debug / emulate step doesn't work.

    Would can you give any pointers on why build.xml file might be missing in build\<my-app>\android folder?

    Thanks,

    - A
    Fixed the issue. I just had to follow the steps provided here to ensure cordova / phonegap was building properly.
    http://simonmacdonald.blogspot.ca/20...o-work-on.html

  7. #57
    Sencha User
    Join Date
    Dec 2012
    Posts
    27
    Vote Rating
    0
    webdev13 is on a distinguished road

      0  

    Default


    Quote Originally Posted by webdev13 View Post
    thanks

    but also when i add the following script

    Code:
    {
                    title: 'Welcome',
                    iconCls: 'home',
    
                    styleHtmlContent: true,
                    tpl:[
                        'device: {name}</br>',
                        'phonegap version {cordova}'
                    ].join(''),
                    
                    listeners :{                    
                        initialize : function(){
                            
                            this.setData(device);
                            
                        }
                    
                    }
                }
    i see the following error
    Uncaught ReferenceError: device is not defined

    and its not working on virtual device
    , any idea please ?

    best regards

    i still cant not fix this problem , would u help me please

  8. #58
    Sencha User
    Join Date
    Feb 2013
    Posts
    9
    Vote Rating
    0
    ashishpok is on a distinguished road

      0  

    Default


    Quote Originally Posted by bcichowlas View Post
    Just to clarify, can you use Adobe Phonegap Build with Sencha Architect 2.0? Is there a particular build of Cordova or PhoneGap you would use?
    I am using PhoneGap 2.4 with ST2.1 and Sencha Cmd 3.0. This is working fine in Windows environment for me. I have not used Architect though.

    The only difference from Brice's video is to use run.bat instead of debug for launching Android Emulator after build is done.

  9. #59
    Sencha User
    Join Date
    Feb 2013
    Posts
    9
    Vote Rating
    0
    ashishpok is on a distinguished road

      0  

    Default


    @webdev13, sorry I am not sure what could possibly be wrong. I am pretty new to using ST2 and PhoneGap.

    I had some weird issues running the app initially. What helped me was

    1. making sure _android.built file is deleted before running the app build.
    2. delete build/<app>/android folder and let the build create it from scratch.

    If I do both my issues get resolved. That's all I can say... not sure why I would have to delete android build at this point.

  10. #60
    bricemason's Avatar
    Join Date
    Jan 2008
    Location
    Upstate NY
    Posts
    280
    Vote Rating
    44
    bricemason has a spectacular aura about bricemason has a spectacular aura about bricemason has a spectacular aura about

      0  

    Default


    @webdev13, this snippet from your build output tells the story:


    [ERR] BUILD FAILED[ERR] com.sencha.exceptions.BasicException: The following error occurred while executing this line:[ERR] C:\wamp\www\myApp1\build.xml:9: Execute failed: java.io.IOException: Cannot run program "ant": CreateProcess error=2, The system cannot find the file specified
    you need to install ant from here: http://ant.apache.org/

    Once you do that, try to build again. If you're on windows, make sure you delete the _android.built file before rebuilding.

    Let us know if you still need help.

    Brice
    Brice 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.