weixin_39883705
weixin_39883705
2020-11-26 02:21

Error during build and crash when placing model after updating to Sceneform 1.9

After updating Sceneform to 1.9 I get multiple build errors:


* What went wrong:
Execution failed for task ':app:checkDebugDuplicateClasses'.
> 1 exception was raised by workers:
  java.lang.RuntimeException: Duplicate class javax.annotation.CheckForNull found in modules classes.jar (com.google.ar.sceneform:core:1.9.0) and jsr305-3.0.2.jar (com.google.code.findbugs:jsr305:3.0.2)
  Duplicate class javax.annotation.CheckForSigned found in modules classes.jar (com.google.ar.sceneform:core:1.9.0) and jsr305-3.0.2.jar (com.google.code.findbugs:jsr305:3.0.2)
  Duplicate class javax.annotation.CheckReturnValue found in modules classes.jar (com.google.ar.sceneform:core:1.9.0) and jsr305-3.0.2.jar (com.google.code.findbugs:jsr305:3.0.2)
  Duplicate class javax.annotation.Detainted found in modules classes.jar (com.google.ar.sceneform:core:1.9.0) and jsr305-3.0.2.jar (com.google.code.findbugs:jsr305:3.0.2)
  Duplicate class javax.annotation.MatchesPattern found in modules classes.jar (com.google.ar.sceneform:core:1.9.0) and jsr305-3.0.2.jar (com.google.code.findbugs:jsr305:3.0.2)
  Duplicate class javax.annotation.MatchesPattern$Checker found in modules classes.jar (com.google.ar.sceneform:core:1.9.0) and jsr305-3.0.2.jar (com.google.code.findbugs:jsr305:3.0.2)
  Duplicate class javax.annotation.Nonnegative found in modules classes.jar (com.google.ar.sceneform:core:1.9.0) and jsr305-3.0.2.jar (com.google.code.findbugs:jsr305:3.0.2)
  Duplicate class javax.annotation.Nonnegative$Checker found in modules classes.jar (com.google.ar.sceneform:core:1.9.0) and jsr305-3.0.2.jar (com.google.code.findbugs:jsr305:3.0.2)
  Duplicate class javax.annotation.Nonnull found in modules classes.jar (com.google.ar.sceneform:core:1.9.0) and jsr305-3.0.2.jar (com.google.code.findbugs:jsr305:3.0.2)
  Duplicate class javax.annotation.Nonnull$Checker found in modules classes.jar (com.google.ar.sceneform:core:1.9.0) and jsr305-3.0.2.jar (com.google.code.findbugs:jsr305:3.0.2)
  Duplicate class javax.annotation.Nullable found in modules classes.jar (com.google.ar.sceneform:core:1.9.0) and jsr305-3.0.2.jar (com.google.code.findbugs:jsr305:3.0.2)
  Duplicate class javax.annotation.OverridingMethodsMustInvokeSuper found in modules classes.jar (com.google.ar.sceneform:core:1.9.0) and jsr305-3.0.2.jar (com.google.code.findbugs:jsr305:3.0.2)
  Duplicate class javax.annotation.ParametersAreNonnullByDefault found in modules classes.jar (com.google.ar.sceneform:core:1.9.0) and jsr305-3.0.2.jar (com.google.code.findbugs:jsr305:3.0.2)
  Duplicate class javax.annotation.ParametersAreNullableByDefault found in modules classes.jar (com.google.ar.sceneform:core:1.9.0) and jsr305-3.0.2.jar (com.google.code.findbugs:jsr305:3.0.2)
  Duplicate class javax.annotation.PropertyKey found in modules classes.jar (com.google.ar.sceneform:core:1.9.0) and jsr305-3.0.2.jar (com.google.code.findbugs:jsr305:3.0.2)
  Duplicate class javax.annotation.RegEx found in modules classes.jar (com.google.ar.sceneform:core:1.9.0) and jsr305-3.0.2.jar (com.google.code.findbugs:jsr305:3.0.2)
  Duplicate class javax.annotation.RegEx$Checker found in modules classes.jar (com.google.ar.sceneform:core:1.9.0) and jsr305-3.0.2.jar (com.google.code.findbugs:jsr305:3.0.2)
  Duplicate class javax.annotation.Signed found in modules classes.jar (com.google.ar.sceneform:core:1.9.0) and jsr305-3.0.2.jar (com.google.code.findbugs:jsr305:3.0.2)
  Duplicate class javax.annotation.Syntax found in modules classes.jar (com.google.ar.sceneform:core:1.9.0) and jsr305-3.0.2.jar (com.google.code.findbugs:jsr305:3.0.2)
  Duplicate class javax.annotation.Tainted found in modules classes.jar (com.google.ar.sceneform:core:1.9.0) and jsr305-3.0.2.jar (com.google.code.findbugs:jsr305:3.0.2)
  Duplicate class javax.annotation.Untainted found in modules classes.jar (com.google.ar.sceneform:core:1.9.0) and jsr305-3.0.2.jar (com.google.code.findbugs:jsr305:3.0.2)
  Duplicate class javax.annotation.WillClose found in modules classes.jar (com.google.ar.sceneform:core:1.9.0) and jsr305-3.0.2.jar (com.google.code.findbugs:jsr305:3.0.2)
  Duplicate class javax.annotation.WillCloseWhenClosed found in modules classes.jar (com.google.ar.sceneform:core:1.9.0) and jsr305-3.0.2.jar (com.google.code.findbugs:jsr305:3.0.2)
  Duplicate class javax.annotation.WillNotClose found in modules classes.jar (com.google.ar.sceneform:core:1.9.0) and jsr305-3.0.2.jar (com.google.code.findbugs:jsr305:3.0.2)
  Duplicate class javax.annotation.concurrent.GuardedBy found in modules classes.jar (com.google.ar.sceneform:core:1.9.0) and jsr305-3.0.2.jar (com.google.code.findbugs:jsr305:3.0.2)
  Duplicate class javax.annotation.concurrent.Immutable found in modules classes.jar (com.google.ar.sceneform:core:1.9.0) and jsr305-3.0.2.jar (com.google.code.findbugs:jsr305:3.0.2)
  Duplicate class javax.annotation.concurrent.NotThreadSafe found in modules classes.jar (com.google.ar.sceneform:core:1.9.0) and jsr305-3.0.2.jar (com.google.code.findbugs:jsr305:3.0.2)
  Duplicate class javax.annotation.concurrent.ThreadSafe found in modules classes.jar (com.google.ar.sceneform:core:1.9.0) and jsr305-3.0.2.jar (com.google.code.findbugs:jsr305:3.0.2)
  Duplicate class javax.annotation.meta.Exclusive found in modules classes.jar (com.google.ar.sceneform:core:1.9.0) and jsr305-3.0.2.jar (com.google.code.findbugs:jsr305:3.0.2)
  Duplicate class javax.annotation.meta.Exhaustive found in modules classes.jar (com.google.ar.sceneform:core:1.9.0) and jsr305-3.0.2.jar (com.google.code.findbugs:jsr305:3.0.2)
  Duplicate class javax.annotation.meta.TypeQualifier found in modules classes.jar (com.google.ar.sceneform:core:1.9.0) and jsr305-3.0.2.jar (com.google.code.findbugs:jsr305:3.0.2)
  Duplicate class javax.annotation.meta.TypeQualifierDefault found in modules classes.jar (com.google.ar.sceneform:core:1.9.0) and jsr305-3.0.2.jar (com.google.code.findbugs:jsr305:3.0.2)
  Duplicate class javax.annotation.meta.TypeQualifierNickname found in modules classes.jar (com.google.ar.sceneform:core:1.9.0) and jsr305-3.0.2.jar (com.google.code.findbugs:jsr305:3.0.2)
  Duplicate class javax.annotation.meta.TypeQualifierValidator found in modules classes.jar (com.google.ar.sceneform:core:1.9.0) and jsr305-3.0.2.jar (com.google.code.findbugs:jsr305:3.0.2)
  Duplicate class javax.annotation.meta.When found in modules classes.jar (com.google.ar.sceneform:core:1.9.0) and jsr305-3.0.2.jar (com.google.code.findbugs:jsr305:3.0.2)

  Go to the documentation to learn how to <a href="d.android.com/r/tools/classpath-sync-errors">Fix dependency resolution errors</a>.

