本地架设站点 怎样把nginx打包进apk

Android 码拜 10年前 (2015-07-11) 1341次浏览 0个评论
 

怎样把nginx打包进apk,我想用html在本地架设站点实现客户端效果,不要再说这样没什么意义
有谁能告诉具体操作方法,成功的话给分

 
有人已经实现了这一点,所以不要说这是不可能的

100分

http://dl.dbank.com/c0ztgdx2b4
 
我下了一个i-jetty的源码,谁能帮我解释下源码的结构和各部份的作用
 
源码的结构是这样的,我想把它弄到eclipse里面,但是不知道i-jetty-server这个是干嘛的:
本地架设站点 怎样把nginx打包进apk
 
05-26 14:12:50.360: I/Process(8736): Sending signal. PID: 8736 SIG: 9
05-26 14:13:21.180: I/dalvikvm(8807): Failed resolving Lorg/mortbay/ijetty/log/AndroidLog; interface 147 ""Lorg/eclipse/jetty/util/log/Logger;""
05-26 14:13:21.180: W/dalvikvm(8807): Link of class ""Lorg/mortbay/ijetty/log/AndroidLog;"" failed
05-26 14:13:21.180: E/dalvikvm(8807): Could not find class ""org.mortbay.ijetty.log.AndroidLog"", referenced from method org.mortbay.ijetty.IJetty.<clinit>
05-26 14:13:21.180: W/dalvikvm(8807): VFY: unable to resolve new-instance 197 (Lorg/mortbay/ijetty/log/AndroidLog;) in Lorg/mortbay/ijetty/IJetty;
05-26 14:13:21.180: D/dalvikvm(8807): VFY: replacing opcode 0x22 at 0x001b
05-26 14:13:21.190: W/dalvikvm(8807): Exception Ljava/lang/NoClassDefFoundError; thrown while initializing Lorg/mortbay/ijetty/IJetty;
05-26 14:13:21.190: W/dalvikvm(8807): Class init failed in newInstance call (Lorg/mortbay/ijetty/IJetty;)
05-26 14:13:21.190: D/AndroidRuntime(8807): Shutting down VM
05-26 14:13:21.190: W/dalvikvm(8807): threadid=1: thread exiting with uncaught exception (group=0x401c6760)
05-26 14:13:21.190: E/AndroidRuntime(8807): FATAL EXCEPTION: main
05-26 14:13:21.190: E/AndroidRuntime(8807): java.lang.ExceptionInInitializerError
05-26 14:13:21.190: E/AndroidRuntime(8807): 	at java.lang.Class.newInstanceImpl(Native Method)
05-26 14:13:21.190: E/AndroidRuntime(8807): 	at java.lang.Class.newInstance(Class.java:1301)
05-26 14:13:21.190: E/AndroidRuntime(8807): 	at android.app.Instrumentation.newActivity(Instrumentation.java:1022)
05-26 14:13:21.190: E/AndroidRuntime(8807): 	at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1733)
05-26 14:13:21.190: E/AndroidRuntime(8807): 	at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:1834)
05-26 14:13:21.190: E/AndroidRuntime(8807): 	at android.app.ActivityThread.access$500(ActivityThread.java:122)
05-26 14:13:21.190: E/AndroidRuntime(8807): 	at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1027)
05-26 14:13:21.190: E/AndroidRuntime(8807): 	at android.os.Handler.dispatchMessage(Handler.java:99)
05-26 14:13:21.190: E/AndroidRuntime(8807): 	at android.os.Looper.loop(Looper.java:132)
05-26 14:13:21.190: E/AndroidRuntime(8807): 	at android.app.ActivityThread.main(ActivityThread.java:4126)
05-26 14:13:21.190: E/AndroidRuntime(8807): 	at java.lang.reflect.Method.invokeNative(Native Method)
05-26 14:13:21.190: E/AndroidRuntime(8807): 	at java.lang.reflect.Method.invoke(Method.java:491)
05-26 14:13:21.190: E/AndroidRuntime(8807): 	at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:844)
05-26 14:13:21.190: E/AndroidRuntime(8807): 	at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:602)
05-26 14:13:21.190: E/AndroidRuntime(8807): 	at dalvik.system.NativeStart.main(Native Method)
05-26 14:13:21.190: E/AndroidRuntime(8807): Caused by: java.lang.NoClassDefFoundError: org.mortbay.ijetty.log.AndroidLog
05-26 14:13:21.190: E/AndroidRuntime(8807): 	at org.mortbay.ijetty.IJetty.<clinit>(IJetty.java:309)
05-26 14:13:21.190: E/AndroidRuntime(8807): 	... 15 more
05-26 14:13:23.230: I/dalvikvm(8807): threadid=4: reacting to signal 3
05-26 14:13:23.230: I/dalvikvm(8807): Wrote stack traces to ""/data/anr/traces.txt""

我现在把i-jetty的源码放到eclipse里面了,也可以正常编译,但是运行程序的时候报找不到AndroidLog这个class,但是项目里面是有这个class的,想不出来为什么报这个错
本地架设站点 怎样把nginx打包进apk


CodeBye 版权所有丨如未注明 , 均为原创丨本网站采用BY-NC-SA协议进行授权 , 转载请注明本地架设站点 怎样把nginx打包进apk
喜欢 (0)
[1034331897@qq.com]
分享 (0)

文章评论已关闭!