google-ar / sceneform-android-sdk

Sceneform SDK for Android
https://developers.google.com/sceneform/develop/
Apache License 2.0
1.23k stars 604 forks source link

Sceneform Compilation failed once updated to 1.9.0 #717

Open yashvv opened 5 years ago

yashvv commented 5 years ago

Log: AGPBI: {"kind":"error","text":"Program type already present: com.google.j2objc.annotations.RetainedLocalRef","sources":[{}],"tool":"D8"}

// Sceneform implementation ('com.google.ar.sceneform.ux:sceneform-ux:1.9.0'){ exclude group: 'com.google.j2objc', module: 'annotations' }

I have tried excluding the annotations module and having no luck.

tpsiaki commented 5 years ago

This annotation library was incorrectly included in the sceneform-base library in our 1.9.0 release. We'll correct this problem in the next release.

yashvv commented 5 years ago

@tpsiaki Thank You for the update. When can we expect the next release?

kenyee commented 5 years ago

FYI, this is a dup of #689 that I filed a few weeks ago...

fredsa commented 5 years ago

@yashvv Unfortunately, we don't have a specific release date for you, but our releases for ARCore and Sceneform having historically been ~ six weeks. Hope that helps.

michaelvogt commented 5 years ago

@fredsa Shouldn't a problem like this be reason enough to provide a fix as quickly as possible?

brako commented 5 years ago

Is there a workaround for this issue? Or do we have to switch back to 1.8?

yashvv commented 5 years ago

@brako I had to switch back to 1.8 until the next release.

brako commented 5 years ago

Thanks @yashvv, I managed to make it work. I found out that I have the issue only when using sceneform UX alongside with firebase. Your exclude group wasn't working for me either, but working on firebase:

implementation('com.google.firebase:firebase-firestore-ktx:19.0.0') {
    exclude group: 'com.google.j2objc'
    exclude group: 'com.google.code.findbugs'
    exclude group: 'org.checkerframework'
    exclude group: 'org.codehaus.mojo'
}
iengphogit commented 5 years ago

Log: AGPBI: {"kind":"error","text":"Program type already present: com.google.j2objc.annotations.RetainedLocalRef","sources":[{}],"tool":"D8"}

// Sceneform implementation ('com.google.ar.sceneform.ux:sceneform-ux:1.9.0'){ exclude group: 'com.google.j2objc', module: 'annotations' }

I have tried excluding the annotations module and having no luck. buildscript { dependencies { classpath 'com.android.tools.build:gradle:3.1.0' classpath 'com.google.ar.sceneform:plugin:1.9.0' } }

implementation "com.google.ar.sceneform:core:1.9.0" //noinspection GradleDependency implementation "com.google.ar.sceneform.ux:sceneform-ux:1.9.0" //noinspection GradleDependency implementation 'com.google.ar.sceneform:assets:1.9.0' work fine for me.

iengphogit commented 5 years ago

classpath 'com.android.tools.build:gradle:3.1.0'