Страницы

Поиск по вопросам

пятница, 12 июля 2019 г.

Возможные проблемы с proguard

Сегодня решил сделать релизную версию. Оказалось, что proguard что-то режет. Сразу скажу, что ни один из потерянных классов мне не знаком, да и код я с последнего релиза не сильно менял, а ведь тогда он работал! Подскажите, что добавить в proguard, чтобы этот зверь снова заработал?
Ниже привожу exception потерянных классов:
org.dom4j.datatype.DatatypeAttribute: can't find superclass or interface com.sun.msv.datatype.SerializationContext org.dom4j.datatype.DatatypeAttribute: can't find superclass or interface org.relaxng.datatype.ValidationContext org.dom4j.datatype.DatatypeElement: can't find superclass or interface com.sun.msv.datatype.SerializationContext org.dom4j.datatype.DatatypeElement: can't find superclass or interface org.relaxng.datatype.ValidationContext org.dom4j.swing.XMLTableDefinition: can't find superclass or interface org.jaxen.VariableContext org.dom4j.xpath.DefaultNamespaceContext: can't find superclass or interface org.jaxen.NamespaceContext org.dom4j.xpp.ProxyXmlStartTag: can't find superclass or interface org.gjt.xpp.XmlStartTag library class org.xml.sax.ext.Attributes2 extends or implements program class org.xml.sax.Attributes library class org.xml.sax.ext.Attributes2Impl extends or implements program class org.xml.sax.helpers.AttributesImpl library class org.xml.sax.ext.DefaultHandler2 extends or implements program class org.xml.sax.helpers.DefaultHandler library class org.xml.sax.ext.DefaultHandler2 extends or implements program class org.xml.sax.ext.LexicalHandler library class org.xml.sax.ext.DefaultHandler2 extends or implements program class org.xml.sax.ext.DeclHandler library class org.xml.sax.ext.EntityResolver2 extends or implements program class org.xml.sax.EntityResolver library class org.xml.sax.ext.Locator2 extends or implements program class org.xml.sax.Locator library class org.xml.sax.ext.Locator2Impl extends or implements program class org.xml.sax.helpers.LocatorImpl library class org.xmlpull.v1.sax2.Driver extends or implements program class org.xml.sax.Locator library class org.xmlpull.v1.sax2.Driver extends or implements program class org.xml.sax.XMLReader library class org.xmlpull.v1.sax2.Driver extends or implements program class org.xml.sax.Attributes ch.qos.logback.classic.joran.action.JMXConfiguratorAction: can't find referenced class java.lang.management.ManagementFactory ch.qos.logback.core.boolex.JaninoEventEvaluatorBase: can't find referenced class org.codehaus.janino.ExpressionEvaluator ch.qos.logback.core.util.PropertySetter: can't find referenced class java.beans.IntrospectionException ch.qos.logback.core.util.PropertySetter: can't find referenced class java.beans.Introspector ch.qos.logback.core.util.PropertySetter: can't find referenced class java.beans.BeanInfo ch.qos.logback.core.util.PropertySetter: can't find referenced class java.beans.IntrospectionException ch.qos.logback.core.util.PropertySetter: can't find referenced class java.beans.PropertyDescriptor ch.qos.logback.core.util.PropertySetter: can't find referenced class java.beans.MethodDescriptor ch.qos.logback.core.util.PropertySetter: can't find referenced class java.beans.Introspector ch.qos.logback.core.util.PropertySetter: can't find referenced class java.beans.PropertyDescriptor ch.qos.logback.core.util.PropertySetter: can't find referenced class java.beans.MethodDescriptor ch.qos.logback.core.util.PropertySetter: can't find referenced class java.beans.PropertyDescriptor ch.qos.logback.core.util.PropertySetter: can't find referenced class java.beans.MethodDescriptor ch.qos.logback.core.util.PropertySetter: can't find referenced class java.beans.BeanInfo ch.qos.logback.core.util.PropertySetter: can't find referenced class java.beans.IntrospectionException ch.qos.logback.core.util.PropertySetter: can't find referenced class java.beans.PropertyDescriptor com.microsoft.windowsazure.messaging.Registration: can't find referenced method 'java.lang.String getTextContent()' in program class org.w3c.dom.Node javassist.tools.rmi.ObjectImporter: can't find referenced class java.applet.Applet javassist.util.HotSwapper: can't find referenced class com.sun.jdi.connect.Connector$Argument javassist.util.HotSwapper: can't find referenced class com.sun.jdi.connect.Connector javassist.util.HotSwapper: can't find referenced class com.sun.jdi.connect.IllegalConnectorArgumentsException javassist.util.HotSwapper: can't find referenced class com.sun.jdi.connect.AttachingConnector javassist.util.HotSwapper: can't find referenced class com.sun.jdi.connect.Connector$Argument javassist.util.HotSwapper: can't find referenced class com.sun.jdi.connect.AttachingConnector javassist.util.HotSwapper: can't find referenced class com.sun.jdi.VirtualMachine javassist.util.HotSwapper: can't find referenced class com.sun.jdi.Bootstrap javassist.util.HotSwapper: can't find referenced class com.sun.jdi.VirtualMachineManager javassist.util.HotSwapper: can't find referenced class com.sun.jdi.connect.Connector javassist.util.HotSwapper: can't find referenced class com.sun.jdi.request.EventRequestManager javassist.util.HotSwapper: can't find referenced class com.sun.jdi.request.MethodEntryRequest javassist.util.HotSwapper: can't find referenced class com.sun.jdi.request.EventRequestManager javassist.util.HotSwapper: can't find referenced class com.sun.jdi.VirtualMachine javassist.util.HotSwapper: can't find referenced class com.sun.jdi.ReferenceType javassist.util.HotSwapper: can't find referenced class com.sun.jdi.request.MethodEntryRequest javassist.util.HotSwapper: can't find referenced class com.sun.jdi.VirtualMachine javassist.util.HotSwapper: can't find referenced class com.sun.jdi.event.EventQueue javassist.util.HotSwapper: can't find referenced class com.sun.jdi.VirtualMachine javassist.util.HotSwapper: can't find referenced class com.sun.jdi.request.MethodEntryRequest javassist.util.HotSwapper: can't find referenced class com.sun.jdi.connect.AttachingConnector javassist.util.HotSwapper: can't find referenced class com.sun.jdi.request.EventRequestManager javassist.util.HotSwapper: can't find referenced class com.sun.jdi.connect.Connector javassist.util.HotSwapper: can't find referenced class com.sun.jdi.request.EventRequestManager javassist.util.HotSwapper: can't find referenced class com.sun.jdi.request.MethodEntryRequest javassist.util.HotSwapper: can't find referenced class com.sun.jdi.request.EventRequestManager javassist.util.HotSwapper: can't find referenced class com.sun.jdi.request.MethodEntryRequest javassist.util.HotSwapper: can't find referenced class com.sun.jdi.request.EventRequestManager javassist.util.HotSwapper: can't find referenced class com.sun.jdi.request.MethodEntryRequest javassist.util.HotSwapper: can't find referenced class com.sun.jdi.request.EventRequestManager javassist.util.HotSwapper: can't find referenced class com.sun.jdi.request.MethodEntryRequest javassist.util.HotSwapper: can't find referenced class com.sun.jdi.ReferenceType javassist.util.HotSwapper: can't find referenced class com.sun.jdi.event.EventSet javassist.util.HotSwapper: can't find referenced class com.sun.jdi.event.EventQueue javassist.util.HotSwapper$1: can't find referenced class com.sun.jdi.event.EventSet javassist.util.HotSwapper$1: can't find referenced class com.sun.jdi.event.EventIterator javassist.util.HotSwapper$1: can't find referenced class com.sun.jdi.event.MethodEntryEvent javassist.util.HotSwapper$1: can't find referenced class com.sun.jdi.event.Event javassist.util.HotSwapper$1: can't find referenced class com.sun.jdi.event.EventSet javassist.util.HotSwapper$1: can't find referenced class com.sun.jdi.event.Event javassist.util.HotSwapper$1: can't find referenced class com.sun.jdi.event.EventIterator javassist.util.HotSwapper$1: can't find referenced class com.sun.jdi.event.EventSet org.dom4j.DocumentFactory: can't find referenced class org.jaxen.VariableContext org.dom4j.DocumentHelper: can't find referenced class org.jaxen.VariableContext org.dom4j.XPath: can't find referenced class org.jaxen.FunctionContext org.dom4j.XPath: can't find referenced class org.jaxen.NamespaceContext org.dom4j.XPath: can't find referenced class org.jaxen.VariableContext org.dom4j.bean.BeanMetaData: can't find referenced class java.beans.IntrospectionException org.dom4j.bean.BeanMetaData: can't find referenced class java.beans.Introspector org.dom4j.bean.BeanMetaData: can't find referenced class java.beans.BeanInfo org.dom4j.bean.BeanMetaData: can't find referenced class java.beans.PropertyDescriptor org.dom4j.bean.BeanMetaData: can't find referenced class java.beans.BeanInfo org.dom4j.bean.BeanMetaData: can't find referenced class java.beans.IntrospectionException org.dom4j.bean.BeanMetaData: can't find referenced class java.beans.PropertyDescriptor org.dom4j.datatype.DatatypeAttribute: can't find referenced class com.sun.msv.datatype.SerializationContext org.dom4j.datatype.DatatypeAttribute: can't find referenced class org.relaxng.datatype.ValidationContext org.dom4j.datatype.DatatypeAttribute: can't find referenced class com.sun.msv.datatype.xsd.XSDatatype org.dom4j.datatype.DatatypeAttribute: can't find referenced class org.relaxng.datatype.DatatypeException org.dom4j.datatype.DatatypeAttribute: can't find referenced class com.sun.msv.datatype.xsd.XSDatatype org.dom4j.datatype.DatatypeAttribute: can't find referenced class org.relaxng.datatype.DatatypeException org.dom4j.datatype.DatatypeAttribute: can't find referenced class com.sun.msv.datatype.DatabindableDatatype org.dom4j.datatype.DatatypeAttribute: can't find referenced class com.sun.msv.datatype.xsd.XSDatatype org.dom4j.datatype.DatatypeAttribute: can't find referenced class org.relaxng.datatype.DatatypeException org.dom4j.datatype.DatatypeAttribute: can't find referenced class com.sun.msv.datatype.DatabindableDatatype org.dom4j.datatype.DatatypeElement: can't find referenced class com.sun.msv.datatype.SerializationContext org.dom4j.datatype.DatatypeElement: can't find referenced class org.relaxng.datatype.ValidationContext org.dom4j.datatype.DatatypeElement: can't find referenced class com.sun.msv.datatype.DatabindableDatatype org.dom4j.datatype.DatatypeElement: can't find referenced class com.sun.msv.datatype.xsd.XSDatatype org.dom4j.datatype.DatatypeElement: can't find referenced class org.relaxng.datatype.DatatypeException org.dom4j.datatype.DatatypeElement: can't find referenced class com.sun.msv.datatype.xsd.XSDatatype org.dom4j.datatype.DatatypeElement: can't find referenced class org.relaxng.datatype.DatatypeException org.dom4j.datatype.DatatypeElement: can't find referenced class com.sun.msv.datatype.xsd.XSDatatype org.dom4j.datatype.DatatypeElement: can't find referenced class com.sun.msv.datatype.DatabindableDatatype org.dom4j.datatype.DatatypeElement: can't find referenced class org.relaxng.datatype.DatatypeException org.dom4j.datatype.DatatypeElementFactory: can't find referenced class com.sun.msv.datatype.xsd.XSDatatype org.dom4j.datatype.NamedTypeResolver: can't find referenced class com.sun.msv.datatype.xsd.XSDatatype org.dom4j.datatype.SchemaParser: can't find referenced class org.relaxng.datatype.DatatypeException org.dom4j.datatype.SchemaParser: can't find referenced class com.sun.msv.datatype.xsd.TypeIncubator org.dom4j.datatype.SchemaParser: can't find referenced class org.relaxng.datatype.DatatypeException org.dom4j.datatype.SchemaParser: can't find referenced class com.sun.msv.datatype.xsd.XSDatatype org.dom4j.datatype.SchemaParser: can't find referenced class com.sun.msv.datatype.xsd.DatatypeFactory org.dom4j.datatype.SchemaParser: can't find referenced class com.sun.msv.datatype.xsd.XSDatatype org.dom4j.datatype.SchemaParser: can't find referenced class org.relaxng.datatype.DatatypeException org.dom4j.datatype.SchemaParser: can't find referenced class com.sun.msv.datatype.xsd.XSDatatype org.dom4j.datatype.SchemaParser: can't find referenced class com.sun.msv.datatype.xsd.TypeIncubator org.dom4j.datatype.SchemaParser: can't find referenced class org.relaxng.datatype.ValidationContext org.dom4j.datatype.SchemaParser: can't find referenced class com.sun.msv.datatype.xsd.XSDatatype org.dom4j.datatype.SchemaParser: can't find referenced class org.relaxng.datatype.DatatypeException org.dom4j.datatype.SchemaParser: can't find referenced class com.sun.msv.datatype.xsd.XSDatatype org.dom4j.io.XPPReader: can't find referenced class org.gjt.xpp.XmlPullParserException org.dom4j.io.XPPReader: can't find referenced class org.gjt.xpp.XmlPullParser org.dom4j.io.XPPReader: can't find referenced class org.gjt.xpp.XmlPullParserFactory org.dom4j.io.XPPReader: can't find referenced class org.gjt.xpp.XmlPullParser org.dom4j.io.XPPReader: can't find referenced class org.gjt.xpp.XmlPullParserFactory org.dom4j.io.XPPReader: can't find referenced class org.gjt.xpp.XmlEndTag org.dom4j.io.XPPReader: can't find referenced class org.gjt.xpp.XmlPullParser org.dom4j.io.XPPReader: can't find referenced class org.gjt.xpp.XmlPullParserFactory org.dom4j.io.XPPReader: can't find referenced class org.gjt.xpp.XmlPullParser org.dom4j.io.XPPReader: can't find referenced class org.gjt.xpp.XmlPullParserFactory org.dom4j.io.XPPReader: can't find referenced class org.gjt.xpp.XmlPullParser org.dom4j.io.XPPReader: can't find referenced class org.gjt.xpp.XmlEndTag org.dom4j.rule.Stylesheet: can't find referenced class org.jaxen.XPath org.dom4j.swing.DocumentTreeModel: can't find referenced method 'void setRoot(javax.swing.tree.TreeNode)' in program class org.dom4j.swing.DocumentTreeModel org.dom4j.swing.XMLTableDefinition: can't find referenced class org.jaxen.VariableContext org.dom4j.util.ProxyDocumentFactory: can't find referenced class org.jaxen.VariableContext org.dom4j.xpath.DefaultNamespaceContext: can't find referenced class org.jaxen.NamespaceContext org.dom4j.xpath.DefaultXPath: can't find referenced class org.jaxen.XPath org.dom4j.xpath.DefaultXPath: can't find referenced class org.jaxen.SimpleNamespaceContext org.dom4j.xpath.DefaultXPath: can't find referenced class org.jaxen.XPath org.dom4j.xpath.DefaultXPath: can't find referenced class org.jaxen.JaxenException org.dom4j.xpath.DefaultXPath: can't find referenced class org.jaxen.XPath org.dom4j.xpath.DefaultXPath: can't find referenced class org.jaxen.dom4j.Dom4jXPath org.dom4j.xpath.DefaultXPath: can't find referenced class org.jaxen.JaxenException org.dom4j.xpath.DefaultXPath: can't find referenced class org.jaxen.XPath org.dom4j.xpath.DefaultXPath: can't find referenced class org.jaxen.NamespaceContext org.dom4j.xpath.DefaultXPath: can't find referenced class org.jaxen.FunctionContext org.dom4j.xpath.DefaultXPath: can't find referenced class org.jaxen.NamespaceContext org.dom4j.xpath.DefaultXPath: can't find referenced class org.jaxen.VariableContext org.dom4j.xpath.DefaultXPath: can't find referenced class org.jaxen.JaxenException org.dom4j.xpath.DefaultXPath: can't find referenced class org.jaxen.XPath org.dom4j.xpath.DefaultXPath: can't find referenced class org.jaxen.JaxenException org.dom4j.xpath.XPathPattern: can't find referenced class org.jaxen.pattern.Pattern org.dom4j.xpath.XPathPattern: can't find referenced class org.jaxen.Context org.dom4j.xpath.XPathPattern: can't find referenced class org.jaxen.saxpath.SAXPathException org.dom4j.xpath.XPathPattern: can't find referenced class org.jaxen.pattern.PatternParser org.dom4j.xpath.XPathPattern: can't find referenced class org.jaxen.saxpath.SAXPathException org.dom4j.xpath.XPathPattern: can't find referenced class org.jaxen.JaxenException org.dom4j.xpath.XPathPattern: can't find referenced class org.jaxen.Context org.dom4j.xpath.XPathPattern: can't find referenced class org.jaxen.pattern.Pattern org.dom4j.xpath.XPathPattern: can't find referenced class org.jaxen.Context org.dom4j.xpath.XPathPattern: can't find referenced class org.jaxen.ContextSupport org.dom4j.xpath.XPathPattern: can't find referenced class org.jaxen.SimpleNamespaceContext org.dom4j.xpath.XPathPattern: can't find referenced class org.jaxen.XPathFunctionContext org.dom4j.xpath.XPathPattern: can't find referenced class org.jaxen.SimpleVariableContext org.dom4j.xpath.XPathPattern: can't find referenced class org.jaxen.dom4j.DocumentNavigator org.dom4j.xpath.XPathPattern: can't find referenced class org.jaxen.ContextSupport org.dom4j.xpath.XPathPattern: can't find referenced class org.jaxen.pattern.Pattern org.dom4j.xpath.XPathPattern: can't find referenced class org.jaxen.Context org.dom4j.xpath.XPathPattern: can't find referenced class org.jaxen.pattern.Pattern org.dom4j.xpath.XPathPattern: can't find referenced class org.jaxen.saxpath.SAXPathException org.dom4j.xpath.XPathPattern: can't find referenced class org.jaxen.JaxenException org.dom4j.xpath.XPathPattern: can't find referenced class org.jaxen.pattern.Pattern org.dom4j.xpath.XPathPattern: can't find referenced class org.jaxen.VariableContext org.dom4j.xpath.XPathPattern: can't find referenced class org.jaxen.ContextSupport org.dom4j.xpath.XPathPattern: can't find referenced class org.jaxen.JaxenException org.dom4j.xpp.ProxyXmlStartTag: can't find referenced class org.gjt.xpp.XmlStartTag org.dom4j.xpp.ProxyXmlStartTag: can't find referenced class org.gjt.xpp.XmlPullParserException org.slf4j.LoggerFactory: can't find referenced field 'java.lang.String REQUESTED_API_VERSION' in program class org.slf4j.impl.StaticLoggerBinder org.slf4j.LoggerFactory: can't find referenced method 'org.slf4j.impl.StaticLoggerBinder getSingleton()' in program class org.slf4j.impl.StaticLoggerBinder library class android.util.Xml depends on program class org.xml.sax.ContentHandler there were 316 unresolved references to classes or interfaces. there were 14 instances of library classes depending on program classes. there were 4 unresolved references to program class members. Exception while processing task java.io.IOException: Please correct the above warnings first.
Вот такая вот простыня... Попробовал добавить костыльный hotfix:
-keepclassmembers class ** { *; }
но это не помогло. Кто сталкивался с подобной проблемой? Как ее можно быстро решить?


Ответ

Проблема оказалась в следующем: один из разработчиков заиспользовал для своей версии reflections из java, которая была подключена с помощью maven. Он использовал ее в своем productFlavors, но подключил в общий gradle файл. В общем удалив это безобразие, мы получили рабочую сборку! Если что, такую ошибку вызывает:
implementation group: 'org.reflections', name: 'reflections', version: '0.9.5-RC2'
Спасибо всем за участие!

Комментариев нет:

Отправить комментарий