2017-02-06 11 views
0

Когда я развертываю apk в отладочной версии, нет предупреждения, но когда я пытаюсь построить apk в версии выпуска, я получил это предупреждение, пожалуйста, помогите кому-нибудь.Невозможно построить apk в версии выпуска

Warning:com.jjf2017.activity.MainActivity$43$$Lambda$1: can't find referenced class java.lang.invoke.LambdaForm$Hidden Warning:com.jjf2017.fragment.ArtistIDFragment$$Lambda$1: can't find referenced class java.lang.invoke.LambdaForm$Hidden Warning:com.jjf2017.fragment.ArtistIDFragment$$Lambda$2: can't find referenced class java.lang.invoke.LambdaForm$Hidden Warning:com.jjf2017.fragment.ArtistINFragment$$Lambda$1: can't find referenced class java.lang.invoke.LambdaForm$Hidden Warning:com.jjf2017.fragment.ArtistINFragment$$Lambda$2: can't find referenced class java.lang.invoke.LambdaForm$Hidden Warning:com.jjf2017.fragment.CcFragment$$Lambda$1: can't find referenced class java.lang.invoke.LambdaForm$Hidden Warning:com.jjf2017.fragment.TicketFragment$$Lambda$1: can't find referenced class java.lang.invoke.LambdaForm$Hidden 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.DateTimeZone: can't find referenced class org.joda.convert.ToString Warning:org.joda.time.Days: can't find referenced class org.joda.convert.FromString 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:retrofit2.Platform$Java8: can't find referenced class java.lang.invoke.MethodHandles$Lookup Warning:retrofit2.Platform$Java8: can't find referenced class java.lang.invoke.MethodHandle Warning:retrofit2.Platform$Java8: can't find referenced class java.lang.invoke.MethodHandles Warning:retrofit2.Platform$Java8: can't find referenced class java.lang.invoke.MethodHandle Warning:retrofit2.Platform$Java8: can't find referenced class java.lang.invoke.MethodHandles$Lookup Warning:retrofit2.Platform$Java8: can't find referenced class org.codehaus.mojo.animal_sniffer.IgnoreJRERequirement Warning:there were 52 unresolved references to classes or interfaces. Warning:Exception while processing task java.io.IOException: Please correct the above warnings first. Error:Execution failed for task ':app:transformClassesAndResourcesWithProguardForRelease'. Job failed, see logs for details

+1

Вы используете Progaurd? –

+0

Нет, я не использую Proguard –

ответ

1

Ошибка: Не удалось завершить выполнение задачи для ': приложение: transformClassesAndResourcesWithProguardForRelease' означает, что вы используете ProGuard в релизе.

Попробуйте установить параметр minifyEnabled в файле build.gradle на false.

Как это:

buildTypes { 
     release { 
      minifyEnabled false 
      ... 
     } 
    } 
0

, если ваше приложение все еще работает, когда вы делаете

minifyEnabled false

, то вы должны dontwarn вручную каждый предупредив, что у вас есть с -dontwarn

Exempel: -dontwarn java.lang.invoke.**