[英]Crosswalk Xwalk Webview conflict CollapsingToolbarLayout<android.support.design.widget>
我的項目已針對UI效果實施了CollapsingToolbarLayout
當我添加
編譯'org.xwalk:xwalk_core_library:20.50.533.12'
dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
compile 'com.android.support:appcompat-v7:23.2.1'
compile 'com.android.support:design:23.2.1'
compile 'com.android.support:cardview-v7:23.2.1'
compile 'com.android.support:recyclerview-v7:23.2.1'
compile 'org.xwalk:xwalk_core_library:20.50.533.12'
// compile 'org.xwalk:xwalk_core_library:16.45.421.19'
}
並運行我的項目我得到錯誤
Caused by: android.view.InflateException: Binary XML file line #17: Error inflating class android.support.design.widget.CollapsingToolbarLayout
從gradle中刪除編譯'org.xwalk:xwalk_core_library:20.50.533.12'后,錯誤消失
Stacktrace還有以下內容:
caused by: java.lang.reflect.InvocationTargetException at java.lang.reflect.Constructor.constructNative(Native Method)
所以我建議檢查與人行橫道相關的proguard設置。
-keep class org.xwalk.core.** { *; }
如果你在crosswalk webview中使用它,可能是javascriptInterface。
另一種可能性是您在crosswalk核心庫和support-v4中包含相同的模塊。 嘗試編譯核心庫,但不包括以下模塊:
compile 'org.xwalk:xwalk_core_library:16.45.421.19'
{
exclude module: 'support-v4'
exclude module: 'support-annotations'
exclude module: 'jsr305'
}
使用以下代碼段修復了該問題
compile('com.android.support:support-v4:25.2.0') {
force = true;
}
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.