Original: vs2017 cordova apk first project
VS is out in 2017, and finally it can be developed across platforms, especially when it finally doesn't report a bunch of errors.
Cordova is a good thing. Finally, I don't have to take on a project, and I have to share most of my hard-earned money on the mobile phone.
Cordova is a good thing, no need to learn a new language, the original html5+css+javascript can do the project. No more tossing AndroidStudio with FQ.
cordova is a good thing and I don't have to learn Xamarin. Why doesn't Xamarin support VB.Net? !
cordova is a good thing, wex5 is also using it, using a weird eclipse. However, the first IDE in the universe is naturally integrated and does not need to be matched with any environment.
Document address:
http://cordova.apache.org/docs/en/latest/
1. Installation
2. Create a new cordova project
3. Add battery status plugin
Double click on config.xml
The left column [plug-in], the middle column [
battery ], the right column [installation]
4.
Add jquery.js to the www/scripts directory
The index.html file references jquery.js
5.
www/scripts/index.js
Added display battery status information.
function onDeviceReady() {
window.addEventListener("batterystatus", onBatteryStatus, false);
function onBatteryStatus(status) {
$('#Text1').val('Level:' + status.level + ' isPlugged:' + status.isPlugged)
};
}
6. Generate apk
Build the project.
Project directory/BlankCordovaApp1/BlankCordovaApp1/platforms/android/build/outputs/apk/android-debug.apk
I don't know why, but my debug build can run on Xiaomi phones, but the release cannot be installed. . . . .
1. Air Raid Alert Blog original, please do not repost.
2. Xamarin is strongly required to support VB.net. . . . .