-
28 Apr 2012 8:36 AM #1
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:
I'm not sure where the first error is coming from, there is no ')' character at line 1HTML 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 have googled the second error and some of the suggestions have been to update the AndroidManifest.xml file to include
but that did not fix the problem.PHP Code:<application
...
...
android:hardwareAccelerated="true"
>
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!
-
Best Answer Posted by mitchellsimoens
-
30 Apr 2012 6:13 AM #2Sencha - Senior Forum Manager
- Join Date
- Mar 2007
- Location
- St. Louis, MO
- Posts
- 33,656
- Vote Rating
- 435
- Answers
- 3108
When you run it on the emulator, do you do a build first?
Mitchell Simoens @SenchaMitch
Sencha Inc, Senior Forum Manager
________________
http://www.JSONPLint.com - Source to lint your JSONP!
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 almost in print!
When posting code, please use BBCode's CODE tags.
-
30 Apr 2012 6:16 AM #3
yes i do, i have my build set to "build automatically". I periodically clean my project as well
-
30 Apr 2012 6:18 AM #4Sencha - Senior Forum Manager
- Join Date
- Mar 2007
- Location
- St. Louis, MO
- Posts
- 33,656
- Vote Rating
- 435
- Answers
- 3108
Not the build within eclipse. The sencha command build.
Mitchell Simoens @SenchaMitch
Sencha Inc, Senior Forum Manager
________________
http://www.JSONPLint.com - Source to lint your JSONP!
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 almost in print!
When posting code, please use BBCode's CODE tags.
-
1 May 2012 5:24 AM #5
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
-
1 May 2012 5:31 AM #6Sencha - Senior Forum Manager
- Join Date
- Mar 2007
- Location
- St. Louis, MO
- Posts
- 33,656
- Vote Rating
- 435
- Answers
- 3108
Mitchell Simoens @SenchaMitch
Sencha Inc, Senior Forum Manager
________________
http://www.JSONPLint.com - Source to lint your JSONP!
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 almost in print!
When posting code, please use BBCode's CODE tags.
-
1 May 2012 5:34 AM #7
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?
-
2 May 2012 6:59 AM #8
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!
-
15 May 2012 4:55 AM #9
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
-
19 May 2012 6:09 AM #10
To sivagami ,
To sivagami ,
beware of the import location of the js files,


Reply With Quote