当前位置:网站首页>Problems encountered in the application and development of Hongmeng and some roast

Problems encountered in the application and development of Hongmeng and some roast

2022-06-26 10:15:00 Shake half a bottle of vinegar

The last one said from android It is better to transfer R & D to Hongmeng application , But in the process of development, there are still many pitfalls , There are many places that want to roast ( Sometimes I really want to drop the keyboard ...TAT).

To make complaints about one : The real machine debugging signature problem in the development process of Hongmeng

When developing Hongmeng application , If you want to use Hongmeng mobile phone for real machine debugging , Compared with android In terms of application , There are many restrictions , so much trouble . Hongmeng system has made many restrictions on real machine debugging , It's kind of like ios Restrictions on real machines , You need to register the application on the Hongmeng developer platform , Register the information of the real machine for debugging , Also upload the signature file .

For independent developers , Just create an application on the developer platform , In Hongmeng ide Log in to your own account , In the signature settings, just use the auto generate signature ,ide It will automatically generate a signature according to your real device ( Signed documents and real machines UUID It's one-to-one , Therefore, one signature cannot be used by multiple mobile phones ), And upload the generated signature file and real machine equipment information , The steps are as follows :

chart 1: Automatically generate signatures ( Fool operation )

For team developers , Such a design is troublesome . First of all, you should register the application on the developer platform , But you need to use the developer account registered by the company . Because it is the company's account number , Can be used to publish applications , Application upgrade, etc , So you can't log in to all developers once , Go to the signature operation , The method mentioned above cannot be used . In this case, you need to sign the document , Click... In the main menu bar Build > Generate Key and CSR, Follow the steps , You can get the keystore file (.p12) And certificate request file (.csr). stay AppGallery Connect Log in to the company account , choice “ Users and access ”, In the left navigation bar, select “ Certificate management ”, Enter the certificate management page , Click on “ New certificate ”, Upload the newly generated certificate . After the upload , Click the certificate to download to the certificate .cer file , In the engineering of gradle File or main menu > File > Project Structure Complete signature configuration in . The resulting signature is independent of the device information , Upload the code to the version controller , All team members can download and use . Last but not least AppGallery Connect, choice “ Users and access ”, Register device information in device management , You can choose to download templates and upload them in batches ( In this way, you need to obtain the UUID, Read the documents on the official website , need hdc shell Connect the phone , Enter the command to get , so much trouble ), You can also let the company account logins automatically generate signatures by connecting their mobile phones to run the application ,ide The device information will be uploaded automatically , But here's the thing , A project can only have 1 individual release Signature and 2 individual debug Signature , If the signatures are full , You can't do this . If it is a debugging device imported in batch on the web page , Still need to be in AppGallery Connect Of the project HarmonyOS application > HAP Provision Profile Add debugging on the management page Profile.( Reference documents : Document center

Make complaints about two :API Not all functions , part API There is bug

In the process of developing the application of Hongmeng , There will be many strange problems , The final conclusion is API Incomplete and partial API There is bug As a result of . Take a chestnut , It is used in Hongmeng state To achieve android Inside selector The function of , For example, distinguish the background picture of normal state and pressed state, etc . But in the use of state In the process of , I met a strange pit .button Use state Invalid , Finally, I found the same question on the forum , The conclusion is that empty The status description of is placed on the last line , Because in harmony Inside ,empty Can adapt to any situation ,empty On the first line , Will always enter empty That line of business .

Now Hongmeng feels more like a semi-finished product , But it's right js and java All supported features , Make it worth affirming , But Hongmeng ecology still needs to continue to develop . As a Chinese , Domestic systems should be supported and tried .

 

原网站

版权声明
本文为[Shake half a bottle of vinegar]所创,转载请带上原文链接,感谢
https://yzsam.com/2022/02/202202170546557608.html