【问题标题】:Generating Proguarded signed APK problem?生成 Proguarded 签名的 APK 问题?
【发布时间】:2019-02-05 15:04:24
【问题描述】:

我编写了一个播放加密视频的应用。 它工作正常,但是当我想保护 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

有什么建议吗?

【问题讨论】:

  • 我认为 ProGuard 规则设置不正确。 Proguard 混淆类定义,一些库坚持不混淆类定义。尝试为您使用的库查找 proguard 规则。

标签: android video encryption video-streaming proguard


【解决方案1】:

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

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

【讨论】:

  • 那是做什么的,你能解释一下@Omid
猜你喜欢
  • 1970-01-01
  • 2018-09-23
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 2016-02-29
  • 2018-12-17
  • 2019-06-21
  • 1970-01-01
相关资源
最近更新 更多