[英]Can’t generate signed apk in android studio
Dears;亲爱的;
I can build normal APK for my project , But I can't build signed APK , the bellow error Appears;我可以为我的项目构建普通的 APK,但我无法构建已签名的 APK,出现以下错误;
AAPT2 aapt2-4.1.0-6503028-windows Daemon #4: Unexpected error during compile 'C:\Users\user\AndroidStudioProjects\MgeLast\app\src\main\res\mipmap-xxxhdpi\ic_launcher_round.png', attempting to stop daemon
I've tried to change the launcher icon but still the same problem我已经尝试更改启动器图标,但仍然是同样的问题
and suggestion ?和建议?
It is a known issue in 3.2 and 3.3 https://issuetracker.google.com/u/0/issues/117486770#comment17这是 3.2 和 3.3 中的一个已知问题https://issuetracker.google.com/u/0/issues/117486770#comment17
add to your app gradle:添加到您的应用程序gradle:
aaptOptions.cruncherEnabled = false aaptOptions.useNewCruncher = false aaptOptions.cruncherEnabled = false aaptOptions.useNewCruncher = false
This allows build to go past this error.这允许构建通过此错误。
If you have that drawable file in Drawable
folder then I think its a cache issue.Go to File->Invalidate Cache & Restart
.如果你在Drawable
文件夹中有那个 drawable 文件,那么我认为它是一个缓存问题。转到File->Invalidate Cache & Restart
。 It will restart the android studio.它将重新启动android studio。 try to build now.现在尝试构建。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.