Android 中的解析异常
我正在尝试这段代码
https://github.com/headius/dexclient/ blob/master/src/DexClient.java
我的主代码中有以下代码:
DexClient dxclient = new DexClient();
String[] name = { "/mnt/sdcard/HelloWorld.class" };
try {
byte[] mybytes = getBytesFromFile(new File(name[0]));
byte[][] bytes = {mybytes};
dxclient.classesToDex(name, bytes);
}
catch(Exception e) {
e.printStackTrace();
}
我的 HelloWorld 类如下:
package mnt.sdcard;
public class HelloWorld {
private String message;
public void setMessage(String message) {
this.message = message;
}
public String getMessage() {
return message;
}
}
但我有下一个错误:
WARN/System.err(298): com.android.dx.cf.iface.ParseException:
class name (mnt/sdcard/HelloWorld) does not match path
(/mnt/sdcard/HelloWorld.class)
有人可以帮助我吗?
I am triying this code
https://github.com/headius/dexclient/blob/master/src/DexClient.java
And I have in my main code the following code:
DexClient dxclient = new DexClient();
String[] name = { "/mnt/sdcard/HelloWorld.class" };
try {
byte[] mybytes = getBytesFromFile(new File(name[0]));
byte[][] bytes = {mybytes};
dxclient.classesToDex(name, bytes);
}
catch(Exception e) {
e.printStackTrace();
}
My HelloWorld Class is the following:
package mnt.sdcard;
public class HelloWorld {
private String message;
public void setMessage(String message) {
this.message = message;
}
public String getMessage() {
return message;
}
}
But I have the next error:
WARN/System.err(298): com.android.dx.cf.iface.ParseException:
class name (mnt/sdcard/HelloWorld) does not match path
(/mnt/sdcard/HelloWorld.class)
Can someone help me?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我解决了这个问题
,我改变了这个:
谢谢
:)
I solve this problem
I changed this:
to this
Thanks :)