Ok, to fix this I must remove this library from gradle script: implementation 'com.google.code.findbugs:jsr305:3.0.2'

But after successful build when I try to place my models I get a crash:


019-05-23 15:43:40.422 25714-25714/? E/Filament: Panic
    in filament::Material *filament::Material::Builder::build(filament::Engine &):85
    reason: Material version mismatch. Expected 2 but received 1.
2019-05-23 15:43:40.423 25714-25714/? A/libc: Fatal signal 6 (SIGABRT), code -1 (SI_QUEUE) in tid 25714 (lylabs.belfanar), pid 25714 (lylabs.belfanar)
2019-05-23 15:43:40.601 25967-25967/? I/crash_dump64: obtaining output fd from tombstoned, type: kDebuggerdTombstone
2019-05-23 15:43:40.611 819-819/? I//system/bin/tombstoned: received crash request for pid 25714
2019-05-23 15:43:40.613 25967-25967/? I/crash_dump64: performing dump of process 25714 (target tid = 25714)
2019-05-23 15:43:40.627 25967-25967/? A/DEBUG: *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
2019-05-23 15:43:40.628 25967-25967/? A/DEBUG: Build fingerprint: 'google/sailfish/sailfish:10/QPP3.190404.015/5505587:user/release-keys'
2019-05-23 15:43:40.628 25967-25967/? A/DEBUG: Revision: '0'
2019-05-23 15:43:40.628 25967-25967/? A/DEBUG: ABI: 'arm64'
2019-05-23 15:43:40.631 25967-25967/? A/DEBUG: Timestamp: 2019-05-23 15:43:40+0300
2019-05-23 15:43:40.631 25967-25967/? A/DEBUG: pid: 25714, tid: 25714, name: lylabs.belfanar  >>> com.owlylabs.belfanar <<<
2019-05-23 15:43:40.631 25967-25967/? A/DEBUG: signal 6 (SIGABRT), code -1 (SI_QUEUE), fault addr --------
2019-05-23 15:43:40.631 25967-25967/? A/DEBUG:     x0  0000000000000000  x1  0000000000006472  x2  0000000000000006  x3  0000007fd0f58280
2019-05-23 15:43:40.631 25967-25967/? A/DEBUG:     x4  550002070f073c00  x5  550002070f073c00  x6  550002070f073c00  x7  803c070f07028055
2019-05-23 15:43:40.631 25967-25967/? A/DEBUG:     x8  00000000000000f0  x9  62d4e9dbd2bd67ff  x10 fffffff0fffffbdf  x11 0000000000000000
2019-05-23 15:43:40.631 25967-25967/? A/DEBUG:     x12 0000000000000000  x13 0000000000000007  x14 0000000000000001  x15 550002070f073c00
2019-05-23 15:43:40.631 25967-25967/? A/DEBUG:     x16 00000072bcf4d8a8  x17 00000072bcf2ab10  x18 000000000000ffff  x19 00000000000000ac
2019-05-23 15:43:40.631 25967-25967/? A/DEBUG:     x20 0000000000006472  x21 00000000000000b2  x22 0000000000006472  x23 00000000ffffffff
2019-05-23 15:43:40.631 25967-25967/? A/DEBUG:     x24 0000000000000010  x25 00000072c02af020  x26 00000072c00bc8b0  x27 0000000000000004
2019-05-23 15:43:40.631 25967-25967/? A/DEBUG:     x28 0000007fd0f58650  x29 0000007fd0f58330
2019-05-23 15:43:40.631 25967-25967/? A/DEBUG:     sp  0000007fd0f58260  lr  00000072bcedd88c  pc  00000072bcedd8ac
2019-05-23 15:43:40.631 25967-25967/? A/DEBUG: backtrace:
2019-05-23 15:43:40.632 25967-25967/? A/DEBUG:       #00 pc 00000000000828ac  /apex/com.android.runtime/lib64/bionic/libc.so (abort+160) (BuildId: 61d34cb89677d752d9520ba962936b)
2019-05-23 15:43:40.632 25967-25967/? A/DEBUG:       #01 pc 0000000000085d4c  /data/app/com.owlylabs.belfanar-ovIBM0EJzZDxmmDcsNzKxQ==/lib/arm64/libfilament-jni.so (utils::TPanic<:preconditionpanic>::panic(char const*, char const*, int, char const*, ...)+204) (BuildId: 033060fd6e78d97e5f2debbb2505dd0ea88006)
2019-05-23 15:43:42.087 819-819/? E//system/bin/tombstoned: Tombstone written to: /data/tombstones/tombstone_01
</:preconditionpanic>

