我想使用xwalkview构建混合应用程序,但不断收到此错误。我添加了crosswalk-webview-arm库和appcompat-v7 libarary和2个jar。 android-support-v4 jar和xwalk-core-library.jar。删除它们中的任何一个都会产生编译时间错误。android.view.InflateException:二进制xml文件错误充气类org.xwalk.core.Xwalkview
android_main.xml
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
tools:context="com.example.hcp_android.NewMainActivity" >
<org.xwalk.core.XWalkView
android:id="@+id/webPage"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
/>
NewMainActivity.java
public class NewMainActivity extends Activity {
XWalkView xwalkview;
MediaPlayer ringtone;
AndroidJSInterface jSInterface;
boolean doubleBackToExitPressedOnce = false;
int k = 0;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
xwalkview=(XWalkView)findViewById(R.id.webPage);
jSInterface = new AndroidJSInterface(this);
xwalkview.addJavascriptInterface(jSInterface, "AndroidJSInterface");
xwalkview.load("file:///android_asset/login.html", null);
}
什么错误? – Elltz
@Elltz:android.view.InflateException:二进制XML文件行#8:二进制XML文件行错误充气类org.xwalk.core.XWalkView – SwagDevelopers
您可以分享Crosswalk的版本以及您正在使用的工具链吗? – lincsoon