生成Proguarded签名APK问题?

时间:2018-08-30 15:43:27

标签: android video encryption video-streaming proguard

我编写了一个播放加密视频的应用。 效果很好,但是当我想保护apk时,出现了以下警告:

Information:Gradle tasks [:app:assembleRelease]
Warning:fr.maxcom.http.FileDataSource: can't find referenced class com.android.vending.expansion.zipfile.APKExpansionSupport
Warning:fr.maxcom.http.FileDataSource: can't find referenced class com.android.vending.expansion.zipfile.ZipResourceFile
Warning:fr.maxcom.http.FileDataSource: can't find referenced class com.android.vending.expansion.zipfile.ZipResourceFile$ZipEntryRO
Warning:fr.maxcom.http.FileDataSource: can't find referenced class jcifs.smb.SmbFile
Warning:fr.maxcom.http.FileDataSource: can't find referenced class com.android.vending.expansion.zipfile.ZipResourceFile$ZipEntryRO
Warning:fr.maxcom.http.FileDataSource: can't find referenced class com.android.vending.expansion.zipfile.APKExpansionSupport
Warning:fr.maxcom.http.FileDataSource: can't find referenced class com.android.vending.expansion.zipfile.ZipResourceFile
Warning:fr.maxcom.http.FileDataSource: can't find referenced class com.android.vending.expansion.zipfile.ZipResourceFile$ZipEntryRO
Warning:fr.maxcom.http.FileDataSource: can't find referenced class jcifs.smb.SmbFile
Warning:fr.maxcom.http.FileDataSource: can't find referenced class com.android.vending.expansion.zipfile.ZipResourceFile$ZipEntryRO
Warning:fr.maxcom.http.FileDataSource: can't find referenced class jcifs.smb.SmbFile
Warning:fr.maxcom.http.WifiSingleHttpServer: can't find referenced class com.google.android.gms.cast.CastDevice
Warning:there were 25 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
Information:Total time: 9.897 secs
Information:1 error
Information:14 warnings
Information:See complete output in console

有什么建议吗?

1 个答案:

答案 0 :(得分:1)

将此行添加到proguard-rules文件中可以解决此问题:

-dontwarn com.android.vending.expansion.zipfile.**, jcifs.smb.SmbFile, jcifs.http.*, com.google.android.gms.cast.CastDevice