姬長信(Redy)

签署的APK错误:com.firebaseui:firebase-ui-datab…


更新后

compile 'com.firebaseui:firebase-ui-database:0.4.0'

compile 'com.firebaseui:firebase-ui-database:2.3.0'

我可以在测试设备上编译和运行我的应用,但是当尝试生成签名的apk时,我会在“ messages gradle build”中得到它.我希望这是一个保障问题:

Information:Gradle tasks [:app:assembleRelease]
Warning:android.arch.lifecycle.Transformations: can't find referenced class android.arch.core.util.Function
Warning:android.arch.lifecycle.Transformations$1: can't find referenced class android.arch.core.util.Function
Warning:android.arch.lifecycle.Transformations$2: can't find referenced class android.arch.core.util.Function
Warning:there were 16 unresolved references to classes or interfaces.
Warning:Exception while processing task java.io.IOException: Please correct the above warnings first.
Error:Execution failed for task ':app:transformClassesAndResourcesWithProguardForRelease'.
> Job failed, see logs for details
Information:BUILD FAILED in 11s
Information:1 error
Information:5 warnings
Information:See complete output in console

我已经尝试了增量版本更新,但是还是没有用.例如:

 compile 'com.firebaseui:firebase-ui-database:2.0.0' 

甚至不会同步,并给出合并错误消息.

我还更新了其他SDK,但firebaseui行现在触发了它.这是部分app gradle,就像在评论中问我的那样:

dependencies {
    compile fileTree(include: ['*.jar'], dir: 'libs')

    compile 'com.android.support:design:26.1.0'
    compile 'com.android.support:appcompat-v7:26.1.0'

    compile 'com.google.android.gms:play-services-drive:11.4.0'
    compile 'com.google.android.gms:play-services-plus:11.4.0'
    compile 'com.google.android.gms:play-services-location:11.4.0'
    compile 'com.google.android.gms:play-services-auth:11.4.0'
    compile 'com.google.android.gms:play-services-wallet:11.4.0'
    compile 'com.google.android.gms:play-services-games:11.4.0'

    compile 'com.android.support:support-v4:26.1.0'
    compile 'com.android.support:support-v13:26.1.0'

    compile 'com.google.firebase:firebase-core:11.4.0'
    compile 'com.google.firebase:firebase-invites:11.4.0'
    compile 'com.google.firebase:firebase-ads:11.4.0'
    compile 'com.google.firebase:firebase-database:11.4.0'
    compile 'com.google.firebase:firebase-auth:11.4.0'
    compile 'com.google.firebase:firebase-config:11.4.0'
    compile 'com.google.firebase:firebase-messaging:11.4.0'
    compile 'com.google.firebase:firebase-crash:11.4.0'
    compile 'com.google.firebase:firebase-analytics:11.4.0'
    compile 'com.google.firebase:firebase-appindexing:11.4.0'

    compile 'com.firebaseui:firebase-ui-database:2.3.0'
}

这是我的proguard规则,正如评论中所提到的,最后我尝试了几行.我已经尝试了各种语法而没有效果.

-renamesourcefileattribute SourceFile
-keepattributes Signature
-keepattributes SourceFile
-keepattributes LineNumberTable
-keepattributes *Annotation*
-keep class com.android.**
-keepclassmembers class com.android.**