美文网首页
打包时AF-Android-SDK.jar引起的错误

打包时AF-Android-SDK.jar引起的错误

作者: Jens丶 | 来源:发表于2020-02-22 13:34 被阅读0次
    Unity摊
    d8: type `com.huawei.hms.pps.advertisingidclient` was not found, it is required for default or static interface methods desugaring of `java.lang.string com.appsflyer.internal.ag.ˏ(android.content.context)`
    
    d8: type `com.appsflyer.oaidclient` was not found, it is required for default or static interface methods desugaring of `java.util.map com.appsflyer.appsflyerlibcore.ˎ(com.appsflyer.afevent)`
    

    原因: appsflyer sdk中用了上面相关的类, 但没有引入类库, 网上和官网又搜不到.

    解决: mainTemplate.gradle添加如下代码(关于禁用d8可自行google):
    ([rootProject] + (rootProject.subprojects as List)).each {
        ext {
            it.setProperty("android.enableR8.desugaring", false)
        }
    }
    

    相关文章

      网友评论

          本文标题:打包时AF-Android-SDK.jar引起的错误

          本文链接:https://www.haomeiwen.com/subject/umdlqhtx.html