- mongodb - 在 MongoDB mapreduce 中,如何展平值对象?
- javascript - 对象传播与 Object.assign
- html - 输入类型 ="submit"Vs 按钮标签它们可以互换吗?
- sql - 使用 MongoDB 而不是 MS SQL Server 的优缺点
我在我的android项目中使用了Joda time API,当我导出一个签名的apk时我的项目没有编译,它显示错误“Proguard返回错误代码1。见控制台”,下面是错误日志,
[2013-07-20 00:50:25 - CC] Proguard returned with error code 1. See console
[2013-07-20 00:50:25 - CC] Warning: org.joda.time.DateMidnight: can't find referenced class org.joda.convert.FromString
[2013-07-20 00:50:25 - CC] Warning: org.joda.time.DateTime: can't find referenced class org.joda.convert.FromString
[2013-07-20 00:50:25 - CC] Warning: org.joda.time.DateTimeZone: can't find referenced class org.joda.convert.FromString
[2013-07-20 00:50:25 - CC] Warning: org.joda.time.DateTimeZone: can't find referenced class org.joda.convert.ToString
[2013-07-20 00:50:25 - CC] Warning: org.joda.time.Days: can't find referenced class org.joda.convert.FromString
[2013-07-20 00:50:25 - CC] Warning: org.joda.time.Days: can't find referenced class org.joda.convert.ToString
[2013-07-20 00:50:25 - CC] Warning: org.joda.time.Duration: can't find referenced class org.joda.convert.FromString
[2013-07-20 00:50:25 - CC] Warning: org.joda.time.Hours: can't find referenced class org.joda.convert.FromString
[2013-07-20 00:50:25 - CC] Warning: org.joda.time.Hours: can't find referenced class org.joda.convert.ToString
[2013-07-20 00:50:25 - CC] Warning: org.joda.time.Instant: can't find referenced class org.joda.convert.FromString
[2013-07-20 00:50:25 - CC] Warning: org.joda.time.LocalDate: can't find referenced class org.joda.convert.FromString
[2013-07-20 00:50:25 - CC] Warning: org.joda.time.LocalDate: can't find referenced class org.joda.convert.ToString
[2013-07-20 00:50:25 - CC] Warning: org.joda.time.LocalDateTime: can't find referenced class org.joda.convert.FromString
[2013-07-20 00:50:25 - CC] Warning: org.joda.time.LocalDateTime: can't find referenced class org.joda.convert.ToString
[2013-07-20 00:50:25 - CC] Warning: org.joda.time.LocalTime: can't find referenced class org.joda.convert.FromString
[2013-07-20 00:50:25 - CC] Warning: org.joda.time.LocalTime: can't find referenced class org.joda.convert.ToString
[2013-07-20 00:50:25 - CC] Warning: org.joda.time.Minutes: can't find referenced class org.joda.convert.FromString
[2013-07-20 00:50:25 - CC] Warning: org.joda.time.Minutes: can't find referenced class org.joda.convert.ToString
[2013-07-20 00:50:25 - CC] Warning: org.joda.time.MonthDay: can't find referenced class org.joda.convert.FromString
[2013-07-20 00:50:25 - CC] Warning: org.joda.time.MonthDay: can't find referenced class org.joda.convert.ToString
[2013-07-20 00:50:25 - CC] Warning: org.joda.time.Months: can't find referenced class org.joda.convert.FromString
[2013-07-20 00:50:25 - CC] Warning: org.joda.time.Months: can't find referenced class org.joda.convert.ToString
[2013-07-20 00:50:25 - CC] Warning: org.joda.time.MutableDateTime: can't find referenced class org.joda.convert.FromString
[2013-07-20 00:50:25 - CC] Warning: org.joda.time.MutableDateTime: can't find referenced class org.joda.convert.ToString
[2013-07-20 00:50:25 - CC] Warning: org.joda.time.MutablePeriod: can't find referenced class org.joda.convert.FromString
[2013-07-20 00:50:25 - CC] Warning: org.joda.time.Period: can't find referenced class org.joda.convert.FromString
[2013-07-20 00:50:25 - CC] Warning: org.joda.time.Seconds: can't find referenced class org.joda.convert.FromString
[2013-07-20 00:50:25 - CC] Warning: org.joda.time.Seconds: can't find referenced class org.joda.convert.ToString
[2013-07-20 00:50:25 - CC] Warning: org.joda.time.Weeks: can't find referenced class org.joda.convert.FromString
[2013-07-20 00:50:25 - CC] Warning: org.joda.time.Weeks: can't find referenced class org.joda.convert.ToString
[2013-07-20 00:50:25 - CC] Warning: org.joda.time.YearMonth: can't find referenced class org.joda.convert.FromString
[2013-07-20 00:50:25 - CC] Warning: org.joda.time.YearMonth: can't find referenced class org.joda.convert.ToString
[2013-07-20 00:50:25 - CC] Warning: org.joda.time.Years: can't find referenced class org.joda.convert.FromString
[2013-07-20 00:50:25 - CC] Warning: org.joda.time.Years: can't find referenced class org.joda.convert.ToString
[2013-07-20 00:50:25 - CC] Warning: org.joda.time.base.AbstractDuration: can't find referenced class org.joda.convert.ToString
[2013-07-20 00:50:25 - CC] Warning: org.joda.time.base.AbstractInstant: can't find referenced class org.joda.convert.ToString
[2013-07-20 00:50:25 - CC] Warning: org.joda.time.base.AbstractPeriod: can't find referenced class org.joda.convert.ToString
[2013-07-20 00:50:25 - CC] You should check if you need to specify additional program jars.
[2013-07-20 00:50:25 - CC] Warning: there were 37 unresolved references to classes or interfaces.
[2013-07-20 00:50:25 - CC] You may need to specify additional library jars (using '-libraryjars').
[2013-07-20 00:50:25 - CC] java.io.IOException: Please correct the above warnings first.
[2013-07-20 00:50:25 - CC] at proguard.Initializer.execute(Initializer.java:321)
[2013-07-20 00:50:25 - CC] at proguard.ProGuard.initialize(ProGuard.java:211)
[2013-07-20 00:50:25 - CC] at proguard.ProGuard.execute(ProGuard.java:86)
[2013-07-20 00:50:25 - CC] at proguard.ProGuard.main(ProGuard.java:492)
我的 proguard.cfg 文件看起来像,
-optimizationpasses 5
-dontusemixedcaseclassnames
-dontskipnonpubliclibraryclasses
-dontpreverify
-verbose
-optimizations !code/simplification/arithmetic,!field/*,!class/merging/*
-keep public class * extends android.app.Activity
-keep public class * extends android.app.Application
-keep public class * extends android.app.Service
-keep public class * extends android.content.BroadcastReceiver
-keep public class * extends android.content.ContentProvider
-keep public class * extends android.app.backup.BackupAgentHelper
-keep public class * extends android.preference.Preference
-keep public class com.android.vending.licensing.ILicensingService
-keepclasseswithmembernames class * {
native <methods>;
}
-keepclasseswithmembers class * {
public <init>(android.content.Context, android.util.AttributeSet);
}
-keepclasseswithmembers class * {
public <init>(android.content.Context, android.util.AttributeSet, int);
}
-keepclassmembers class * extends android.app.Activity {
public void *(android.view.View);
}
-keepclassmembers enum * {
public static **[] values();
public static ** valueOf(java.lang.String);
}
-keep class * implements android.os.Parcelable {
public static final android.os.Parcelable$Creator *;
}
谁能帮我解决这个问题?我需要发布我的应用程序。该解决方案将不胜感激。提前致谢。
最佳答案
如果不需要缺少的类,您可以取消警告:
-dontwarn org.joda.convert.**
参见 ProGuard 手册 > 故障排除 > Warning: can't find referenced class
关于Android - Proguard 未使用 Joda Time jar 文件编译,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/17753988/
我是 grails 的新手。我正在使用 joda 插件来获取日期和时间。所以我在单独的列中显示日期和时间。现在我想使用条件搜索日期。 我在 gsp 页面中使用以下代码来搜索日期。
我试图在执行更多计算之前简单地将 TimeZone 信息添加回 LocalDate。 LocalDate 来自使用 ObjectLab LocalDateCalculator 将天数添加到现有 Dat
所以我在使用 JodaTime 年表 IslamicChronology 解析日期时遇到问题,因此编写了一个小示例来演示我的问题。 代码如下: import org.joda.time.Chronol
当我启动我的应用程序时,virgo 会抛出这样的异常: [2015-09-05 11:27:53.254] TCP Connection(2)-127.0.0.1 Installation of
我使用 Spring 从 Web API rest API 检索 JSON 数据,使用 Jackson Joda 模块反序列化 ISO 日期,并将其转换为 Joda DateTime。 Spring
在 Android 设备 (7.0) 上,出现此崩溃: Fatal Exception: org.joda.time.IllegalInstantException: Illegal instant
我需要将 GMT 转换为亚利桑那时间。亚利桑那州目前有 MST(夏令时关闭)。 但是在 Joda Time DateTimeZone 代码中,MST 已映射到 America/Denver: map.
大家早上好。 我想帮助您了解如何使用 1.2.1.1 版本的 Joda Time 完成 org.joda.time.DateTime 到 java.util.Date 的转换。 为什么选择 Joda
试试这个: @Type(type = "org.jadira.usertype.moneyandcurrency.joda.PersistentMoneyAmountAndCurrency") pri
尝试使用 Joda 将包含日期字符串的 JSON 字符串反序列化为 POJO 时遇到异常。 我将 Jackson2 与 Spring 和 Robospice 一起使用。 我遇到以下异常: Could
我有一个招摇的OpenAPI YAML文件,我想使用gradle-swagger-generator-plugin生成Java 这是我的config.json { "useRxJava2": tr
我想使用以下 MDX 语句: with member [x] as now()->plusMonths(1)->withDayOfMonth(1)->minusDay(1) select [x] on
System.out.println( PeriodFormat.getDefault().print(Period.hours(1).plusMinutes(30).plusSeconds(60))
我正在使用 Joda-Time Duration 来获取两个 DateTime 之间的持续时间: DateTime startTimeDate = new DateTime(startTimeDate
当我运行以下代码片段时: import org.joda.time.DateTime; import org.joda.time.DateTimeZone; import java.sql.Times
我正在尝试在 Joda DateTime 中转换毫秒。米利斯是 1338501600000我使用了在线转换器和其他库,所有结果都是 1338501600000 millis 是 Fri Jun 01
我尝试使用以下代码,但收到错误格式无效:“12/11/2013”: String dFrom = ps.utils.gv(request, "dFrom"); String dTo = ps.ut
我正在尝试使用 Joda-Time 的持续时间类来计算两天之间的确切天数差异。这意味着我希望结果是 25.48 天,而不是仅仅 25 天。现在我有: private static final doub
有没有隐藏的方法来获得 Joda-Time以分钟为单位的时间段(或任何其他) 现在我做的是: (period.getHours()*60 + period.getMinutes() + roundTw
有谁知道如何解析日期,例如:Mon Aug 04 16:07:00 CEST 2014使用 Joda 的 DateTime 格式化程序转换为 dd/MM/YYYY HH:MM:SS。我已经尝试过了:
我是一名优秀的程序员,十分优秀!