| CPC G06F 8/433 (2013.01) [G06F 8/427 (2013.01)] | 18 Claims |

|
1. A method for constructing a cross-platform application, applied to a server, comprising:
obtaining a project template of the cross-platform application and information about a microprogram component corresponding to the project template of the cross-platform application, in response to an operation of selecting the project template of the cross-platform application by a user on a first platform, wherein the project template of the cross-platform application comprises a Flutter component based on a domain-specific language, and the Flutter component is configured to parse the microprogram component and load an interface of the microprogram component; and
constructing an application on the first platform and generating an application package, based on the project template of the cross-platform application and the information about the microprogram component;
the method further comprises: obtaining a native component corresponding to the project template of the cross-platform application,
wherein the constructing an application on the first platform based on the project template of the cross-platform application and the information about the microprogram component comprises: constructing the application on the first platform based on the project template of the cross-platform application, the information about the microprogram component, and the native component;
wherein for a cross-platform application running on an Android system, the obtaining a project template of the cross-platform application and information about a microprogram component corresponding to the project template of the cross-platform application; and constructing an application on the first platform and generating an application package, based on the project template of the cross-platform application and the information about the microprogram component comprises:
obtaining and modifying a project template file of the project template of the cross-platform application, and writing a native component dependency parameter;
writing a name of the cross-platform application, obtaining a file of a home interface of the cross-platform application, and modifying a name of the file of the home interface;
extracting and downloading a Flutter component dependency, and writing a microprogram component dependency parameter; and
constructing the application and generating the application package.
|