开发者

Building and testing HTML5 application on Android Emulator in Eclipse

开发者 https://www.devze.com 2023-04-05 11:41 出处:网络
I have been scouring the we开发者_JAVA百科b for hours trying to find a way to simply \"test\" a local HTML5 file on the Android Emulator but it seems to be a ridiculously difficult thing to do. On a M

I have been scouring the we开发者_JAVA百科b for hours trying to find a way to simply "test" a local HTML5 file on the Android Emulator but it seems to be a ridiculously difficult thing to do. On a Mac for iPhone you simply have a iPhone emulator in which you type in your

 localwebsite/page.hml
but what happens with Android?

I have the latest Android SDK updater and the SDK Android tools on eclipse but the only options are with actual Android applications, not web based ones.

Isn't there a browser plugin or Android browser equivalent to which we can add the Virtual Devices Packages?

Thanks


Run "android" from your android SDK installation or run it from the "Android SDK and AVD Manager..." menu in Eclipse. This lets you set up one or more AVD (Android Virtual Device) profiles. Once you've created one, you can select it and choose "start" to start it.

The next part depends on what you mean by "local" in this question -

If you mean "local" on the android device, you'll need to use "adb" to copy the files into the "sdcard" area of the android filesystem. Then open the android browser and load the file via "file:///sdcard/name_of_your_file.html".

If you mean "local" on your development machine, you'll need to put the file into the web server of your choice on your development box, then load it via "http://local.ip.address:port/name_of_your_file.html" in the android browser.

0

精彩评论

暂无评论...
验证码 换一张
取 消