googlevr / gvr-android-sdk

Google VR SDK for Android
http://developers.google.com/vr/android/
Other
3.28k stars 1.28k forks source link

NoClassDefFoundError Using Proguard #538

Closed carlyonj closed 6 years ago

carlyonj commented 6 years ago

I am getting the error

java.lang.NoClassDefFoundError: Failed resolution of: Lcom/google/vr/cardboard/VrParamsProviderFactory;

Here are the vr dependencies I am including, and then I have extensive proguard rules, basically copying the one going around and adding to it extensively and nothing seems to fix this issue. I have tried multiple versions up to 120.

    implementation "com.google.vr:sdk-commonwidget:$googleVrVersion"
    implementation "com.google.vr:sdk-panowidget:$googleVrVersion"
    implementation "com.google.vr:sdk-videowidget:$googleVrVersion"

where I exclude

      exclude group: 'com.google.android', module: 'aidl'
      exclude group: 'com.google.vr', module: 'sdk-common'

I thought this might be related to also including a pre 1.0 version of arCore but now that I am using arCore 1.0 I still get this identical error.

jdduke commented 6 years ago

The sdk-common library is required for the widgets. Can you try removing the exclusion of that library?

carlyonj commented 6 years ago

Doing that gives me the error

Duplicate zip entry [classes.jar:com/google/android/aidl/BaseProxy.class]

which is probably because arCore and vr use this.

I am including arCore from library I am including in my app as an aar and the vr is only from the above 3 implementations.

implementation (name:'djv16', ext:'aar') implementation 'com.google.ar:core:1.0.0'

jdduke commented 6 years ago

We're pushing a fix for the aidl collision in the next release, which should be pushed tomorrow or Wednesday.

sigmaxipi commented 6 years ago

This has been fixed with v1.130.0.