该提问来源于开源项目:google-ar/sceneform-android-sdk

  • 点赞
  • 写回答
  • 关注问题
  • 收藏
  • 复制链接分享
  • 邀请回答

6条回答

  • weixin_39527911 weixin_39527911 5月前

    If you are through Google Sceneform Tools (Beta) You can try to regenerate the .sfb file

    点赞 评论 复制链接分享
  • weixin_39883705 weixin_39883705 5月前

    We have reconverted 1000+ models after upgrading to 1.6. If we have to reconvert again this number of models - then it is a big problem for us.

    点赞 评论 复制链接分享
  • weixin_39527911 weixin_39527911 5月前

    We have reconverted 1000+ models after upgrading to 1.6. If we have to reconvert again this number of models - then it is a big problem for us.

    I just encountered the same problem as you, and solved it in this way. According to the log"reason: Material version mismatch. Expected 2 but received 1." I don't know if there are other solutions.

    点赞 评论 复制链接分享
  • weixin_39755890 weixin_39755890 5月前

    We have reconverted 1000+ models after upgrading to 1.6. If we have to reconvert again this number of models - then it is a big problem for us.

    Gradle will do this automatically for you if you only delete the .sfb files. (not the references in your build.gradle file.

    点赞 评论 复制链接分享
  • weixin_39638057 weixin_39638057 5月前

    I've got the same problem and I didn't get it fixed by adding:

    
    debugImplementation ("com.google.ar.sceneform.ux:sceneform-ux:1.9.0") {
        exclude group: 'com.android.support', module: 'support-fragment'
        exclude group: 'com.google.j2objc'
        exclude group: 'com.google.code.findbugs'
        exclude group: 'org.checkerframework'
        exclude group: 'org.codehaus.mojo'
    }
    
    点赞 评论 复制链接分享
  • weixin_40002692 weixin_40002692 5月前

    I'm getting Material version mismatch. Expected 4 but received 1. Precondition Panic and also Material version mismatch. Expected 3 but received 1.. I'm compiling the sfb with Studio and manually as well, Sceneform Tools plugin 1.12.0. Nothing helps https://github.com/google-ar/sceneform-android-sdk/issues/866

    点赞 评论 复制链接分享

相关推荐