如何将网页(html、css、js)转换为 android 应用程序

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/23106709/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-08-20 06:46:53  来源:igfitidea点击:

How to convert a web page(html,css,js) into android app

androidhtmlcsseclipse

提问by Sanchit18

I want to make an app for android 4.4 that loads and runs a web page offline. I want to play this modified 2048 game (http://sanchit18.github.io) on nexus-5 device as an app. How to do that using eclipse adt or android studio?

我想为 android 4.4 制作一个应用程序,它可以离线加载和运行网页。我想在 nexus-5 设备上作为应用程序玩这个修改后的 2048 游戏(http://sanchit18.github.io)。如何使用 eclipse adt 或 android studio 做到这一点?

Also, the webpage displays the graphics correctly, but the images in the tiles render incorrectly when run on a mobile device in web browser. How to correct this? Please help with these two queries.

此外,网页正确显示图形,但在移动设备上的 Web 浏览器中运行时,图块中的图像呈现不正确。如何纠正这个?请帮助解决这两个问题。

回答by vjdhama

You can use Webview. WebViewallows you to display web pages as a part of your activity layout.

您可以使用WebviewWebView允许您将网页显示为活动布局的一部分。

回答by ceving

Nowadays PhoneGapis probably the most efficient way to convert a web page into an app. It is open source and generates apps for every platform, not just Android.

如今,PhoneGap可能是将网页转换为应用程序的最有效方式。它是开源的,可以为每个平台生成应用程序,而不仅仅是 Android。

回答by P.Zaccaria

For this purpose I used Phonegap a lot, and in the past I would have recommended it.

为此,我经常使用 Phonegap,过去我会推荐它。

Unfornutaley Phonegap has an important disadvantage: whenever a security update of Phonegap is released, Google Play requires you to upgrade your app. If you have written many apps (like I did), having to recreate all of them (3 times in latest 2 years) is quite annoying. Therefore I would recommend Webview instead.

Unfornutaley Phonegap 有一个重要的缺点:每当发布 Phonegap 的安全更新时,Google Play 都会要求您升级您的应用。如果您编写了许多应用程序(就像我所做的那样),则必须重新创建所有应用程序(最近 2 年 3 次)非常烦人。因此,我会推荐 Webview。

回答by Goodboy

You could use App Builder to convert html to android app. App Builder can be easily downloaded at google playstore.

您可以使用 App Builder 将 html 转换为 android 应用程序。App Builder 可以在 google Playstore 轻松下载。

回答by Mani

Use Intel XDK software. Tha following steps can make you to create apps.

使用英特尔 XDK 软件。以下步骤可以让您创建应用程序。

  1. Install Indel XDK from https://software.intel.com/en-us/intel-xdk
  2. Import your html files in it.
  3. Convert as App(Android, Ios, Windows)
  1. https://software.intel.com/en-us/intel-xdk安装 Indel XDK
  2. 在其中导入您的 html 文件。
  3. 转换为应用程序(Android、Ios、Windows)

回答by sathya

To convert your website into android app please visit this link

要将您的网站转换为 android 应用程序,请访问此链接

Paid version:https://play.google.com/store/apps/details?id=com.web2apkbuilder.app.paid

付费版本:https : //play.google.com/store/apps/details? id =com.web2apkbuilder.app.paid

Free Version:https://play.google.com/store/apps/details?id=com.web2apkbuilder.app.free

免费版:https : //play.google.com/store/apps/details?id=com.web2apkbuilder.app.free

The generated apk will support from Kitkat to Latest Android Version.

生成的 apk 将支持从 Kitkat 到最新的 Android 版本。