2

xwalkview を使用してハイブリッド アプリを構築しようとしていますが、継続的にこのエラーが発生します。crosswalk-webview-arm ライブラリと appcompat-v7 ライブラリと 2 つの jar を追加しました。android-support-v4 jar および xwalk-core-library.jar。それらのいずれかを削除すると、コンパイル時のエラーが発生します。

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);
}
4

2 に答える 2

0

これは、build.gradle の productreading での so ライブラリの競合の結果であると思います。

ndk {
      abiFilters "armeabi", "x86"
}
于 2018-01-18T09:41:23.727 に答える