1. #1
    Sencha User
    Join Date
    Apr 2012
    Posts
    11
    Answers
    1
    Vote Rating
    0
    AzurGroup is on a distinguished road

      0  

    Default Answered: Sencha and Eclipse Android Emulator Error

    Answered: Sencha and Eclipse Android Emulator Error


    Hi,

    I'm new to sencha touch. I have read the tutorial for getting started with sencha touch and eclipse, i have downloaded all the plugins and i have everything up and running. When i create a test application through command line using the sencha generate app command, i then copy the contents of the directory, minus the whole sdk, to the eclipse android assets > www folder. I regulate all the dependencies and run the application. When the emulator and application are up and running, i get the two following errors:

    Uncaught SyntaxError: Unexpected token ) at file:///android_asset/www/index.html:1
    call to OpenGL ES API with no current context (logged once per thread)


    My index.html file looks like this:

    HTML Code:
    <!DOCTYPE HTML>
    <html manifest="" lang="en-US">
    <head>
        <meta charset="UTF-8">
        <title>testApp</title>
        <style type="text/css">
            /**
             * Example of an initial loading indicator.
             * It is recommended to keep this as minimal as possible to provide instant feedback
             * while other resources are still being loaded for the first time
             */
            html, body {
                height: 100%;
            }
    
            #appLoadingIndicator {
                position: absolute;
                top: 50%;
                left: 50%;
                margin-top: -10px;
                margin-left: -50px;
                width: 100px;
                height: 20px;
            }
    
            #appLoadingIndicator > * {
                background-color: #FFFFFF;
                float: left;
                height: 20px;
                margin-left: 11px;
                width: 20px;
                -webkit-animation-name: appLoadingIndicator;
                -webkit-border-radius: 13px;
                -webkit-animation-duration: 0.8s;
                -webkit-animation-iteration-count: infinite;
                -webkit-animation-direction: linear;
                opacity: 0.3
            }
    
            #appLoadingIndicator > :nth-child(1) {
                -webkit-animation-delay: 0.18s;
            }
    
            #appLoadingIndicator > :nth-child(2) {
                -webkit-animation-delay: 0.42s;
            }
    
            #appLoadingIndicator > :nth-child(3) {
                -webkit-animation-delay: 0.54s;
            }
    
            @-webkit-keyframes appLoadingIndicator{
                0% {
                    opacity: 0.3
                }
    
                50% {
                    opacity: 1;
                    background-color:#1985D0
                }
    
                100% {
                    opacity:0.3
                }
            }
        </style>
        <script id="microloader" type="text/javascript" src="sdk/microloader/development.js"></script>
    </head>
    <body>
        <div id="appLoadingIndicator">
            <div></div>
            <div></div>
            <div></div>
        </div>
    </body>
    </html>
    I'm not sure where the first error is coming from, there is no ')' character at line 1

    i have googled the second error and some of the suggestions have been to update the AndroidManifest.xml file to include

    PHP Code:
    <application
    ...
    ...
         
    android:hardwareAccelerated="true"

    but that did not fix the problem.

    I am running Eclipse Helios with the latest version of the Android SDK and Tools, I am also running Sencha Touch 2.0 on Android Emulator 4.0.3 and my project file structure is the following:

    file.jpg


    My understanding of the integration process is that we can take the app folder of the sencha project, load it into the eclipse workspace and it should work but this is not the case. Did i miss something?

    Note: i am not including the entire sdk in my project

    Any insight on the problem would be great!


  2. #2
    Sencha - Senior Forum Manager mitchellsimoens's Avatar
    Join Date
    Mar 2007
    Location
    Gainesville, FL
    Posts
    37,330
    Answers
    3541
    Vote Rating
    847
    mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute

      0  

    Default


    When you run it on the emulator, do you do a build first?
    Mitchell Simoens @SenchaMitch
    Sencha Inc, Senior Forum Manager
    ________________
    Check out my GitHub, lots of nice things for Ext JS 4 and Sencha Touch 2
    https://github.com/mitchellsimoens

    Think my support is good? Get more personalized support via a support subscription. https://www.sencha.com/store/

    Need more help with your app? Hire Sencha Services services@sencha.com

    Want to learn Sencha Touch 2? Check out Sencha Touch in Action that is in print!

    When posting code, please use BBCode's CODE tags.

  3. #3
    Sencha User
    Join Date
    Apr 2012
    Posts
    11
    Answers
    1
    Vote Rating
    0
    AzurGroup is on a distinguished road

      0  

    Default


    yes i do, i have my build set to "build automatically". I periodically clean my project as well

  4. #4
    Sencha - Senior Forum Manager mitchellsimoens's Avatar
    Join Date
    Mar 2007
    Location
    Gainesville, FL
    Posts
    37,330
    Answers
    3541
    Vote Rating
    847
    mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute

      0  

    Default


    Not the build within eclipse. The sencha command build.
    Mitchell Simoens @SenchaMitch
    Sencha Inc, Senior Forum Manager
    ________________
    Check out my GitHub, lots of nice things for Ext JS 4 and Sencha Touch 2
    https://github.com/mitchellsimoens

    Think my support is good? Get more personalized support via a support subscription. https://www.sencha.com/store/

    Need more help with your app? Hire Sencha Services services@sencha.com

    Want to learn Sencha Touch 2? Check out Sencha Touch in Action that is in print!

    When posting code, please use BBCode's CODE tags.

  5. #5
    Sencha User
    Join Date
    Apr 2012
    Posts
    11
    Answers
    1
    Vote Rating
    0
    AzurGroup is on a distinguished road

      0  

    Default


    no i have not done that. Can you please provide the url which explains how to do build the application? As previously mentioned, i am a complete beginner with sencha.

    thank you

  6. #6
    Sencha - Senior Forum Manager mitchellsimoens's Avatar
    Join Date
    Mar 2007
    Location
    Gainesville, FL
    Posts
    37,330
    Answers
    3541
    Vote Rating
    847
    mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute

      0  
    Mitchell Simoens @SenchaMitch
    Sencha Inc, Senior Forum Manager
    ________________
    Check out my GitHub, lots of nice things for Ext JS 4 and Sencha Touch 2
    https://github.com/mitchellsimoens

    Think my support is good? Get more personalized support via a support subscription. https://www.sencha.com/store/

    Need more help with your app? Hire Sencha Services services@sencha.com

    Want to learn Sencha Touch 2? Check out Sencha Touch in Action that is in print!

    When posting code, please use BBCode's CODE tags.

  7. #7
    Sencha User
    Join Date
    Apr 2012
    Posts
    11
    Answers
    1
    Vote Rating
    0
    AzurGroup is on a distinguished road

      0  

    Default


    Thank you for the link. After i build my application, will i be able to deploy it in the android emulator through the eclipse ide?

  8. #8
    Sencha User
    Join Date
    Apr 2012
    Posts
    11
    Answers
    1
    Vote Rating
    0
    AzurGroup is on a distinguished road

      0  

    Default


    thank you mitchellsimoens, after using the sencha build command, i copied recompiled the files to the www directory in my Eclipse Android project and it worked like a charm!

    Thank you for that!

  9. #9
    Sencha User
    Join Date
    Mar 2012
    Location
    Chennai
    Posts
    17
    Vote Rating
    0
    sivagami is on a distinguished road

      0  

    Default


    Hai,
    I am not able to follow the link that you have provided.Can you please ellobarate it.

    Please help me as early as possible.

    Thanks

  10. #10
    Sencha User
    Join Date
    Mar 2012
    Posts
    8
    Vote Rating
    0
    nigel86 is on a distinguished road

      0  

    Default To sivagami ,

    To sivagami ,


    beware of the import location of the js files,