Phonegap Android: Unknown Chrome Error: -6

I am creating a Phonegap Android application and I am having trouble adding a plugin to it. Cordoba's version is 2.2.0. I do not use jQM or Sencha Touch. I am testing an application on Android 4.0.

The plugin I'm referring to is the Android Phonegap plugin . This is my file index.html:

<!DOCTYPE html>
<html>
  <head>
    ...
  </head>
  <body>
    <div class="wrapper">
      ...
    </div>

    <script type="text/javascript" src="vendor/cordova-2.2.0.js"></script>
    <script type="text/javascript" src="assets/application.js"></script>
    <script type="text/javascript" src="js/index.js"></script>
    <script type="text/javascript" src="js/datePickerPlugin.js"></script>
  </body>
</html>

This is my main Java file:

import android.app.Activity;
import android.os.Bundle;
import org.apache.cordova.*;

public class looker extends DroidGap
    {
        @Override
        public void onCreate(Bundle savedInstanceState)
            {
                super.onCreate(savedInstanceState);
                super.setIntegerProperty("splashscreen", R.drawable.splash);
                super.loadUrl("file:///android_asset/www/index.html", 7000);
            }
    }

So, in order to understand if the problem is in the plugin, I minimized this file to assets/application.jswhere all my minimal scripts I use. I removed the script tag for the plugin from index.html, and the plugin worked just fine! So this has something to do with the url?

What have i tried so far?

I understood a lot and tried several times to solve other similar problems.

  • , 3/ loadUrl :

    public void onCreate(Bundle savedInstanceState)
        {
          super.onCreate(savedInstanceState);
          super.setIntegerProperty("splashscreen", R.drawable.splash);
          super.loadUrl("file:///android_asset/www/index.html", 7000);
        }
    

    .

  • super.init() super.loadUrl(). .

  • :

    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        super.init();
        super.setIntegerProperty("loadUrlTimeoutValue", 6000);
        super.loadUrl("file:///android_asset/www/index.html");
    }
    

    ​​.

  • , , alert();. .

. , , . !

+5
2

.

, " : -6", config.xml:

<plugin name="DatePickerPlugin1" value="com.phonegap.plugin.DatePickerPlugin"/>

, "name" XML - DatePickerPlugin, , JavaScript : https://github.com/phonegap/phonegap-plugins/blob/master/Android/DatePicker/datePickerPlugin.js#L33

. , HTML , , config.xml? (, res/xml/config.xml, res/xml/plugins.xml, : http://cordova.apache.org/docs/en/2.0.0/guide_upgrading_android_index.md.html#Upgrading%20Cordova%20Android

+2

: Chromium -6 "
.

.

ng-include ngRoute,
:

- = "'/Partials/file.html'"

:

ng-include = "'partials/file.html'"

, .

.

+1

All Articles