WebIntent给了我' ActivityNotFoundException'

时间:2014-09-02 10:26:51

标签: android cordova cordova-3 cordova-plugins webintents

我是cordova应用的新手。在我的应用中,我正在尝试从https://github.com/Initsogar/cordova-webintent添加webintent。 当我运行我的代码时,我在logcat中得到以下内容 -

W/System.err(6378): android.content.ActivityNotFoundException: No Activity found to handle Intent { act=android.intent.action.VIEW typ=application/vnd.android.package-archive }
at android.app.Instrumentation.checkStartActivityResult(Instrumentation.java:1545)
W/System.err(6378):     at android.app.Instrumentation.execStartActivity(Instrumentation.java:1416)
W/System.err(6378):     at android.app.Activity.startActivityForResult(Activity.java:3351)
W/System.err(6378):     at android.app.Activity.startActivityForResult(Activity.java:3312)
W/System.err(6378):     at android.app.Activity.startActivity(Activity.java:3522)
W/System.err(6378):     at android.app.Activity.startActivity(Activity.java:3490)
at com.borismus.webintent.WebIntent.startActivity(WebIntent.java:204)
at com.borismus.webintent.WebIntent.execute(WebIntent.java:65)
at org.apache.cordova.CordovaPlugin.execute(CordovaPlugin.java:65)
at org.apache.cordova.PluginManager.execHelper(PluginManager.java:242)
at org.apache.cordova.PluginManager.exec(PluginManager.java:227)
at org.apache.cordova.ExposedJsApi.exec(ExposedJsApi.java:53)
at org.apache.cordova.CordovaChromeClient.onJsPrompt(CordovaChromeClient.java:229)
at android.webkit.CallbackProxy.handleMessage(CallbackProxy.java:655)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loop(Looper.java:137)
at android.app.ActivityThread.main(ActivityThread.java:4744)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:511)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:786)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:553)
at dalvik.system.NativeStart.main(Native Method)

我使用以下代码调用webintent -

window.plugins.webintent.startActivity({
                      action: window.plugins.webintent.ACTION_VIEW,
                      url: 'http://www.google.com',
                      type: 'application/vnd.android.package-archive'
               },
               function() {},
               function() {
                 alert('Failed to open URL via Android Intent.');
                 console.log("Failed to open URL via Android Intent.");
               }
            );

我还在github链接中添加了config.xml所需的行。请帮我解决我的错误。

1 个答案:

答案 0 :(得分:0)

这是由于协议 使用https代替http