标签:android blog http io 使用 java ar 文件 2014
编写HelloWorld.smali文件:
.class public LHelloWorld; .super Ljava/lang/Object; .method public static main([Ljava/lang/String;)V .registers 2 sget-object v0, Ljava/lang/System;->out:Ljava/io/PrintStream; const-string v1, "Hello World!" invoke-virtual {v0, v1}, Ljava/io/PrintStream;->println(Ljava/lang/String;)V return-void .end method
java -jar smali.jar -o classes.dex HelloWorld.smali
使用命令上传至Android手机的/sdcard/目录下
adb push HelloWorld.zip /sdcard
dalvikvm -cp HelloWorld.zip HelloWorld
标签:android blog http io 使用 java ar 文件 2014
原文地址:http://blog.csdn.net/freeitdog/article/details/39299975