can't find referenced class org.joda.convert.FromString

在Android studio项目编译中遇到以下错误:FromString

Warning:org.joda.time.DateMidnight: can't find referenced class org.joda.convert.FromString
Warning:org.joda.time.DateTime: can'
t find referenced class org.joda.convert.FromString
Warning:org.joda.time.DateTimeZone: can't find referenced class org.joda.convert.FromString
Warning:org.joda.time.Days: can'
t find referenced class org.joda.convert.FromString
Warning:org.joda.time.DateTimeZone: can't find referenced class org.joda.convert.ToString
Warning:org.joda.time.Days: can'
t find referenced class org.joda.convert.ToString
Warning:org.joda.time.Duration: can't find referenced class org.joda.convert.FromString
Warning:org.joda.time.Hours: can'
t find referenced class org.joda.convert.FromString
Warning:org.joda.time.Hours: can't find referenced class org.joda.convert.ToString
Warning:org.joda.time.Instant: can'
t find referenced class org.joda.convert.FromString
Warning:org.joda.time.LocalDate: can't find referenced class org.joda.convert.FromString
Warning:org.joda.time.LocalDate: can'
t find referenced class org.joda.convert.ToString
Warning:org.joda.time.LocalDateTime: can't find referenced class org.joda.convert.FromString
Warning:org.joda.time.LocalDateTime: can'
t find referenced class org.joda.convert.ToString
Warning:org.joda.time.LocalTime: can't find referenced class org.joda.convert.FromString
Warning:org.joda.time.LocalTime: can'
t find referenced class org.joda.convert.ToString
Warning:org.joda.time.Minutes: can't find referenced class org.joda.convert.FromString
Warning:org.joda.time.Minutes: can'
t find referenced class org.joda.convert.ToString
Warning:org.joda.time.MonthDay: can't find referenced class org.joda.convert.FromString
Warning:org.joda.time.MonthDay: can'
t find referenced class org.joda.convert.ToString
Warning:org.joda.time.Months: can't find referenced class org.joda.convert.FromString
Warning:org.joda.time.Months: can'
t find referenced class org.joda.convert.ToString
Warning:org.joda.time.MutableDateTime: can't find referenced class org.joda.convert.FromString
Warning:org.joda.time.MutablePeriod: can'
t find referenced class org.joda.convert.FromString
Warning:org.joda.time.Period: can't find referenced class org.joda.convert.FromString
Warning:org.joda.time.Seconds: can'
t find referenced class org.joda.convert.FromString
Warning:org.joda.time.Seconds: can't find referenced class org.joda.convert.ToString
Warning:org.joda.time.Weeks: can'
t find referenced class org.joda.convert.FromString
Warning:org.joda.time.Weeks: can't find referenced class org.joda.convert.ToString
Warning:org.joda.time.YearMonth: can'
t find referenced class org.joda.convert.FromString
Warning:org.joda.time.YearMonth: can't find referenced class org.joda.convert.ToString
Warning:org.joda.time.Years: can'
t find referenced class org.joda.convert.FromString
Warning:org.joda.time.Years: can't find referenced class org.joda.convert.ToString
Warning:org.joda.time.base.AbstractDateTime: can'
t find referenced class org.joda.convert.ToString
Warning:org.joda.time.base.AbstractDuration: can't find referenced class org.joda.convert.ToString
Warning:org.joda.time.base.AbstractInstant: can'
t find referenced class org.joda.convert.ToString
Warning:org.joda.time.base.AbstractPeriod: can't find referenced class org.joda.convert.ToString
Warning:there were 37 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)
Exception while processing task java.io.IOException: Please correct the above warnings first.
  at proguard.Initializer.execute(Initializer.java:473)
  at proguard.ProGuard.initialize(ProGuard.java:233)
  at proguard.ProGuard.execute(ProGuard.java:98)
  at proguard.gradle.ProGuardTask.proguard(ProGuardTask.java:1074)
  at com.android.build.gradle.tasks.AndroidProGuardTask.doMinification(AndroidProGuardTask.java:139)
  at com.android.build.gradle.tasks.AndroidProGuardTask$1.run(AndroidProGuardTask.java:115)
  at com.android.builder.tasks.Job.runTask(Job.java:48)
  at com.android.build.gradle.tasks.SimpleWorkQueue$EmptyThreadContext.runTask(SimpleWorkQueue.java:41)
  at com.android.builder.tasks.WorkQueue.run(WorkQueue.java:227)
  at java.lang.Thread.run(Thread.java:745)

我找到这个问题的答案。

应将下列代码添加到在混淆文件

-dontwarn org.joda.convert.**
-dontwarn org.joda.time.**
-keep class org.joda.time.** { *; }
-keep interface org.joda.time.** { *;}

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

好名字都被猪取了-

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值