gpt4 book ai didi

android-studio - 具有-keep标志的任务':app:transformClassesAndResourcesWithProguardForRelease'的执行失败

转载 作者:行者123 更新时间:2023-12-03 17:59:43 24 4
gpt4 key购买 nike

我希望有人可以帮助解决这些特定的构建失败-我已经看过所有的SO线程并尝试了主要的线程,这是我的特定错误:

Error:Warning: com.google.android.maps.MapView$Repainter: can't find superclass or interface android_maps_conflict_avoidance.com.google.googlenav.datarequest.DataRequestListener
Warning: com.google.android.maps.MapView$Repainter: can't find referenced class android_maps_conflict_avoidance.com.google.googlenav.datarequest.DataRequestListener
Warning: com.google.android.maps.MapView$Repainter: can't find referenced class android_maps_conflict_avoidance.com.google.googlenav.datarequest.DataRequest
Warning: com.google.android.maps.ZoomHelper$Snapshot: can't find referenced class android_maps_conflict_avoidance.com.google.map.Zoom
Warning: there were 4 unresolved references to classes or interfaces.
You may need to add missing library jars or update their versions.
If your code works fine without the missing classes, you can suppress
the warnings with '-dontwarn' options.
(http://proguard.sourceforge.net/manual/troubleshooting.html#unresolvedclass)
FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':app:transformClassesAndResourcesWithProguardForRelease'.



作业失败,请参阅日志以获取详细信息


我的构建文件发布部分:

release {
minifyEnabled true
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.txt'
}


所以我在proguard-rules.txt中尝试了

-ignorewarnings
-keep class * {
public private *;
}


更具体地说,我尝试过

 -keep public class com.google.android.gms.* { public *; }
-dontwarn com.google.android.gms.**


这些似乎都不起作用-我是否能做些什么才能弄清楚它是否甚至读取了该proguard txt文件?

还有其他建议吗?

最佳答案

没多久,但是我进入了Build-> Edit Build Types,在这里我选择了release,然后手动选择了我的proguard-rules.txt,单击OK,它基本上添加了

proguardFile '.../StudioProjects/App/proguard-rules.txt'


这使构建成功工作。

关于android-studio - 具有-keep标志的任务':app:transformClassesAndResourcesWithProguardForRelease'的执行失败,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/48859635/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com