2

私の Android プロジェクトは正常にコンパイルおよびビルドされますが、NanoHTTPD Java ファイル (純粋な Java 1 ファイル http サーバー) を追加すると、起動時に (プロガードなしで) 次のエラーが発生します。


[2013-03-20 23:28:56 - test] Dx 
EXCEPTION FROM SIMULATION:
[2013-03-20 23:28:56 - test] Dx local variable type mismatch: attempt to set or access a value of type int using a local variable of type java.io.ByteArrayInputStream. This is symptomatic of .class transformation tools that ignore local variable information.

[2013-03-20 23:28:56 - test] Dx ...at bytecode offset 0000009d
locals[0000]: Lcom/my/android/test/NanoHTTPD$HTTPSession;
locals[0001]: Ljava/io/InputStream;
locals[0002]: I
locals[0003]: [B
locals[0004]: I
locals[0005]: I
locals[0006]: I
locals[0007]: 
locals[0008]: 
locals[0009]: 
locals[000a]: 
locals[000b]: 
locals[000c]: 
locals[000d]: 
locals[000e]: 
locals[000f]: 
locals[0010]: 
locals[0011]: 
locals[0012]: 
locals[0013]: 
locals[0014]: 
locals[0015]: 
locals[0016]: 
locals[0017]: 
locals[0018]: 
locals[0019]: 
locals[001a]: 
locals[001b]: [I
...while working on block 009d
...while working on method run:()V
...while processing run ()V
...while processing com/my/android/test/NanoHTTPD$HTTPSession.class

[2013-03-20 23:28:56 - test] Dx 
EXCEPTION FROM SIMULATION:
[2013-03-20 23:28:56 - test] Dx local variable type mismatch: attempt to set or access a value of type java.lang.Object using a local variable of type int. This is symptomatic of .class transformation tools that ignore local variable information.

[2013-03-20 23:28:56 - test] Dx ...at bytecode offset 000002cd
locals[0000]: Lcom/my/android/test/NanoHTTPD;
locals[0001]: Ljava/lang/String;
locals[0002]: Ljava/util/Properties;
locals[0003]: Ljava/io/File;
locals[0004]: I
locals[0005]: Lcom/my/android/test/NanoHTTPD$Response;
locals[0006]: Ljava/io/File;
locals[0007]: [Ljava/lang/String;
locals[0008]: Ljava/lang/String;
locals[0009]: 
locals[000a]: 
locals[000b]: 
locals[000c]: 
locals[000d]: 
locals[000e]: 
locals[000f]: 
locals[0010]: 
locals[0011]: 
locals[0012]: 
locals[0013]: 
locals[0014]: 
locals[0015]: 
locals[0016]: [I
stack[top0]: Ljava/lang/String;
...while working on block 02cd
...while working on method serveFile:(Ljava/lang/String;Ljava/util/Properties;Ljava/io/File;Z)Lcom/my/android/test/NanoHTTPD$Response;
...while processing serveFile (Ljava/lang/String;Ljava/util/Properties;Ljava/io/File;Z)Lcom/my/android/test/NanoHTTPD$Response;
...while processing com/my/android/test/NanoHTTPD.class

これは現在のプロジェクトでのみ発生し、他のプロジェクトで NanoHTTPD を使用したときには発生しませんでした。

どうすれば修正できますか?

4

1 に答える 1

2

それを行ったのはEclipseプラグインであることが判明しました-CodePro BY GOOGLE! 彼らのコード カバレッジ ツールが何らかの理由で上記のエラーを引き起こしました (おそらく emma と関係がありますが、それは単なる推測です)。

于 2013-03-26T21:15:48.503 に答える