preface

First of all, I wrote this article because I have used AppCAN products to develop apps before. Although AppCAN is outdated in terms of current technology and cannot meet the requirements of technical teams. However, I recently checked some appcan developer groups, and found that some developers are still using AppCAN for development, and the efficiency of the development and debugging of some apps is very low. When debugging some functions, they are tested repeatedly by repackaging the official website. Appcan, as the first hybrid development product in China, also contributed to mobile development in China a few years ago. I see a lot of individual developers or small team developers, debugging during the development process is very painful, I hope to improve the efficiency of my tutorial, but also want to contribute to the AppCan ecosystem.

The principle of analysis

  • Appcan mixed development, mainly using Tencent X5 kernel development engine, page display principle is still the same as ordinary browser to open the Web, the difference is that appCAN generated app is to develop HTML page resources together packaged into the APP installation package, the page visited, Are open mobile phone local front-end resource files.
  • If you understand the implementation principle above, you can easily think of a debugging method. If appCAN technology is used to generate a browser APP, which can access the Web page developed through appCAN framework, is it possible to display Ni on the generated browser and call system functions such as photo taking and album ni

Appcan debugging center

In fact, Appcan has considered all these functions in the initial stage of product design. However, after the product was finished at the beginning, all the great talents left the company one by one, and the products in the later stage did not have much update, which also failed to keep up with the technological trend. Without further ado, how to introduce efficient debugging

How do I start the debug service

Click start service

After successful startup, the console will pop up and output the following log (HTTP port port code has been modified by myself, the FAQ will be described below).

http://192.168.137.1:55555/appList

Generate debug APP

Debug app source code

Directory: (AppCanStudioEnterpriseV3.3 \ AppCan – IDE \ plugins \ com. AppCan. The IDE, eclipse HDT. Player_1. 0.0.201503161536 \ AppCanPlayer) In appcan developer platform to create a dedicated debugging project, debug app source copy, replace the code of the new project, configure the APP plug-in engine for packaging. Install the APP after it is packaged. If the following page appears after the app is started, the app is successfully packaged.

How to use debug app

After starting the APP, you will find an IP input box, and fill in the IP address ip192.168.137.1 output by the console when we started the service (computer and mobile phone should be in the same network segment).

Q&A

Port number restriction

Sometimes there are port number restrictions on the Intranet of some companies. Here we say how to modify the port number of the server and app side. After modifying the unified port number, we can solve the problem. Service port number

App request port number


Debug app learning

Eat with the bag capture tool.