Software Archive
Read-only legacy content
17061 Discussions

Error when trying to debug

Tzelon_M_
Beginner
219 Views

Hey,

I'm trying to debug my application on Android device, but I'm getting the following error, 
I search the web, but didn't find any leads on this. 

my app is very simple, I have only index.html file that look similar to this
 

<script type="application/javascript">
        document.addEventListener('deviceready', onDeviceReady);
        function onDeviceReady() {
            StatusBar.overlaysWebView(false);
            StatusBar.styleDefault();
            cordova.plugins.backgroundMode.enable(); 
            window.location = "https://****.com/";
        }
</script>

Screenshot_20160301-111315.png

0 Kudos
1 Reply
PaulF_IntelCorp
Employee
219 Views

Try using the Debug tab, it will give you a better view of what a real app would do. It looks like you are trying to do this inside of App Preview (using the test tab).

BTW -- loading a web page as your "app" is generally frowned upon by most end users, it results in lots of low ratings and is typically rejected by the Apple iOS store. Your app should be a standalone entity that does not require network access to start the UI, if your user's device does not have a network connection, or that network connection is bad, the app you've created will appear to have hung when it does the window.load() operation. In the case of a Cordova app you are using HTML5 to create a client-only application, you are not creating a web site.

0 Kudos
Reply