android - 生成签名的apk找不到通用的超类
问题描述
我正在尝试为我的应用程序构建一个签名的 apk,但每当我尝试构建它时都会收到此错误:
找不到 [com/google/android/gms/internal/zzata](具有 1 个已知超类)和 [java/lang/String](具有 2 个已知超类)的通用超类
我之前能够使用不同的密钥库构建签名的 apk,但现在我得到的只是这个错误。
解决方案
看起来我发现了问题所在。在我build gradle
的应用程序中,我的依赖项如下所示:
dependencies {
implementation fileTree(include: ['*.jar'], dir: 'libs')
implementation project(':libcocos2dx')
}
//dependencies { compile 'com.google.android.gms:play-services-ads:15.0.1' }
dependencies { compile 'com.google.android.gms:play-services-analytics:12.0.1' }
dependencies { compile 'com.google.android.gms:play-services-auth:15.0.0' }
dependencies { compile 'com.google.android.gms:play-services-games:15.0.0' }
dependencies { compile 'com.google.android.gms:play-services-drive:15.0.0' }
我上面遇到的错误是在命名空间中找不到库引用google gms
。事实证明这是因为我用于该'com.google.android.gms:play-services-analytics:12.0.1'
服务的版本。我只是将版本从更改为12.0.1
与15.0.0
其他库一样,然后它可以工作并生成我签名的 APK。感谢所有提供帮助的人,我希望这可以帮助任何有同样问题的人。
推荐阅读
- excel - 未创建 vba 数据透视缓存
- python - H5PY:写入复杂选择时不支持广播
- c++ - 线程化的第一步失败
- python - _tkinter.TclError:错误的窗口路径名“.!checkbutton”
- javascript - 更改全日历上的事件显示 - 不应突出显示完整持续时间
- c - char 数组中的位操作
- max - 如何分别从 groupby 列中获取第一个和最后一个值?
- pip - 'openssl/err.h':没有这样的文件或目录
- android - 与android ndk混合后是否可以访问音频输出流?
- javascript - 如何在 window.scrollTo() 之外滚动页面