PhoneGap的Android的InAppBrowser不工作 [英] Phonegap Android InAppBrowser not working
问题描述
我工作的一个Android应用程序与PhoneGap的科尔多瓦-3.0.0,当我打电话InAppBrowser我的 MotionEvent mTouchMode = 4 错误。而InAppBrowser功能无法正常工作。那么,如何才能解决这个问题?我需要做一些设置,在AndroidManifest.xml中或config.xml文件? 而我得到这个在我的AndroidManifest.xml
I am working on an Android App with Phonegap Cordova-3.0.0 and when I call InAppBrowser I got MotionEvent mTouchMode = 4 error. And InAppBrowser function is not working. So how can I fix this? Do I need do some setting on AndroidManifest.xml or config.xml? And I got this on my AndroidManifest.xml
<使用-权限的Android:名称=android.permission.INTERNET对/>
<使用-权限的Android:名称=android.permission.ACCESS_NETWORK_STATE/>
<使用-权限的Android:名称=android.permission.WRITE_EXTERNAL_STORAGE/>
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
和我有这对我的config.xml
And I got this on my config.xml
&LT;插件&GT;
&LT;插件名称=InAppBrowser值=org.apache.cordova.InAppBrowser/&GT;
&LT; /插件&GT;
<plugins>
<plugin name="InAppBrowser" value="org.apache.cordova.InAppBrowser" />
</plugins>
推荐答案
在PhoneGap的科尔多瓦-3.0.0版本,应用程序与各种设备级功能紧密沟通,我们需要添加插件,提供接入到核心科尔多瓦的API。
In Phonegap Cordova-3.0.0 version, for the app to communicate closely with various device-level features, we need to add plugins that provide access to core Cordova APIs.
科尔多瓦插件添加命令需要你指定插件code库。 例如,在应用内浏览器:
The cordova plugin add command requires you to specify the repository for the plugin code. For example, In-app browser:
$ cordova plugin add https://git-wip-us.apache.org/repos/asf/cordova-plugin-inappbrowser.git
我们需要在命令行中运行此。不需要有关AndroidManifest.xml中或config.xml的文件后顾之忧。运行后 $科尔多瓦构建
,它会自动为你写的。
we need run this in command line. Don't need worries about AndroidManifest.xml or config.xml files. After you run $ cordova build
, it will auto write for you.
您可以得到关于它的<更加的想法href="http://docs.phonegap.com/en/3.0.0/guide_cli_index.md.html#The%20Command-line%20Interface_add_features"相对=nofollow> doc.phonegap
这篇关于PhoneGap的Android的InAppBrowser不工作的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!