Подпись приложения Android: Proguard возвращается с кодом ошибки 1. смотри консоль
Я построил приложение, которое использует JacksonJson в качестве библиотеки. Я пытаюсь экспортировать его как подписанное приложение и получаю ошибку proguard. Я пробовал различные решения, размещенные в интернете, но ни одно из них не работает. Любая помощь будет оценена по достоинству.
Консоль :
Proguard returned with error code 1. See console
Warning: com.fasterxml.jackson.jaxrs.base.JsonMappingExceptionMapper: can't find superclass or interface javax.ws.rs.ext.ExceptionMapper
Warning: com.fasterxml.jackson.jaxrs.base.JsonParseExceptionMapper: can't find superclass or interface javax.ws.rs.ext.ExceptionMapper
Warning: com.fasterxml.jackson.jaxrs.base.ProviderBase: can't find superclass or interface javax.ws.rs.ext.MessageBodyReader
Warning: com.fasterxml.jackson.jaxrs.base.ProviderBase: can't find superclass or interface javax.ws.rs.ext.MessageBodyWriter
Warning: com.fasterxml.jackson.databind.ext.DOMSerializer: can't find referenced class org.w3c.dom.bootstrap.DOMImplementationRegistry
Warning: com.fasterxml.jackson.databind.ext.DOMSerializer: can't find referenced class org.w3c.dom.bootstrap.DOMImplementationRegistry
Warning: com.fasterxml.jackson.databind.ext.DOMSerializer: can't find referenced class org.w3c.dom.bootstrap.DOMImplementationRegistry
Warning: com.fasterxml.jackson.databind.ext.DOMSerializer: can't find referenced class org.w3c.dom.bootstrap.DOMImplementationRegistry
Warning: com.fasterxml.jackson.jaxrs.base.JsonMappingExceptionMapper: can't find referenced class javax.ws.rs.core.Response$Status
Warning: com.fasterxml.jackson.jaxrs.base.JsonMappingExceptionMapper: can't find referenced class javax.ws.rs.core.Response
Warning: com.fasterxml.jackson.jaxrs.base.JsonMappingExceptionMapper: can't find referenced class javax.ws.rs.core.Response$ResponseBuilder
Warning: com.fasterxml.jackson.jaxrs.base.JsonMappingExceptionMapper: can't find referenced class javax.ws.rs.core.Response$ResponseBuilder
Warning: com.fasterxml.jackson.jaxrs.base.JsonMappingExceptionMapper: can't find referenced class javax.ws.rs.core.Response$ResponseBuilder
Warning: com.fasterxml.jackson.jaxrs.base.JsonMappingExceptionMapper: can't find referenced class javax.ws.rs.ext.ExceptionMapper
Warning: com.fasterxml.jackson.jaxrs.base.JsonMappingExceptionMapper: can't find referenced class javax.ws.rs.core.Response$Status
Warning: com.fasterxml.jackson.jaxrs.base.JsonMappingExceptionMapper: can't find referenced class javax.ws.rs.core.Response
Warning: com.fasterxml.jackson.jaxrs.base.JsonMappingExceptionMapper: can't find referenced class javax.ws.rs.core.Response$ResponseBuilder
Warning: com.fasterxml.jackson.jaxrs.base.JsonMappingExceptionMapper: can't find referenced class javax.ws.rs.core.Response
Warning: com.fasterxml.jackson.jaxrs.base.JsonMappingExceptionMapper: can't find referenced class javax.ws.rs.core.Response
Warning: com.fasterxml.jackson.jaxrs.base.JsonMappingExceptionMapper: can't find referenced class javax.ws.rs.ext.ExceptionMapper
Warning: com.fasterxml.jackson.jaxrs.base.JsonMappingExceptionMapper: can't find referenced class javax.ws.rs.ext.Provider
Warning: com.fasterxml.jackson.jaxrs.base.JsonParseExceptionMapper: can't find referenced class javax.ws.rs.core.Response$Status
Warning: com.fasterxml.jackson.jaxrs.base.JsonParseExceptionMapper: can't find referenced class javax.ws.rs.core.Response
Warning: com.fasterxml.jackson.jaxrs.base.JsonParseExceptionMapper: can't find referenced class javax.ws.rs.core.Response$ResponseBuilder
Warning: com.fasterxml.jackson.jaxrs.base.JsonParseExceptionMapper: can't find referenced class javax.ws.rs.core.Response$ResponseBuilder
Warning: com.fasterxml.jackson.jaxrs.base.JsonParseExceptionMapper: can't find referenced class javax.ws.rs.core.Response$ResponseBuilder
Warning: com.fasterxml.jackson.jaxrs.base.JsonParseExceptionMapper: can't find referenced class javax.ws.rs.ext.ExceptionMapper
Warning: com.fasterxml.jackson.jaxrs.base.JsonParseExceptionMapper: can't find referenced class javax.ws.rs.core.Response$Status
Warning: com.fasterxml.jackson.jaxrs.base.JsonParseExceptionMapper: can't find referenced class javax.ws.rs.core.Response
Warning: com.fasterxml.jackson.jaxrs.base.JsonParseExceptionMapper: can't find referenced class javax.ws.rs.core.Response$ResponseBuilder
Warning: com.fasterxml.jackson.jaxrs.base.JsonParseExceptionMapper: can't find referenced class javax.ws.rs.core.Response
Warning: com.fasterxml.jackson.jaxrs.base.JsonParseExceptionMapper: can't find referenced class javax.ws.rs.core.Response
Warning: com.fasterxml.jackson.jaxrs.base.JsonParseExceptionMapper: can't find referenced class javax.ws.rs.ext.ExceptionMapper
Warning: com.fasterxml.jackson.jaxrs.base.JsonParseExceptionMapper: can't find referenced class javax.ws.rs.ext.Provider
Warning: com.fasterxml.jackson.jaxrs.base.ProviderBase: can't find referenced class javax.ws.rs.core.StreamingOutput
Warning: com.fasterxml.jackson.jaxrs.base.ProviderBase: can't find referenced class javax.ws.rs.core.Response
Warning: com.fasterxml.jackson.jaxrs.base.ProviderBase: can't find referenced class javax.ws.rs.ext.MessageBodyReader
Warning: com.fasterxml.jackson.jaxrs.base.ProviderBase: can't find referenced class javax.ws.rs.ext.MessageBodyWriter
Warning: com.fasterxml.jackson.jaxrs.base.ProviderBase: can't find referenced class javax.ws.rs.core.MediaType
Warning: com.fasterxml.jackson.jaxrs.base.ProviderBase: can't find referenced class javax.ws.rs.core.MultivaluedMap
Warning: com.fasterxml.jackson.jaxrs.base.ProviderBase: can't find referenced class javax.ws.rs.core.MediaType
Warning: com.fasterxml.jackson.jaxrs.base.ProviderBase: can't find referenced class javax.ws.rs.core.MediaType
Warning: com.fasterxml.jackson.jaxrs.base.ProviderBase: can't find referenced class javax.ws.rs.core.MediaType
Warning: com.fasterxml.jackson.jaxrs.base.ProviderBase: can't find referenced class javax.ws.rs.core.MediaType
Warning: com.fasterxml.jackson.jaxrs.base.ProviderBase: can't find referenced class javax.ws.rs.core.MediaType
Warning: com.fasterxml.jackson.jaxrs.base.ProviderBase: can't find referenced class javax.ws.rs.core.MediaType
Warning: com.fasterxml.jackson.jaxrs.base.ProviderBase: can't find referenced class javax.ws.rs.core.MediaType
Warning: com.fasterxml.jackson.jaxrs.base.ProviderBase: can't find referenced class javax.ws.rs.core.MediaType
Warning: com.fasterxml.jackson.jaxrs.base.ProviderBase: can't find referenced class javax.ws.rs.core.MediaType
Warning: com.fasterxml.jackson.jaxrs.base.ProviderBase: can't find referenced class javax.ws.rs.core.MediaType
Warning: com.fasterxml.jackson.jaxrs.base.ProviderBase: can't find referenced class javax.ws.rs.core.MultivaluedMap
Warning: com.fasterxml.jackson.jaxrs.base.ProviderBase: can't find referenced class javax.ws.rs.core.MediaType
Warning: com.fasterxml.jackson.jaxrs.base.ProviderBase: can't find referenced class javax.ws.rs.core.MultivaluedMap
Warning: com.fasterxml.jackson.jaxrs.base.ProviderBase: can't find referenced class javax.ws.rs.core.MediaType
Warning: com.fasterxml.jackson.jaxrs.base.ProviderBase: can't find referenced class javax.ws.rs.core.MultivaluedMap
Warning: com.fasterxml.jackson.jaxrs.base.ProviderBase: can't find referenced class javax.ws.rs.core.MediaType
Warning: com.fasterxml.jackson.jaxrs.base.ProviderBase: can't find referenced class javax.ws.rs.core.MultivaluedMap
Warning: com.fasterxml.jackson.jaxrs.base.ProviderBase: can't find referenced class javax.ws.rs.core.MediaType
Warning: com.fasterxml.jackson.jaxrs.base.ProviderBase: can't find referenced class javax.ws.rs.core.MediaType
Warning: com.fasterxml.jackson.jaxrs.base.ProviderBase: can't find referenced class javax.ws.rs.core.MediaType
Warning: com.fasterxml.jackson.jaxrs.base.ProviderBase: can't find referenced class javax.ws.rs.core.MultivaluedMap
Warning: com.fasterxml.jackson.jaxrs.base.ProviderBase: can't find referenced class javax.ws.rs.core.MediaType
Warning: com.fasterxml.jackson.jaxrs.base.ProviderBase: can't find referenced class javax.ws.rs.core.MultivaluedMap
Warning: com.fasterxml.jackson.jaxrs.base.ProviderBase: can't find referenced class javax.ws.rs.core.MediaType
Warning: com.fasterxml.jackson.jaxrs.base.ProviderBase: can't find referenced class javax.ws.rs.core.MediaType
Warning: com.fasterxml.jackson.jaxrs.base.ProviderBase: can't find referenced class javax.ws.rs.ext.MessageBodyReader
Warning: com.fasterxml.jackson.jaxrs.base.ProviderBase: can't find referenced class javax.ws.rs.ext.MessageBodyWriter
You should check if you need to specify additional program jars.
Warning: there were 67 unresolved references to classes or interfaces.
You may need to specify additional library jars (using '-libraryjars').
java.io.IOException: Please correct the above warnings first.
at proguard.Initializer.execute(Initializer.java:321)
at proguard.ProGuard.initialize(ProGuard.java:211)
at proguard.ProGuard.execute(ProGuard.java:86)
at proguard.ProGuard.main(ProGuard.java:492)
Вот мой проект .свойства файл:
# This file is automatically generated by Android Tools.
# Do not modify this file -- YOUR CHANGES WILL BE ERASED!
#
# This file must be checked in Version Control Systems.
#
# To customize properties used by the Ant build system edit
# "ant.properties", and override values to adapt the script to your
# project structure.
#
# To enable ProGuard to shrink and obfuscate your code, uncomment this (available properties: sdk.dir, user.home):
proguard.config=${sdk.dir}/tools/proguard/proguard-android.txt:proguard-project.txt
# Project target.
target=android-18
android.library.reference.3=../ABCSourceCode/Libraries/ABCLibrary
android.library.reference.4=../ABCSourceCode/Libraries/AndroidHorizontalListView
android.library.reference.1=../ABCSourceCode/Libraries/ABS_Library
android.library.reference.2=../ABCSourceCode/Libraries/google-play-services_lib
android.library.reference.6=../ABCSourceCode/Libraries/volleyLibrary
android.library.reference.5=../ABCSourceCode/Libraries/SlidingMenuForklibrary
1 ответ:
В конфигурационном файле proguard просто пропустите все вышеперечисленные библиотеки, которые выбрасываются по ошибке указанным ниже способом..
-keep class yourclassname.** { *; }
В вашем случае это будет
-keep class javax.ws.rs.** { *; } -dontwarn com.fasterxml.jackson.**
Попробуйте сделать это и снова запустите build.