Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

What are the common problems in developing Mini Program with HBuilderX?

2025-04-12 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >

Share

Shulou(Shulou.com)06/01 Report--

This article is to share with you what are the contents of frequently asked questions about HBuilderX developing Mini Program. The editor thinks it is very practical, so share it with you as a reference and follow the editor to have a look.

Step one: you need to have a WeChat Mini Programs on the Wechat developer platform.

As for how to apply for Wechat developer appid and Wechat developer platform things can go to Baidu, the focus is on the development of Mini Program in HBuilderX

Step 2: create a new Wechat in your Mini Program developer tool

Step 3: import your newly built project into HBuilderX

Then click run-run to Mini Program Simulator, you can automatically open Wechat developer tools, which can be implemented in Hbuilder developer, Wechat developer tool preview. But! If everything is like this under normal circumstances, if it is not normal, then you will be very uncomfortable. Fortunately, I have filled in a lot of holes, so I will tell you about the abnormal situation.

First of all, if you have imported the project into hbuilderx, but click run, the line running to Mini Program is unavailable or the console cannot connect to Wechat developer tools after clicking, then you need to open your Wechat developer tools, as shown below

Click Settings-Security Settings at the top of Wechat developer tool

Ok, then you can preview it in the hbuilderx developer, Wechat developer tool. But if you have not applied for appid, then Wechat developers can only preview the pc side, but not the mobile phone scan preview, because it will remind you that the project is not developed by developers.

Another problem is the error when referencing the vant library

When I follow all the procedures

Step 1: npm I vant-weapp-S-production

Step 2:

Step 3: write it down in your code

Button

At this time, he began to be naughty when you were running.

I am still surprised that I have not found a complete solution to this problem.

At this point, it's time to go back to Wechat developer tools and click on facilities-Project Settings.

Then open the command line tool of the project in hbuilderx and enter the following command

Npm initnpm install-production vant-weapp

At this time, if you go back to hbuilderX, you will find that there is one more file.

Then write down the path in the file json that you want to use

{"usingComponents": {"van-button": "vant-weapp/button/index"}} Thank you for reading! This is the end of this article on "what are the common questions about HBuilderX developing Mini Program?". I hope the above content can be helpful to you, so that you can learn more knowledge. if you think the article is good, you can share it for more people to see!

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Development

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report