0

Nutiteq マップを使用する midlet があり、Netbeans で開発しました。ライブラリ jar をプロジェクトに追加しました。すべて正常に動作します。問題は、難読化すると次のようになることです。

Note: duplicate definition of library class [javax.microedition.media.control.ToneControl]
Note: duplicate definition of library class [javax.microedition.media.control.VolumeControl]
Note: duplicate definition of library class [javax.microedition.media.Control]
Note: duplicate definition of library class [javax.microedition.media.Controllable]
Note: duplicate definition of library class [javax.microedition.media.Manager]
Note: duplicate definition of library class [javax.microedition.media.MediaException]
Note: duplicate definition of library class [javax.microedition.media.Player]
Note: duplicate definition of library class [javax.microedition.media.PlayerListener]
Note: duplicate definition of library class [javax.microedition.media.protocol.DataSource]
Note: there were 9 duplicate class definitions.
Warning: com.nutiteq.fs.MotoFileSystem: can't find referenced class com.motorola.io.FileConnection
Warning: com.nutiteq.fs.MotoFileSystem: can't find referenced class com.motorola.io.FileSystemRegistry
Warning: com.nutiteq.fs.MotoFileSystem: can't find referenced class com.motorola.io.FileSystemRegistry
Warning: com.nutiteq.fs.MotoFileSystem: can't find referenced class com.motorola.io.FileConnection
Warning: com.nutiteq.fs.MotoFileSystem: can't find referenced class com.motorola.io.FileConnection
Warning: com.nutiteq.fs.MotoFileSystem: can't find referenced class com.motorola.io.FileConnection
Warning: com.nutiteq.fs.MotoFileSystem: can't find referenced class com.motorola.io.FileConnection
Warning: com.nutiteq.fs.IDENFileSystem: can't find referenced class com.motorola.io.file.FileConnection
Warning: com.nutiteq.fs.IDENFileSystem: can't find referenced class com.motorola.io.file.FileConnection
Warning: com.nutiteq.fs.IDENFileSystem: can't find referenced class com.motorola.io.file.FileConnection
Warning: com.nutiteq.fs.IDENFileSystem: can't find referenced class com.motorola.io.file.FileConnection
Warning: com.nutiteq.fs.IDENFileSystem: can't find referenced class com.motorola.io.file.FileConnection
Note: com.sun.lwuit.impl.midp.GameCanvasImplementation: can't find dynamically referenced class com.siemens.mp.game.Light
Note: com.sun.lwuit.impl.midp.GameCanvasImplementation: can't find dynamically referenced class com.motorola.phonebook.PhoneBookRecord
Note: com.sun.lwuit.impl.midp.GameCanvasImplementation: can't find dynamically referenced class com.nokia.mid.ui.FullCanvas
Note: com.sun.lwuit.impl.midp.GameCanvasImplementation: can't find dynamically referenced class net.rim.device.api.system.Application
Note: com.sun.lwuit.impl.midp.GameCanvasImplementation: can't find dynamically referenced class com.mot.iden.util.Base64
Note: com.sun.lwuit.impl.midp.GameCanvasImplementation: can't find dynamically referenced class mmpp.media.MediaPlayer
  You should check if you need to specify additional program jars.
Warning: there were 12 unresolved references to classes or interfaces.
     You may need to specify additional library jars (using '-libraryjars'),
     or perhaps the '-dontskipnonpubliclibraryclasses' option.
Error: Please correct the above warnings first.
Note: there were 6 unresolved dynamic references to classes or interfaces.

lwuit ライブラリを使用していますが、マップ ライブラリを含めるまで問題はありません。

私はこのページが言うことをしました: http://www.nutiteq.com/j2me-maps-forum

そして今、私はこれを取得します:

.
.
.
te: duplicate definition of library class [com.sun.cldc.i18n.uclc.DefaultCaseConverter]
Note: duplicate definition of library class [com.sun.j2mews.xml.rpc.OperationImpl]
Note: duplicate definition of library class [com.sun.j2mews.xml.rpc.SOAPDecoder]
Note: duplicate definition of library class [com.sun.j2mews.xml.rpc.SOAPEncoder]
Note: duplicate definition of library class [com.sun.ukit.jaxp.Parser]
Note: duplicate definition of library class [com.sun.ukit.jaxp.ParserFactory]
Note: duplicate definition of library class [com.sun.ukit.jaxp.ReaderUTF16]
Note: duplicate definition of library class [com.sun.ukit.jaxp.ReaderUTF8]
Note: there were 564 duplicate class definitions.
Note: com.sun.lwuit.impl.midp.GameCanvasImplementation: can't find dynamically referenced class com.motorola.phonebook.PhoneBookRecord
Note: com.sun.lwuit.impl.midp.GameCanvasImplementation: can't find dynamically referenced class mmpp.media.MediaPlayer
Note: there were 2 unresolved dynamic references to classes or interfaces.
  You should check if you need to specify additional program jars.
Unexpected error while evaluating instruction:
Class       = [a]
Method      = [a$623fafe4(Ljava/lang/String;CI)[Ljava/lang/String;]
Instruction = [85] iload_3 v3
Exception   = [java.lang.NullPointerException] (null)
Unexpected error while performing partial evaluation:
Class       = [a]
Method      = [a$623fafe4(Ljava/lang/String;CI)[Ljava/lang/String;]
Exception   = [java.lang.NullPointerException] (null)
Error: null
4

1 に答える 1

0

重複するクラスは一般的に無害ですが、構成で同じクラスを2回含むjarで-libraryjarsオプションが指定されていることを示しています。それらの重複を削除する方がクリーンです。それ以外の場合は、-dontnoteを指定して、これらのメモを非表示にすることができます。

予期しないエラーはProGuardのバグです。最新バージョン(現時点では4.8または4.9ベータ版)を使用していることを確認する必要があります。問題が解決しない場合は、ProGuard Webサイトで報告するか、問題を再現できる小さなプロジェクトを添えて私に郵送してください。-dontoptimizeを使用して最適化をオフにすることで、おそらく回避できます。

于 2013-03-01T10:26:38.720 に答える