-
16 Dec 2011 11:44 AM #1
Sencha Touch 2 + PhoneGap are not working on Android 4
Sencha Touch 2 + PhoneGap are not working on Android 4
Hi,
my app is properly working on Android 2.3.x but not on Android 4. The problem is that every controller throws an
Unknown chromium error: -6
and I dont why this happens and how I can figure out what exactly it is.
Here you can see how Im starting my app and controllers:
I see the "mainLaunch" output but never see the "launch" output. If I delete the controllers the app launches properly (I see the "launch" output). However, I'm confused why this is working on every 2.x Android device but not on Android 4 (emulator as well as real device).Code:function mainLaunch(){ console.log("mainLaunch"); Ext.Loader.setConfig({ enabled: true }); Ext.application({ name: 'MyApp', appFolder: 'app', models: ['Customer'], controllers: ['MainController','ProfileController'] , launch: function() { console.log('launch:'); } }); }
-
16 Dec 2011 11:59 AM #2Sencha - Senior Forum Manager
- Join Date
- Mar 2007
- Location
- St. Louis, MO
- Posts
- 33,624
- Vote Rating
- 434
Are the files loading?
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.
-
16 Dec 2011 12:07 PM #3
Tell me how I can debug this?
You can easily reproduce this issue by using any sencha example (I have it tested with the kiva example) and phonegap 1.2
Create a new Android project and try to start the sencha example in any webview:
Code:import com.phonegap.DroidGap; import android.os.Bundle; public class EasyPaymentAppActivity extends DroidGap { /** Called when the activity is first created. */ @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); super.loadUrl("file:///android_asset/www/index.html"); } }
-
19 Dec 2011 4:45 AM #4
any ideas or hints? Is this a sencha touch or phonegap issue?
ok... The problem is that the controller files cannot be found but I dont know why, because on android 2.3 they will be found
log output:
Code:12-19 09:10:37.787: D/PhoneGapLog(1503): Uncaught Error: [Ext.Loader] Failed loading 'app/controller/MainController.js', please verify that the file exists 12-19 09:10:37.787: D/PhoneGapLog(1503): file:///android_asset/www/lib/js/sencha-touch-all-debug-w-comments.js: Line 7785 : Uncaught Error: [Ext.Loader] Failed loading 'app/controller/MainController.js', please verify that the file exists 12-19 09:10:37.787: E/Web Console(1503): Uncaught Error: [Ext.Loader] Failed loading 'app/controller/MainController.js', please verify that the file exists at file:///android_asset/www/lib/js/sencha-touch-all-debug-w-comments.js:7785
-
19 Dec 2011 10:40 AM #5
Sounds like a PhoneGap/Android issue. The files probably are not dynamically loading correctly (no permission, looking in the wrong place).
To rectify this, you could use our tools to build your application (which is what you should do in production anyway).
http://robertdougan.com/posts/packag...ncha-sdk-toolsSencha Inc.
Robert Dougan - @rdougan
Sencha Touch 2 and Ext JS 4 Core Team Member, SASS/Theming Wizard.
-
19 Dec 2011 10:48 AM #6
My application needs some device capabilities like nfc and camera, so i have to use phonegap :/
-
19 Dec 2011 10:50 AM #7
Yes, the above blog post explains how to package your application, as in, compress all the files into one. Not 'package' as in, natively.
Sencha Inc.
Robert Dougan - @rdougan
Sencha Touch 2 and Ext JS 4 Core Team Member, SASS/Theming Wizard.
-
19 Dec 2011 11:04 AM #8
I could only find the mac os version. Is there any windows or linux version available?
-
19 Dec 2011 11:05 AM #9
Sorry, there is only a OSX version at this time as it is a beta.
Sencha Inc.
Robert Dougan - @rdougan
Sencha Touch 2 and Ext JS 4 Core Team Member, SASS/Theming Wizard.
-
4 Jan 2012 11:32 AM #10
Hi,
the SDK tools are not working for me :/ I always only get an empty app.jsb3 file without any error messages
I'm trying to create the app.jsb3 file like this:
The result is an "empty" app.jsb3 file withCode:sencha create jsb -a http://192.168.137.1:800/index.html -p app.jsb3
My app uses some native functions by using phonegap and also a phonegap plugins. Maybe this is a problem? I dont get any error output but the app.jsb3 file looks wrong and also the build command only creates an empty .js fileCode:... files: all-classses.js app.js ...
happy new year!
greets,
testvogel
edit:
I'm initlizing the sencha app in a function which is called after the "deviceready" event of phonegap.
Success! Looks like we've fixed this one. According to our records the fix was applied for
TOUCH-1463
in
2.1.


Reply With Quote