Develop Android applications using Apache Cordova-an article on cordovaandroid

Source: Internet
Author: User

Develop Android applications using Apache Cordova-an article on cordovaandroid

Visual studio community 2015 was installed many days ago. I want to try Apache Cordova and use it to develop cross-platform apps today. Before that, you need to configure N many things. Here I found an official MS article: Configure Visual Studio Tools for Apache Cordova. After reading this article, I started to install nodejs, chrome, Git, Apache Ant, Oracle Java, Android SDK, and configure environment variables one by one. Finally, we can use the detection tool provided by VS to check whether the dependent environment is correctly installed and check the environment variable settings, such:

The detection results made me very depressed. I installed Node. JS clearly! It is also 32-bit. Is the latest version (v5.7) installed, speechless! There is also the Android package. I don't quite understand which one he is talking about. There have been many installed, such:

If you need to install other Android SDK-related things, you can download AndroidDevTools here. I ignored several detected problems. Next I created an Apache Cordova blank project, and then I was excited about debugging. Connect the data cable to your mobile phone (do not forget to enable "Developer mode"), select "device", and click debug ...... The tragedy happened and the program deployment failed! Cause: the adb.exe cannot be started. I was blinded! In Android native development, this problem often occurs. If Port 5037 is occupied by other programs, I will try: netstat-ano | findstr 5037 is not found! Then I tried to enter adb start-server to start successfully, for example:

I don't know what to do. Is it really a problem detected above? This problem makes me very depressed! I finally found that adb can detect the connected Android device. Then I tried it: adb devices really didn't find the device. What's the problem? The computer can find the body storage and SD card of the mobile phone! Later, I found my oldest Android phone, Samsung i559, and tried it. No problem. I found it, for example:

Ah! Look at people, this old mobile phone can be, that is, the system is a little old (2.3), the memory is a little small (256 MB )...... Isn't it possible for me to use Meilan note2? In fact, I have found an indirect solution, that is, 360 mobile assistant is installed on both computers and mobile phones (my classmates say that pods can also be used ), after the installation, the installation is complete, and the deployment is successful, but the installation will not work. Finally, I asked my Android developer about the driver (? Android driver and? The storage driver) is a matter of two things, and gave me an article: adb devices cannot find the device. What should I do when I see the words "adb_usb.ini, because I have seen it. In fact, the key to this experience is to find the "hardware ID", first find "ADB Interface" According to his statement, and double-click to enter "ADB Interface attribute ", next, select "details", and then select "hardware ID" in the property drop-down box. My Meilan note2 is 2a45, for example:

Different computer "ADB Interface" should be in different places, and my (win10) and Baidu experience are not in one place, but there is only one purpose, that is, "ADB Interface ", finally, based on experience, create or modify the adb_usb.ini file in the specified path. Because my computer does not have this file, I directly create one and input "0x2a45" to save it. Check again and there will be no problem, such:

There is also the file adb_usb.ini. Meilan note2 has a "built-in CD" option when connecting to the computer, such:

After selecting him, "My Computer" is like this, with an additional "CD drive ":

After clicking open, "adb_usb.ini" is introduced in "I: \ USB Reference Manual \ simplified \ adb_reference description .txt:

Ii. Windows XP Chinese Environment
1. create or modify the C: \ Documents and Settings \ <your username> \. android \ adb_usb.ini file and add a line of text in the file with the content 0x2a45.

2. Check whether the ADB device is found (in the command line Program)
Adb kill-server
Adb devices
  
Iii. Windows 7 Chinese Environment
1. create or modify the C: \ User \ <your username> \. android \ adb_usb.ini file and add a line of text in the file with the content 0x2a45.

2. Check whether the ADB device is found (in the command line Program)
Adb kill-server
Adb devices

Ah! In fact, I have noticed him for a long time, but I did not pay much attention to it. So I would like to mention it here. I will end this article with a piece of installation.

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.