gpt4 book ai didi

c# - Proguard 错误 (Xamarin c#)

转载 作者:搜寻专家 更新时间:2023-11-01 09:48:16 24 4
gpt4 key购买 nike

我正在编写 Android 应用。

当我设置 Release模式并运行它时,有这个。

java.exe exited with code 1

Java 堆大小设置为 1G

输出有这个

    1>PROGUARD : warning : com.koushikdutta.urlimageviewhelper.HttpUrlDownloader$1: can't find referenced class org.apache.http.NameValuePair
1>PROGUARD : warning : com.koushikdutta.urlimageviewhelper.HttpUrlDownloader$1: can't find referenced class org.apache.http.NameValuePair
1>PROGUARD : warning : com.koushikdutta.urlimageviewhelper.HttpUrlDownloader$1: can't find referenced class org.apache.http.NameValuePair
1>PROGUARD : warning : com.koushikdutta.urlimageviewhelper.HttpUrlDownloader$1: can't find referenced class org.apache.http.NameValuePair
1>PROGUARD : warning : com.koushikdutta.urlimageviewhelper.HttpUrlDownloader$1: can't find referenced class org.apache.http.NameValuePair
1>PROGUARD : warning : com.koushikdutta.urlimageviewhelper.UrlImageViewHelper$RequestPropertiesCallback: can't find referenced class org.apache.http.NameValuePair
1>PROGUARD : warning : okio.DeflaterSink: can't find referenced class org.codehaus.mojo.animal_sniffer.IgnoreJRERequirement
1>PROGUARD : warning : okio.Okio: can't find referenced class java.nio.file.Files
1>PROGUARD : warning : okio.Okio: can't find referenced class java.nio.file.Files
1>PROGUARD : warning : okio.Okio: can't find referenced class java.nio.file.Files
1>PROGUARD : warning : okio.Okio: can't find referenced class java.nio.file.Path
1>PROGUARD : warning : okio.Okio: can't find referenced class java.nio.file.OpenOption
1>PROGUARD : warning : okio.Okio: can't find referenced class java.nio.file.Path
1>PROGUARD : warning : okio.Okio: can't find referenced class java.nio.file.OpenOption
1>PROGUARD : warning : okio.Okio: can't find referenced class org.codehaus.mojo.animal_sniffer.IgnoreJRERequirement
1>PROGUARD : warning : okio.Okio: can't find referenced class java.nio.file.Path
1>PROGUARD : warning : okio.Okio: can't find referenced class java.nio.file.OpenOption
1>PROGUARD : warning : okio.Okio: can't find referenced class java.nio.file.Path
1>PROGUARD : warning : okio.Okio: can't find referenced class java.nio.file.OpenOption
1>PROGUARD : warning : okio.Okio: can't find referenced class org.codehaus.mojo.animal_sniffer.IgnoreJRERequirement
1>PROGUARD : warning : there were 20 unresolved references to classes or interfaces.

我该如何解决这个问题?

谢谢

最佳答案

试试这个:

在解决方案的 Android 项目中创建名为 proguard.cfg 的文件。

右键单击并将 Build Action 设置为 ProguardConfig

引用: Custom ProGuard File in Xamarin & Xamarin | ProGuard

添加:

-keep class com.package.*{ *; }
-dontwarn com.package.**

或者

-keep class com.package.*{ public *; }
-dontwarn com.package.**

示例:

-keep public class com.koushikdutta.urlimageviewhelper.* { public *; }
-dontwarn com.koushikdutta.urlimageviewhelper.**

关于c# - Proguard 错误 (Xamarin c#),我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/36906512/

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