您的位置:首页 > Web前端

用mm编译APK时大量can't find referenced method的问题的解决

2016-11-11 19:57 746 查看
今天在源码里面编译APK的时候,遇到一个莫名其妙的错误,中断了调试,很是恼火,百度google查了很久没结果,打印如下:

Warning: antlr.debug.misc.ASTFrame: can't find superclass or interface javax.swing.JFrame
Warning: antlr.debug.misc.ASTFrame$1: can't find superclass or interface java.awt.event.WindowAdapter
Warning: antlr.debug.misc.ASTFrame$MyTreeSelectionListener: can't find superclass or interface javax.swing.event.TreeSelectionListener
Warning: antlr.debug.misc.JTreeASTModel: can't find superclass or interface javax.swing.tree.TreeModel
Warning: antlr.debug.misc.JTreeASTPanel: can't find superclass or interface javax.swing.JPanel
Warning: org.apache.tools.ant.Main: can't find superclass or interface org.apache.tools.ant.launch.AntMain
Warning: antlr.debug.misc.ASTFrame: can't find referenced class javax.swing.JFrame
Warning: antlr.debug.misc.ASTFrame: can't find referenced method 'java.awt.Container getContentPane()' in program class antlr.debug.misc.ASTFrame
Warning: antlr.debug.misc.ASTFrame: can't find referenced class java.awt.Container
Warning: antlr.debug.misc.ASTFrame: can't find referenced method 'void addWindowListener(java.awt.event.WindowListener)' in program class antlr.debug.misc.ASTFrame
Warning: antlr.debug.misc.ASTFrame: can't find referenced method 'void setSize(int,int)' in program class antlr.debug.misc.ASTFrame
Warning: antlr.debug.misc.ASTFrame: can't find referenced method 'void setVisible(boolean)' in program class antlr.debug.misc.ASTFrame
Warning: antlr.debug.misc.ASTFrame: can't find referenced class javax.swing.JFrame
Warning: antlr.debug.misc.ASTFrame: can't find referenced class java.awt.Container
Warning: antlr.debug.misc.ASTFrame$1: can't find referenced class java.awt.event.WindowAdapter
Warning: antlr.debug.misc.ASTFrame$1: can't find referenced class java.awt.event.WindowEvent
Warning: antlr.debug.misc.ASTFrame$1: can't find referenced class java.awt.Frame
Warning: antlr.debug.misc.ASTFrame$1: can't find referenced class java.awt.Frame
Warning: antlr.debug.misc.ASTFrame$1: can't find referenced class java.awt.Frame
Warning: antlr.debug.misc.ASTFrame$1: can't find referenced class java.awt.event.WindowAdapter
Warning: antlr.debug.misc.ASTFrame$1: can't find referenced class java.awt.event.WindowEvent
Warning: antlr.debug.misc.ASTFrame$1: can't find referenced class java.awt.event.WindowEvent
Warning: antlr.debug.misc.ASTFrame$MyTreeSelectionListener: can't find referenced class javax.swing.event.TreeSelectionEvent
Warning: antlr.debug.misc.ASTFrame$MyTreeSelectionListener: can't find referenced class javax.swing.tree.TreePath
Warning: antlr.debug.misc.ASTFrame$MyTreeSelectionListener: can't find referenced class javax.swing.tree.TreePath
Warning: antlr.debug.misc.ASTFrame$MyTreeSelectionListener: can't find referenced class javax.swing.event.TreeSelectionListener
Warning: antlr.debug.misc.ASTFrame$MyTreeSelectionListener: can't find referenced class javax.swing.event.TreeSelectionEvent
Warning: antlr.debug.misc.ASTFrame$MyTreeSelectionListener: can't find referenced class javax.swing.tree.TreePath
Warning: antlr.debug.misc.ASTFrame$MyTreeSelectionListener: can't find referenced class javax.swing.event.TreeSelectionEvent
Warning: antlr.debug.misc.JTreeASTModel: can't find referenced class javax.swing.tree.TreeModel
Warning: antlr.debug.misc.JTreeASTModel: can't find referenced class javax.swing.event.TreeModelListener
Warning: antlr.debug.misc.JTreeASTModel: can't find referenced class javax.swing.event.TreeModelListener
Warning: antlr.debug.misc.JTreeASTModel: can't find referenced class javax.swing.tree.TreePath
Warning: antlr.debug.misc.JTreeASTPanel: can't find referenced class javax.swing.JPanel
Warning: antlr.debug.misc.JTreeASTPanel: can't find referenced class java.awt.BorderLayout
Warning: antlr.debug.misc.JTreeASTPanel: can't find referenced class java.awt.BorderLayout
Warning: antlr.debug.misc.JTreeASTPanel: can't find referenced method 'void setLayout(java.awt.LayoutManager)' in program class antlr.debug.misc.JTreeASTPanel
Warning: antlr.debug.misc.JTreeASTPanel: can't find referenced class javax.swing.JTree
Warning: antlr.debug.misc.JTreeASTPanel: can't find referenced class javax.swing.JTree
Warning: antlr.debug.misc.JTreeASTPanel: can't find referenced class javax.swing.JTree
Warning: antlr.debug.misc.JTreeASTPanel: can't find referenced class javax.swing.JTree
Warning: antlr.debug.misc.JTreeASTPanel: can't find referenced class javax.swing.JScrollPane
Warning: antlr.debug.misc.JTreeASTPanel: can't find referenced class javax.swing.JScrollPane
Warning: antlr.debug.misc.JTreeASTPanel: can't find referenced class javax.swing.JScrollPane
Warning: antlr.debug.misc.JTreeASTPanel: can't find referenced class javax.swing.JViewport
Warning: antlr.debug.misc.JTreeASTPanel: can't find referenced method 'void add(java.awt.Component,java.lang.Object)' in program class antlr.debug.misc.JTreeASTPanel
Warning: antlr.debug.misc.JTreeASTPanel: can't find referenced class javax.swing.JPanel
Warning: antlr.debug.misc.JTreeASTPanel: can't find referenced class javax.swing.JViewport
Warning: antlr.debug.misc.JTreeASTPanel: can't find referenced class javax.swing.JTree
Warning: antlr.debug.misc.JTreeASTPanel: can't find referenced class javax.swing.tree.TreeModel
Warning: antlr.debug.misc.JTreeASTPanel: can't find referenced class javax.swing.event.TreeSelectionListener
Warning: info.monitorenter.cpdetector.TestCodepageProcessor: can't find referenced class org.junit.Test
Warning: info.monitorenter.cpdetector.TestCodepageProcessor: can't find referenced class org.junit.Test
Warning: info.monitorenter.cpdetector.io.ByteOrderMarkDetectorTest: can't find referenced class org.junit.Assert
Warning: info.monitorenter.cpdetector.io.ByteOrderMarkDetectorTest: can't find referenced class org.junit.Assert
Warning: info.monitorenter.cpdetector.io.ByteOrderMarkDetectorTest: can't find referenced class org.junit.Assert
Warning: info.monitorenter.cpdetector.io.ByteOrderMarkDetectorTest: can't find referenced class org.junit.Test
Warning: info.monitorenter.cpdetector.io.ByteOrderMarkDetectorTest: can't find referenced class org.junit.Test
Warning: info.monitorenter.cpdetector.io.ByteOrderMarkDetectorTest: can't find referenced class org.junit.Test
Warning: info.monitorenter.cpdetector.io.ByteOrderMarkDetectorTest: can't find referenced class org.junit.Test
Warning: info.monitorenter.cpdetector.io.ByteOrderMarkDetectorTest: can't find referenced class org.junit.Test
Warning: info.monitorenter.cpdetector.io.ByteOrderMarkDetectorTest: can't find referenced class org.junit.Test
Warning: info.monitorenter.cpdetector.io.ByteOrderMarkDetectorTest: can't find referenced class org.junit.Test
Warning: info.monitorenter.cpdetector.io.CodePageDetectorProxyTest: can't find referenced class org.junit.Assert
Warning: info.monitorenter.cpdetector.io.CodePageDetectorProxyTest: can't find referenced class org.junit.Assert
Warning: info.monitorenter.cpdetector.io.CodePageDetectorProxyTest: can't find referenced class org.junit.Assert
Warning: info.monitorenter.cpdetector.io.CodePageDetectorProxyTest: can't find referenced class org.junit.Assert
Warning: info.monitorenter.cpdetector.io.CodePageDetectorProxyTest: can't find referenced class org.junit.Assert
Warning: info.monitorenter.cpdetector.io.CodePageDetectorProxyTest: can't find referenced class org.junit.Before
Warning: info.monitorenter.cpdetector.io.CodePageDetectorProxyTest: can't find referenced class org.junit.After
Warning: info.monitorenter.cpdetector.io.CodePageDetectorProxyTest: can't find referenced class org.junit.Test
Warning: info.monitorenter.cpdetector.io.CodePageDetectorProxyTest: can't find referenced class org.junit.Test
Warning: info.monitorenter.cpdetector.io.CodePageDetectorProxyTest: can't find referenced class org.junit.Test
Warning: org.apache.tools.ant.AntClassLoader: can't find referenced class org.apache.tools.ant.launch.Locator
Warning: org.apache.tools.ant.AntClassLoader: can't find referenced class org.apache.tools.ant.launch.Locator
Warning: org.apache.tools.ant.ComponentHelper: can't find referenced class org.apache.tools.ant.launch.Launcher
Warning: org.apache.tools.ant.ComponentHelper: can't find referenced class org.apache.tools.ant.launch.Launcher
Warning: org.apache.tools.ant.Diagnostics: can't find referenced class org.apache.tools.ant.launch.Launcher
Warning: org.apache.tools.ant.Diagnostics: can't find referenced class org.apache.tools.ant.launch.Launcher
Warning: org.apache.tools.ant.Main: can't find referenced class org.apache.tools.ant.launch.AntMain
Warning: org.apache.tools.ant.Project: can't find referenced class org.apache.tools.ant.launch.Locator
Warning: org.apache.tools.ant.Project: can't find referenced class org.apache.tools.ant.launch.Locator
Warning: org.apache.tools.ant.helper.ProjectHelper2: can't find referenced class org.apache.tools.ant.launch.Locator
Warning: org.apache.tools.ant.helper.ProjectHelper2: can't find referenced class org.apache.tools.ant.launch.Locator
Warning: org.apache.tools.ant.taskdefs.ManifestClassPath: can't find referenced class org.apache.tools.ant.launch.Locator
Warning: org.apache.tools.ant.taskdefs.ManifestClassPath: can't find referenced class org.apache.tools.ant.launch.Locator
Warning: org.apache.tools.ant.taskdefs.Rmic: can't find referenced class java.rmi.Remote
Warning: org.apache.tools.ant.taskdefs.optional.javah.SunJavah: can't find referenced class org.apache.tools.ant.launch.Locator
Warning: org.apache.tools.ant.taskdefs.optional.javah.SunJavah: can't find reference
abb8
d class org.apache.tools.ant.launch.Locator
Warning: org.apache.tools.ant.util.FileUtils: can't find referenced class org.apache.tools.ant.launch.Locator
Warning: org.apache.tools.ant.util.FileUtils: can't find referenced class org.apache.tools.ant.launch.Locator
Warning: org.apache.tools.ant.util.LoaderUtils: can't find referenced class org.apache.tools.ant.launch.Locator
Warning: org.apache.tools.ant.util.LoaderUtils: can't find referenced class org.apache.tools.ant.launch.Locator
Warning: org.apache.tools.ant.util.LoaderUtils: can't find referenced class org.apache.tools.ant.launch.Locator
Warning: org.apache.tools.ant.util.ProcessUtil: can't find referenced class java.lang.management.ManagementFactory
Warning: org.apache.tools.ant.util.ProcessUtil: can't find referenced class java.lang.management.RuntimeMXBean
Warning: org.apache.tools.ant.util.ProcessUtil: can't find referenced class java.lang.management.ManagementFactory
Warning: org.apache.tools.ant.util.ProcessUtil: can't find referenced class java.lang.management.RuntimeMXBean
Warning: there were 92 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)
Warning: there were 6 unresolved references to program class members.
Your input classes appear to be inconsistent.
You may need to recompile the code.
(http://proguard.sourceforge.net/manual/troubleshooting.html#unresolvedprogramclassmember)
Error: Please correct the above warnings first.

最后还是得靠自己,解决方法是在Android.mk中添加下面这一行:
LOCAL_PROGUARD_ENABLED := disabled

编译通过!

妹的,不做代码混淆就通过了,默认是要做混淆的,大量的报错。
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签:  Android apk 源码
相关文章推荐