我有一个静态网站,纯粹只使用HTML5和JS。而且我已经安装了PhoneGap的在我的Windows 7 PC为好。我的问题是什么,我已经为了创建一个Android APK文件出了现有的HTML / JS文件遵循的步骤。有很多从从头开始创建新的PhoneGap项目的教程。但我无法找到导入现有的静态网站的PhoneGap项目任何帮助(请注意,的https://build.phonegap .COM /应用不是我的选择。)
解决方案我已经安装在我的Windows中的PhoneGap 7 PC为好。
我假设你的CLI准备科尔多瓦发展。然后,它足以遵循这一教程/ documenation 。
转到您所需的目录,你想建立你的项目。例如,
D:
CD D: myworks
然后创建一个科尔多瓦项目
科尔多瓦创建Hello输入com.example.hello的HelloWorld
进入项目目录里面
CD打招呼
![编程有意思 几款好用的Android静态代码检查工具,附实践过程](https://p.xsw88.cn/allimgs/daicuo/20230905/1260.png)
和Android平台。
科尔多瓦平台添加的android
将有一个 WWW
里面yourProject文件夹 hello-> WWW
删除该目录内所有的CSS JS的html文件夹,并把你的静态页面存在。
将设备连接到计算机上并运行科尔多瓦运行Android
I've a static website which purely uses only HTML5 and JS. And I have setup the phonegap in my windows 7 PC as well. My Question is what are the steps that I've to follow in order to create an android APK file out of the existing HTML/JS files. There are lot of tutorials on creating new phonegap project from the scratch. But I couldn't find any help on importing existing static website to phonegap project (please note that https://build.phonegap.com/apps is not an option for me.)
解决方案"And I have setup the phonegap in my windows 7 PC as well."
I'm assuming your CLI is ready for cordova development. Then it's enough to follow this tutorial/documenation.
Go to your desired directory where you want to build your project. e.g.
d:
cd d:myworks
Then create a cordova project
cordova create hello com.example.hello HelloWorld
go inside the project directory
cd hello
And platform android
cordova platform add android
There will be a www
folder inside yourProject hello->www
Delete all css js html folders inside that directory and put your static pages there.
connect your device to PC and run cordova run android
相关推荐
最新文章