wu1164624041 发表于 2024-8-22 09:33:23

不调用电子表格生成文件就不会报错

---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
--- 开始编译项目"自动机_Pro"(请不要在中途拔出加密狗):
载入全局翻译词库文件"default_tlib.txt"成功,其中共有 53 个有效词条.
警告: 所指定的安卓APK输出文件纯名称"自动机_Pro"不为有效的英文名称,这将可能导致编译后的APK安装到目的设备失败.如果项目名称中包括中文字符,请将项目属性"所输出APK文件纯名称"的值设置为一个纯英文名称即可. 已将安卓APK输出文件纯名称修改为默认名称"VolUserApp".
编译生成对应的Java源文件到目录"I:\G_1\_int\自动机_Pro\debug\project\src"成功 [双击可跳转]
正在链接生成安卓APK输出文件"I:\G_1\_int\自动机_Pro\debug\linker\VolUserApp.apk"
当前程序编译时所需求安卓SDK API版本: 30, 实际所使用版本: 30;运行时所需求API版本: 28
当前程序所需求Java SDK版本: 1.8;实际所使用版本: 1.8
正在进行"编译Java源文件"工作,请稍候...
正在进行"生成DEX文件"工作,请稍候...
错误:
    步骤"生成DEX文件"执行失败
    Warning in libs\xmlbeans-2.3.0.jar:org/apache/xmlbeans/impl/jam/internal/javadoc/JavadocRunner.class:
      Type `com.sun.tools.javadoc.Main` was not found, it is required for default or static interface methods desugaring of `com.sun.javadoc.RootDoc org.apache.xmlbeans.impl.jam.internal.javadoc.JavadocRunner.run(java.io.File[], java.io.PrintWriter, java.lang.String, java.lang.String, java.lang.String[], org.apache.xmlbeans.impl.jam.provider.JamLogger)`
    Warning in libs\poi-3.9-20121203.jar:org/apache/poi/util/FontMetricsDumper.class:
      Type `java.awt.GraphicsEnvironment` was not found, it is required for default or static interface methods desugaring of `void org.apache.poi.util.FontMetricsDumper.main(java.lang.String[])`
    Warning in libs\poi-3.9-20121203.jar:org/apache/poi/util/FontMetricsDumper.class:
      Type `java.awt.Toolkit` was not found, it is required for default or static interface methods desugaring of `void org.apache.poi.util.FontMetricsDumper.main(java.lang.String[])`
    Warning in libs\poi-3.9-20121203.jar:org/apache/poi/ss/util/SheetUtil.class:
      Type `java.awt.geom.AffineTransform` was not found, it is required for default or static interface methods desugaring of `double org.apache.poi.ss.util.SheetUtil.getCellWidth(org.apache.poi.ss.usermodel.Cell, int, org.apache.poi.ss.usermodel.DataFormatter, boolean)`
    Warning in libs\dom4j-1.6.1.jar:org/dom4j/jaxb/JAXBSupport.class:
      Type `javax.xml.bind.JAXBContext` was not found, it is required for default or static interface methods desugaring of `javax.xml.bind.JAXBContext org.dom4j.jaxb.JAXBSupport.getContext()`
    Warning in libs\poi-ooxml-3.9-20121203.jar:org/apache/poi/util/OOXMLLite.class:
      Type `junit.textui.TestRunner` was not found, it is required for default or static interface methods desugaring of `void org.apache.poi.util.OOXMLLite.build()`
    Warning in libs\aar_android-gif-drawable-1_classes.jar:pl/droidsonroids/gif/LibraryLoader.class:
      Type `pl.droidsonroids.relinker.ReLinker` was not found, it is required for default or static interface methods desugaring of `void pl.droidsonroids.gif.LibraryLoader.loadLibrary()`
    Warning in libs\dom4j-1.6.1.jar:org/dom4j/bean/BeanMetaData.class:
      Type `java.beans.Introspector` was not found, it is required for default or static interface methods desugaring of `void org.dom4j.bean.BeanMetaData.<init>(java.lang.Class)`
    Warning in libs\poi-3.9-20121203.jar:org/apache/poi/poifs/crypt/EncryptionHeader.class:
      Type `org.apache.commons.codec.binary.Base64` was not found, it is required for default or static interface methods desugaring of `void org.apache.poi.poifs.crypt.EncryptionHeader.<init>(java.lang.String)`
    Warning in libs\poi-3.9-20121203.jar:org/apache/poi/ss/util/ImageUtils.class:
      Type `javax.imageio.ImageIO` was not found, it is required for default or static interface methods desugaring of `java.awt.Dimension org.apache.poi.ss.util.ImageUtils.getImageDimension(java.io.InputStream, int)`
    Warning in libs\poi-3.9-20121203.jar:org/apache/poi/util/CommonsLogger.class:
      Type `org.apache.commons.logging.LogFactory` was not found, it is required for default or static interface methods desugaring of `void org.apache.poi.util.CommonsLogger.<clinit>()`
    Warning in libs\dom4j-1.6.1.jar:org/dom4j/xpath/XPathPattern.class:
      Type `org.jaxen.pattern.PatternParser` was not found, it is required for default or static interface methods desugaring of `void org.dom4j.xpath.XPathPattern.<init>(java.lang.String)`
    Warning in libs\dom4j-1.6.1.jar:org/dom4j/xpath/XPathPattern.class:
      Type `org.jaxen.XPathFunctionContext` was not found, it is required for default or static interface methods desugaring of `org.jaxen.ContextSupport org.dom4j.xpath.XPathPattern.getContextSupport()`
    Warning in libs\dom4j-1.6.1.jar:org/dom4j/xpath/XPathPattern.class:
      Type `org.jaxen.dom4j.DocumentNavigator` was not found, it is required for default or static interface methods desugaring of `org.jaxen.ContextSupport org.dom4j.xpath.XPathPattern.getContextSupport()`
    Warning in libs\poi-ooxml-3.9-20121203.jar:org/apache/poi/xslf/usermodel/RenderableShape.class:
      Type `java.awt.AlphaComposite` was not found, it is required for default or static interface methods desugaring of `java.awt.Paint org.apache.poi.xslf.usermodel.RenderableShape.createTexturePaint(org.openxmlformats.schemas.drawingml.x2006.main.CTBlipFillProperties, java.awt.Graphics2D, org.apache.poi.openxml4j.opc.PackagePart)`
    Warning in libs\dom4j-1.6.1.jar:org/dom4j/io/XPPReader.class:
      Type `org.gjt.xpp.XmlPullParserFactory` was not found, it is required for default or static interface methods desugaring of `org.gjt.xpp.XmlPullParserFactory org.dom4j.io.XPPReader.getXPPFactory()`
    Warning in libs\dom4j-1.6.1.jar:org/dom4j/datatype/SchemaParser.class:
      Type `com.sun.msv.datatype.xsd.DatatypeFactory` was not found, it is required for default or static interface methods desugaring of `com.sun.msv.datatype.xsd.XSDatatype org.dom4j.datatype.SchemaParser.getTypeByName(java.lang.String)`
    Warning in libs\poi-3.9-20121203.jar:org/apache/poi/hssf/usermodel/HSSFWorkbook.class:
      Type `org.apache.commons.codec.digest.DigestUtils` was not found, it is required for default or static interface methods desugaring of `int org.apache.poi.hssf.usermodel.HSSFWorkbook.addPicture(byte[], int)`
    Warning in libs\dom4j-1.6.1.jar:org/dom4j/datatype/DatatypeElement.class:
      Type `com.sun.msv.datatype.SerializationContext` was not found, it is required for default or static interface methods desugaring of `org.dom4j.datatype.DatatypeElement`
    Warning in libs\dom4j-1.6.1.jar:org/dom4j/datatype/DatatypeElement.class:
      Type `org.relaxng.datatype.ValidationContext` was not found, it is required for default or static interface methods desugaring of `org.dom4j.datatype.DatatypeElement`
    Warning in libs\xmlbeans-2.3.0.jar:org/apache/xmlbeans/impl/jam/internal/javadoc/JavadocRunner.class:
      Type `com.sun.javadoc.Doclet` was not found, it is required for default or static interface methods desugaring of `org.apache.xmlbeans.impl.jam.internal.javadoc.JavadocRunner`
    Warning in libs\dom4j-1.6.1.jar:org/dom4j/swing/DocumentTreeModel.class:
      Type `javax.swing.tree.DefaultTreeModel` was not found, it is required for default or static interface methods desugaring of `org.dom4j.swing.DocumentTreeModel`
    Warning in libs\xmlbeans-2.3.0.jar:org/apache/xmlbeans/impl/tool/XMLBean.class:
      Type `org.apache.tools.ant.taskdefs.MatchingTask` was not found, it is required for default or static interface methods desugaring of `org.apache.xmlbeans.impl.tool.XMLBean`
    Warning in libs\poi-3.9-20121203.jar:org/apache/poi/hssf/usermodel/EscherGraphics.class:
      Type `java.awt.Graphics` was not found, it is required for default or static interface methods desugaring of `org.apache.poi.hssf.usermodel.EscherGraphics`
    Warning in libs\dom4j-1.6.1.jar:org/dom4j/swing/XMLTableDefinition.class:
      Type `org.jaxen.VariableContext` was not found, it is required for default or static interface methods desugaring of `org.dom4j.swing.XMLTableDefinition`
    Warning in libs\dom4j-1.6.1.jar:org/dom4j/xpath/DefaultNamespaceContext.class:
      Type `org.jaxen.NamespaceContext` was not found, it is required for default or static interface methods desugaring of `org.dom4j.xpath.DefaultNamespaceContext`
    Warning in libs\poi-ooxml-3.9-20121203.jar:org/apache/poi/xslf/usermodel/XSLFRenderingHint.class:
      Type `java.awt.RenderingHints$Key` was not found, it is required for default or static interface methods desugaring of `org.apache.poi.xslf.usermodel.XSLFRenderingHint`
    Warning in libs\poi-3.9-20121203.jar:org/apache/poi/hssf/usermodel/EscherGraphics2d.class:
      Type `java.awt.Graphics2D` was not found, it is required for default or static interface methods desugaring of `org.apache.poi.hssf.usermodel.EscherGraphics2d`
    Warning in libs\dom4j-1.6.1.jar:org/dom4j/swing/LeafTreeNode.class:
      Type `javax.swing.tree.TreeNode` was not found, it is required for default or static interface methods desugaring of `org.dom4j.swing.LeafTreeNode`
    Warning in libs\dom4j-1.6.1.jar:org/dom4j/xpp/ProxyXmlStartTag.class:
      Type `org.gjt.xpp.XmlStartTag` was not found, it is required for default or static interface methods desugaring of `org.dom4j.xpp.ProxyXmlStartTag`
    Warning in libs\dom4j-1.6.1.jar:org/dom4j/swing/XMLTableModel.class:
      Type `javax.swing.table.AbstractTableModel` was not found, it is required for default or static interface methods desugaring of `org.dom4j.swing.XMLTableModel`
    Error: Cannot fit requested classes in a single dex file (# methods: 129185 > 65536). Try supplying a main-dex list
    Compilation failed
错误: 建立所指定的安卓APK输出文件"I:\G_1\_int\自动机_Pro\debug\linker\VolUserApp.apk"失败
--- 项目"自动机_Pro"编译或链接失败. 编译过程中共遇到了 1 个警告, 2 个错误.


wu1164624041 发表于 2024-8-22 10:34:20

以解决(结贴)
目标安卓平台SDK的API级别选择 【 30(10.0+版(R))】
启用APK分包机制 【必须填写 真,默认是假】
使用D8生成DEX    【必须填写 真,默认是假】
进行v2签名         【必须填写 真,默认是假】
   大楷就是这样

创世魂 发表于 2024-8-22 12:17:02

wu1164624041 发表于 2024-8-22 10:34
以解决(结贴)
目标安卓平台SDK的API级别选择 【 30(10.0+版(R))】
启用APK分包机制 【必须填写 真,默认 ...

是的,启用d8,启用apk分包。
页: [1]
查看完整版本: 不调用电子表格生成文件就不会报错