- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi!
We tried it on higher quality phones without any problem, but we need to build application to android 4.1.x. so it is very important to use debbuging.
Phones are:
Samsung Galaxy Note 3 (android version: 5.0)
Xiaomi redmi note 4g (android version: 4.4.2)
Lenovo P-70 (android version: 4.4.4)
When we tried to debug on Samsung GT-I9070 (android version: 4.1.2), we got this error: (Take a look at attached image.)
- Tags:
- HTML5
- Intel® XDK
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I'm trying to find out precisely what that error message means. In the meantime, try some of these to see if it helps:
- start App Preview on the device before you start the debug session
- try to "run" the app first, rather than starting with the "debug" action
- change the USB connection (if it is PTP/Camera, change it to MTP/Media, or vice versa), usually this can be done after you attach the device, there will be a notification icon that takes you to the settings
- try using a different version of Crosswalk (the debug session is tied to the project's Crosswalk version setting in the Build Settings on the Project tab) -- it is probably set to 11, I recommend you start with 14 and work your way down from there, for production builds I recommend using 14
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
The error message appears to be due to a network link timeout from the device (which is requesting source from the XDK to be downloaded into App Preview for run and debug). One thing that might help is to eliminate extra processes on the device and minimize any network activity on the device. Also, I have noticed that if an app is large or starts running immediately on load, it can interfere with the debug connection.
You can mitigate the second issue (starts running immediately) by setting up your app so it does not start to run immediately on load, but requires that you start it manually from the JavaScript console. For example, if you've got a function that you call after the deviceready event (or app.Ready or intel.xdk.device.ready) that starts your app, for debug you could comment out that initial call and call it manually from the JavaScript console once you start debug.
Here's one way you could do that, assume you start your app this way:
app.init = function() { app.start() ; } ; document.addEventListener("app.Ready", app.init, false) ;
NOTE: If you are not use the app.Ready event that is defined inside the xdk/init-dev.js file (which you'll only see if you created your project off the default blank Cordova project), you might be triggering off the Cordova deviceready event or the old Intel XDK intel.xdk.device.ready event. Change the "addEventListener" function accordingly to match the one you are triggering off of.
You could then do something like this to delay the start of your app when it is running in the debug module:
app.init = function() { if( window.location.href.match("file:///android_asset/www/") ) app.start() ; } ; document.addEventListener("app.Ready", app.init, false) ;
Which will detect when you are running on an Android device in a built app and only run the "app.start()" function automatically in that scenario. Of course, if you're going to have this app run on an iOS or Windows device, you'll need to add extra logic to detect those platforms; what I'm showing here will require that you manually start the app at a JavaScript console if it is anything but a non-compiled Android app, meaning it is running in the Emulate or Debug tabs, or on App Preview via the Test tab, etc.
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page