[英]Error inflating class org.xwalk.core.XWalkView
I have imported CrossWalkView to my project and I am trying to use it inside my app but when I add the org.xwalk.core.XWalkView
tag to my activity
my app crashes我已将 CrossWalkView 导入到我的项目中,并尝试在我的应用程序中使用它,但是当我将
org.xwalk.core.XWalkView
标记添加到我的activity
时,我的应用程序崩溃了
my XML file:我的 XML 文件:
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:id="@+id/main"
android:layout_width="match_parent"
android:layout_height="match_parent"
tools:context=".SecondActivity"
android:orientation="horizontal">
<org.xwalk.core.XWalkView
android:id="@+id/xWalkView"
xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:layout_height="fill_parent">
</org.xwalk.core.XWalkView>
</LinearLayout>
I have implemented the Xwalkview library by adding flatDir{dirs 'libs'}
to the top-level gradle
like so:我已经通过将
flatDir{dirs 'libs'}
添加到top-level gradle
来实现 Xwalkview 库,如下所示:
allprojects {
repositories {
google()
jcenter()
maven { url "https://jitpack.io" }
flatDir {
dirs 'libs'
}
}
}
and in my app gradle I added implementation(name:'CrossWalkView', ext:'aar')
在我的应用程序 gradle 中,我添加了
implementation(name:'CrossWalkView', ext:'aar')
my CrossWalkView.arr file is xwalk_core_library-23.53.589.4-arm.aar我的 CrossWalkView.arr 文件是xwalk_core_library-23.53.589.4-arm.aar
I have tried implementing the CrossWalkView in every way I could find but all resulted in a crash upon opening the SecondActivity
where I am using the org.xwalk.core.XWalkView
tag and only when I remove it the activity runs normally and doesn't crash我已经尝试以我能找到的所有方式实现 CrossWalkView,但是在打开我使用
org.xwalk.core.XWalkView
标签的SecondActivity
时都导致崩溃,并且只有当我删除它时,活动才能正常运行并且不会崩溃
The complete error完整的错误
java.lang.RuntimeException: Unable to start activity ComponentInfo{com.player.wavenet/com.player.wavenet.SecondActivity}: android.view.InflateException: Binary XML file line #10: Error inflating class org.xwalk.core.XWalkView
just remove this line只需删除此行
xmlns:android="http://schemas.android.com/apk/res/android"
from this由此
<org.xwalk.core.XWalkView
android:id="@+id/xWalkView"
xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:layout_height="fill_parent">
</org.xwalk.core.XWalkView>
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.