我正在使用this在我的应用中使用360视频。问题是我在打开视频时出现classDefNotFound
错误,只在棒棒糖设备上出现错误。
java.lang.NoClassDefFoundError: Failed resolution of: Lcom/google/vr/sdk/widgets/video/VrVideoView$Options;
Suppressed: java.lang.ClassNotFoundException: com.google.vr.sdk.widgets.video.VrVideoView$Options
我不明白为什么它在Marshmallow
和Nougat
设备上正常工作,并且仅在lollipop
设备上崩溃。
这是我的Gradle树,请指导我崩溃的原因。我没有使用proguard,我也启用了Multidex
但是没有什么能帮到这里。
debugApk - ## Internal use, do not manually configure ##
+--- project :common
+--- project :commonwidget
+--- project :videowidget
+--- com.farApp:farApp-android-sdk:2.1.3
| +--- com.android.support:multidex:1.0.1
| +--- io.reactivex:rxandroid:1.0.1
| | \--- io.reactivex:rxjava:1.0.13
| +--- com.squareup.okhttp:okhttp:2.4.0
| | \--- com.squareup.okio:okio:1.4.0 -> 1.6.0
| +--- com.squareup.okhttp:okhttp-urlconnection:2.0.0 -> 2.4.0
| | \--- com.squareup.okhttp:okhttp:2.4.0 (*)
| +--- com.squareup.picasso:picasso:2.5.2
| +--- com.squareup:otto:1.3.6
| +--- com.malinskiy:superrecyclerview:1.1.3
| | +--- com.android.support:recyclerview-v7:23.2.0 -> 25.0.0
| | | +--- com.android.support:support-annotations:25.0.0
| | | +--- com.android.support:support-compat:25.0.0
| | | | \--- com.android.support:support-annotations:25.0.0
| | | \--- com.android.support:support-core-ui:25.0.0
| | | \--- com.android.support:support-compat:25.0.0 (*)
| | \--- com.nineoldandroids:library:2.4.0
| +--- com.daimajia.slider:library:1.1.5
| +--- org.parceler:parceler-api:1.1.2
| +--- com.google.guava:guava:18.0
| +--- com.android.support:recyclerview-v7:23.3.0 -> 25.0.0 (*)
| +--- com.android.support:support-annotations:23.3.0 -> 25.0.0
| +--- com.android.support:cardview-v7:23.3.0 -> 25.0.0
| | \--- com.android.support:support-annotations:25.0.0
| +--- com.android.support:design:23.3.0 -> 25.0.0
| | +--- com.android.support:support-v4:25.0.0
| | | +--- com.android.support:support-compat:25.0.0 (*)
| | | +--- com.android.support:support-media-compat:25.0.0
| | | | \--- com.android.support:support-compat:25.0.0 (*)
| | | +--- com.android.support:support-core-utils:25.0.0
| | | | \--- com.android.support:support-compat:25.0.0 (*)
| | | +--- com.android.support:support-core-ui:25.0.0 (*)
| | | \--- com.android.support:support-fragment:25.0.0
| | | +--- com.android.support:support-compat:25.0.0 (*)
| | | +--- com.android.support:support-media-compat:25.0.0 (*)
| | | +--- com.android.support:support-core-ui:25.0.0 (*)
| | | \--- com.android.support:support-core-utils:25.0.0 (*)
| | +--- com.android.support:appcompat-v7:25.0.0
| | | +--- com.android.support:support-v4:25.0.0 (*)
| | | +--- com.android.support:support-vector-drawable:25.0.0
| | | | \--- com.android.support:support-compat:25.0.0 (*)
| | | \--- com.android.support:animated-vector-drawable:25.0.0
| | | \--- com.android.support:support-vector-drawable:25.0.0 (*)
| | +--- com.android.support:recyclerview-v7:25.0.0 (*)
| | \--- com.android.support:transition:25.0.0
| | \--- com.android.support:support-v4:25.0.0 (*)
| +--- com.android.support:appcompat-v7:23.3.0 -> 25.0.0 (*)
| +--- com.google.android.gms:play-services-ads:8.4.0 -> 9.0.1
| | +--- com.google.android.gms:play-services-ads-lite:9.0.1
| | | \--- com.google.android.gms:play-services-basement:9.0.1
| | | \--- com.android.support:support-v4:23.0.0 -> 25.0.0 (*)
| | +--- com.google.android.gms:play-services-base:9.0.1
| | | +--- com.google.android.gms:play-services-basement:9.0.1 (*)
| | | +--- com.google.firebase:firebase-common:9.0.1
| | | | +--- com.google.android.gms:play-services-basement:9.0.1 (*)
| | | | \--- com.google.android.gms:play-services-tasks:9.0.1
| | | | \--- com.google.android.gms:play-services-basement:9.0.1 (*)
| | | \--- com.google.android.gms:play-services-tasks:9.0.1 (*)
| | \--- com.google.android.gms:play-services-basement:9.0.1 (*)
| +--- com.google.android.gms:play-services-identity:8.4.0 -> 9.0.1
| | +--- com.google.android.gms:play-services-base:9.0.1 (*)
| | \--- com.google.android.gms:play-services-basement:9.0.1 (*)
| +--- com.google.android.gms:play-services-base:8.4.0 -> 9.0.1 (*)
| +--- com.google.android.gms:play-services-wallet:8.4.0 -> 9.0.1
| | +--- com.google.android.gms:play-services-base:9.0.1 (*)
| | +--- com.google.android.gms:play-services-basement:9.0.1 (*)
| | +--- com.google.android.gms:play-services-identity:9.0.1 (*)
| | \--- com.google.android.gms:play-services-maps:9.0.1
| | +--- com.google.android.gms:play-services-base:9.0.1 (*)
| | \--- com.google.android.gms:play-services-basement:9.0.1 (*)
| +--- com.google.android.gms:play-services-ads: -> 9.0.1 (*)
| \--- com.google.android.gms:play-services-location:8.4.0 -> 9.0.1
| +--- com.google.android.gms:play-services-base:9.0.1 (*)
| +--- com.google.android.gms:play-services-basement:9.0.1 (*)
| \--- com.google.android.gms:play-services-maps:9.0.1 (*)
+--- com.google.firebase:firebase-messaging:9.0.1
| +--- com.google.android.gms:play-services-basement:9.0.1 (*)
| +--- com.google.firebase:firebase-iid:9.0.1
| | +--- com.google.android.gms:play-services-basement:9.0.1 (*)
| | \--- com.google.firebase:firebase-common:9.0.1 (*)
| \--- com.google.firebase:firebase-common:9.0.1 (*)
+--- :hologram-1.0.2:
+--- :SDK-APP-TEST-2.1.8:
+--- com.crashlytics.sdk.android:crashlytics:2.6.3
| +--- com.crashlytics.sdk.android:beta:1.2.2
| +--- com.crashlytics.sdk.android:answers:1.3.10
| | \--- io.fabric.sdk.android:fabric:1.3.14
| +--- com.crashlytics.sdk.android:crashlytics-core:2.3.12
| | +--- com.crashlytics.sdk.android:answers:1.3.10 (*)
| | \--- io.fabric.sdk.android:fabric:1.3.14
| \--- io.fabric.sdk.android:fabric:1.3.14
+--- com.twitter.sdk.android:twitter:2.1.0
| +--- com.twitter.sdk.android:twitter-core:2.1.0
| | +--- com.google.code.gson:gson:2.6.1
| | +--- com.squareup.retrofit2:converter-gson:2.0.2
| | | +--- com.squareup.retrofit2:retrofit:2.0.2
| | | | \--- com.squareup.okhttp3:okhttp:3.2.0
| | | | \--- com.squareup.okio:okio:1.6.0
| | | \--- com.google.code.gson:gson:2.6.1
| | +--- com.squareup.okhttp3:okhttp:3.2.0 (*)
| | +--- io.fabric.sdk.android:fabric:1.3.14
| | \--- com.squareup.retrofit2:retrofit:2.0.2 (*)
| +--- io.fabric.sdk.android:fabric:1.3.14
| +--- com.twitter.sdk.android:tweet-ui:2.1.0
| | +--- com.twitter.sdk.android:twitter-core:2.1.0 (*)
| | +--- io.fabric.sdk.android:fabric:1.3.14
| | +--- com.android.support:support-v4:23.1.1 -> 25.0.0 (*)
| | \--- com.squareup.picasso:picasso:2.5.2
| \--- com.twitter.sdk.android:tweet-composer:2.1.0
| +--- com.twitter.sdk.android:twitter-core:2.1.0 (*)
| +--- com.twitter:twitter-text:1.13.0
| +--- io.fabric.sdk.android:fabric:1.3.14
| \--- com.squareup.picasso:picasso:2.5.2
+--- com.loopj.android:android-async-http:1.4.5
\--- org.apache.httpcomponents:httpcore:4.4.1
+--- project :extVP
| \--- com.android.support:support-v4:23.3.0 -> 25.0.0 (*)
+--- com.android.support:multidex:1.0.1
+--- com.mobsandgeeks:android-saripaar:2.0.2
+--- org.apache.commons:commons-lang3:3.4
+--- com.google.code.gson:gson:2.4 -> 2.6.1
+--- com.squareup.okhttp:logging-interceptor:2.6.0
| \--- com.squareup.okhttp:okhttp:2.6.0 -> 2.4.0 (*)
+--- org.glassfish:javax.annotation:10.0-b28
+--- com.android.support:appcompat-v7:25.0.0 (*)
+--- com.android.support:design:25.0.0 (*)
+--- com.google.maps.android:android-maps-utils:0.4
+--- com.squareup.picasso:picasso:2.5.2
+--- com.google.android.gms:play-services-analytics-impl:9.0.1
| +--- com.google.android.gms:play-services-base:9.0.1 (*)
| \--- com.google.android.gms:play-services-basement:9.0.1 (*)
+--- com.google.android.gms:play-services-maps:9.0.1 (*)
+--- com.google.android.gms:play-services-analytics:9.0.1
| +--- com.google.android.gms:play-services-analytics-impl:9.0.1 (*)
| +--- com.google.android.gms:play-services-base:9.0.1 (*)
| \--- com.google.android.gms:play-services-basement:9.0.1 (*)
+--- com.google.android.gms:play-services-location:9.0.1 (*)
+--- com.google.android.gms:play-services-tagmanager-api:9.0.1
| +--- com.google.android.gms:play-services-basement:9.0.1 (*)
| \--- com.google.firebase:firebase-analytics:9.0.1
| +--- com.google.android.gms:play-services-basement:9.0.1 (*)
| +--- com.google.firebase:firebase-common:9.0.1 (*)
| \--- com.google.firebase:firebase-analytics-impl:9.0.1
| +--- com.google.android.gms:play-services-base:9.0.1 (*)
| +--- com.google.android.gms:play-services-basement:9.0.1 (*)
| +--- com.google.firebase:firebase-iid:9.0.1 (*)
| \--- com.google.firebase:firebase-common:9.0.1 (*)
+--- com.google.android.gms:play-services-tagmanager:9.0.1
| +--- com.google.android.gms:play-services-analytics-impl:9.0.1 (*)
| +--- com.google.android.gms:play-services-basement:9.0.1 (*)
| \--- com.google.android.gms:play-services-tagmanager-api:9.0.1 (*)
+--- io.branch.sdk.android:library:2.+ -> 2.6.1
| +--- com.crashlytics.sdk.android:answers-shim:0.0.6
| \--- com.android.support:support-annotations:22.2.0 -> 25.0.0
+--- com.google.firebase:firebase-core:9.0.1
| \--- com.google.firebase:firebase-analytics:9.0.1 (*)
+--- com.google.android.gms:play-services-ads:9.0.1 (*)
+--- io.card:android-sdk:5.4.0
+--- it.sephiroth.android.library.targettooltip:target-tooltip-library:1.3.15
| \--- com.android.support:appcompat-v7:24.1.1 -> 25.0.0 (*)
+--- com.github.michaelye.easydialog:easydialog:1.4
| \--- com.android.support:appcompat-v7:21.0.2 -> 25.0.0 (*)
+--- com.google.android.gms:play-services-ads-lite:9.0.1 (*)
+--- com.google.android.gms:play-services-appindexing:9.0.1
| +--- com.google.android.gms:play-services-base:9.0.1 (*)
| +--- com.google.android.gms:play-services-basement:9.0.1 (*)
| +--- com.google.firebase:firebase-common:9.0.1 (*)
| \--- com.google.android.gms:play-services-tasks:9.0.1 (*)
+--- com.google.android.gms:play-services-auth:9.0.1
| +--- com.google.android.gms:play-services-auth-base:9.0.1
| | +--- com.google.android.gms:play-services-base:9.0.1 (*)
| | \--- com.google.android.gms:play-services-basement:9.0.1 (*)
| +--- com.google.android.gms:play-services-base:9.0.1 (*)
| \--- com.google.android.gms:play-services-basement:9.0.1 (*)
+--- com.google.android.gms:play-services-auth-base:9.0.1 (*)
+--- com.google.android.gms:play-services-panorama:9.0.1
| +--- com.google.android.gms:play-services-base:9.0.1 (*)
| \--- com.google.android.gms:play-services-basement:9.0.1 (*)
+--- com.android.support:support-v4:25.0.0 (*)
+--- com.android.support:cardview-v7:25.0.0 (*)
+--- com.mcxiaoke.volley:library:1.0.18
+--- com.squareup.okhttp:okhttp:2.4.0 (*)
+--- com.squareup.okhttp:okhttp-urlconnection:2.4.0 (*)
+--- com.twotoasters.servos:util:1.0.0
| \--- com.android.support:support-v4:21.0.3 -> 25.0.0 (*)
+--- com.twotoasters.servos:util-otto:1.0.0
| +--- com.squareup:otto:1.3.6
| \--- com.android.support:support-v4:21.0.3 -> 25.0.0 (*)
+--- se.emilsjolander:stickylistheaders:2.7.0
+--- com.google.zxing:core:3.2.1
+--- com.commonsware.cwac:merge:1.1.1
| \--- com.commonsware.cwac:sacklist:1.0.+ -> 1.0.3
+--- org.jsoup:jsoup:1.8.3
+--- me.grantland:autofittextview:0.2.+ -> 0.2.1
+--- com.android.support:recyclerview-v7:25.0.0 (*)
+--- com.android.support.constraint:constraint-layout:1.0.1
| \--- com.android.support.constraint:constraint-layout-solver:1.0.1
+--- com.facebook.android:facebook-android-sdk:4.19.0
| +--- com.android.support:support-v4:25.0.0 (*)
| +--- com.android.support:appcompat-v7:25.0.0 (*)
| +--- com.android.support:cardview-v7:25.0.0 (*)
| +--- com.android.support:customtabs:25.0.0
| | +--- com.android.support:support-compat:25.0.0 (*)
| | \--- com.android.support:support-annotations:25.0.0
| \--- com.parse.bolts:bolts-android:1.4.0
| +--- com.parse.bolts:bolts-tasks:1.4.0
| \--- com.parse.bolts:bolts-applinks:1.4.0
| \--- com.parse.bolts:bolts-tasks:1.4.0
+--- com.loopj.android:android-async-http:1.4.5
\--- org.apache.httpcomponents:httpcore:4.4.1
添加com.google.vr后的Gradle树:sdk库
+--- com.google.vr:sdk-audio:1.10.0
| \--- com.google.vr:sdk-base:1.10.0
| \--- com.google.vr:sdk-common:1.10.0
| \--- com.google.protobuf.nano:protobuf-javanano:3.1.0
\--- com.google.vr:sdk-base:1.10.0 (*)
常用模块:build.gradle
configurations.create("default")
artifacts.add("default", file('common.aar'))
常见小部件:build.gradle
configurations.create("default")
artifacts.add("default", file('commonwidget.aar'))
视频小部件:build.gradle
configurations.create("default")
artifacts.add("default", file('videowidget.aar'))
答案 0 :(得分:2)
尝试编译这些依赖项as mentioned here:
dependencies {
compile 'com.google.vr:sdk-common:1.40.0'
compile 'com.google.vr:sdk-commonwidget:1.40.0'
compile 'com.google.vr:sdk-videowidget:1.40.0'
}
删除compile project(':common')
和类似的依赖项。
还要注意先决条件: