Method and apparatus for importing standard module library in software engineering

By designing a standard module library and using an import tool, the problems of repetitive development and compatibility in Android development were solved, achieving standardization and efficient import of the module library, and reducing development and debugging costs.

CN116166312BActive Publication Date: 2026-07-24HEBEI AISINO TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
HEBEI AISINO TECH CO LTD
Filing Date
2022-12-14
Publication Date
2026-07-24

AI Technical Summary

Technical Problem

In Android development projects, the development of the same function often results in a large amount of repetitive development work, an increase in software errors, and high compatibility and integration costs when the development environment changes, due to different developers using different standards.

Method used

Design a standard module library and use an import tool. By adding an api directory and an info.json file to the root directory of the module library, the external interface and configuration of the standardized code library are implemented. With the help of the import tool, the module library is imported into the main project for compatibility verification and compilation.

Benefits of technology

It has enabled standardized development of module libraries, reduced repetitive work, lowered software errors and debugging costs, improved development efficiency and compatibility, and reduced learning costs.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116166312B_ABST
    Figure CN116166312B_ABST
Patent Text Reader

Abstract

The application provides a method and device for importing a standard module library in software engineering, the method comprising designing a standard module library by adding an api directory and an info.json file in the root directory of the module library, realizing the external interface and configuration of the standardized code library; and importing the standard module library into the main project by using an import tool. The application provides a design standard for an Android engineering function module library and an engineering import tool for the standard, simplifies the import of module functions in Android engineering development, standardizes the import of module functions, and reduces the learning cost of the library. By realizing the standard design of the module library, using a visual import tool, and dynamically adding the corresponding calling code file in the project, the application realizes the efficient import of the Android engineering module library and reduces the learning cost of using related functions.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention belongs to the field of software development and construction, and in particular relates to a method and apparatus for importing standard module libraries into software engineering. Background Technology

[0002] In Android development projects, in addition to business logic code, there is a large amount of functional module code and their fault tolerance and compatibility code. When developing similar functions, different developers use different standards to develop, which means that permissions need to be added again, related logic needs to be redeveloped, and related libraries need to be re-imported each time, resulting in increased workload and more software errors.

[0003] Meanwhile, software development also requires consistency when the development environment changes, the ability to dynamically add or remove components, good compatibility, and low integration costs. Existing technologies cannot meet these requirements in the software development process. Summary of the Invention

[0004] In view of this, the present invention provides a method for importing standard module libraries into software engineering, and provides design standards for Android engineering functional module libraries and engineering import tools for these standards, which simplifies and standardizes the import of module functions in Android engineering development and reduces the learning cost of libraries.

[0005] To achieve the above objectives, the technical solution of the present invention is implemented as follows:

[0006] A method for importing standard module libraries into software engineering: including

[0007] A standard module library is designed by adding an api directory and an info.json file to the root directory of the module library, thereby implementing the external interface and configuration of the standardized code library;

[0008] Use the import tool to import the standard module library into the main project.

[0009] Furthermore, the api directory contains all the public interfaces provided to the access project for calling the library, and the files in this directory are not dependent on functions outside this directory.

[0010] Furthermore, the info.json file includes basic information about the module library, compatibility information, and supported CPU instruction set information.

[0011] Basic information includes, but is not limited to, module name, package name, and a brief description;

[0012] Compatibility information includes, but is not limited to, supported Android system versions;

[0013] Supported CPU instruction sets include, but are not limited to, x86 and armeabi. Meanwhile, other library logic does not provide external interfaces to the main project.

[0014] Furthermore, importing the standard module library into the main project using the import tool includes the following:

[0015] The import tool reads data from the info.json file in the standard module library and verifies whether the standard module library is compatible with the main project.

[0016] The import tool copies all files from the api directory in the standard module library to the Model / {module name} directory of the main project;

[0017] The Gradle script is called to compile the library and automatically copy the compiled .aar file to the libs directory of the main project;

[0018] Add a reference to this standard module library to the compilation script of the main project.

[0019] Furthermore, verifying the compatibility of the standard module library with the main project includes verifying whether the system version, CPU instruction set, and Gradle plugin version supported by the standard module library are compatible with the main project.

[0020] Furthermore, if the standard module library is compatible with the main project, proceed to the next step; if the standard module library is not compatible with the main project, a prompt box will pop up, displaying all incompatible locations.

[0021] The present invention also provides an apparatus for importing a standard module library into software engineering, including...

[0022] The standard module library design module is used to add an api directory and an info.json file to the root directory of the module library to design a standard module library, and implement the external interface and configuration of the standardized code library;

[0023] The import device is used to import the standard module library into the main project using import tools.

[0024] Compared with existing technologies, the method and apparatus for importing standard module libraries into software engineering according to the present invention have the following advantages:

[0025] 1. The functional module library is developed according to design standards, which has good readability and low maintenance cost in the later stage;

[0026] 2. Reduced development workload: By using the standard library, redundant development is reduced, and software engineers only need to modify the module library to add features.

[0027] 3. The modules do not interfere with each other, reducing debugging costs;

[0028] 4. Visual operation, low learning cost for developers. Attached Figure Description

[0029] The accompanying drawings, which form part of this invention, are used to provide a further understanding of the invention. The illustrative embodiments of the invention and their descriptions are used to explain the invention and do not constitute an undue limitation of the invention. In the drawings:

[0030] Figure 1 This is a schematic diagram of the standard module library design of the present invention;

[0031] Figure 2 This is a schematic diagram of the process for importing the module library into the project according to the present invention;

[0032] Figure 3 This is a schematic diagram illustrating the specific operation process of the present invention. Detailed Implementation

[0033] It should be noted that, unless otherwise specified, the embodiments and features described in the present invention can be combined with each other.

[0034] In the description of this invention, it should be understood that the terms "center," "longitudinal," "lateral," "upper," "lower," "front," "rear," "left," "right," "vertical," "horizontal," "top," "bottom," "inner," and "outer," etc., indicating orientations or positional relationships based on the orientations or positional relationships shown in the accompanying drawings, are only for the convenience of describing the invention and simplifying the description, and do not indicate or imply that the device or element referred to must have a specific orientation, or be constructed and operated in a specific orientation, and therefore should not be construed as a limitation of the invention. Furthermore, the terms "first," "second," etc., are used for descriptive purposes only and should not be construed as indicating or implying relative importance or implicitly specifying the number of indicated technical features. Thus, a feature defined with "first," "second," etc., may explicitly or implicitly include one or more of that feature. In the description of this invention, unless otherwise stated, "a plurality of" means two or more.

[0035] In the description of this invention, it should be noted that, unless otherwise explicitly specified and limited, the terms "installation," "connection," and "linking" should be interpreted broadly. For example, they can refer to a fixed connection, a detachable connection, or an integral connection; they can refer to a mechanical connection or an electrical connection; they can refer to a direct connection or an indirect connection through an intermediate medium; and they can refer to the internal connection of two components. Those skilled in the art will understand the specific meaning of the above terms in this invention based on the specific circumstances.

[0036] The present invention will now be described in detail with reference to the accompanying drawings and embodiments.

[0037] This invention provides a method for importing standard module libraries into software engineering. The invention primarily achieves efficient import of Android project module libraries by implementing a standard module library design and using a visual import tool to dynamically add corresponding calling code files within the project, thereby reducing the learning curve for using related functions. Specifically, this solution implements the library import function in two parts.

[0038] 1. Module library design standards:

[0039] Add an api directory and an info.json file to the root directory of the module library.

[0040] The api directory contains all public interfaces provided to the access project for calling this library. Files in this directory should not be depended on by functions outside this directory.

[0041] Add the basic information of the module library (such as module name, package name, brief description, etc.), compatibility information (supported Android system versions) and supported CPU instruction sets (x86, armeabi, etc.) to the info.json file;

[0042] Other library logic does not provide external interfaces to the main project.

[0043] Standard module library design diagram as follows Figure 1 As shown.

[0044] This invention implements the external interface and configuration of a standardized code library. This design can reduce the access cost of such libraries, and developers only need to read the external interface files in the api directory to understand all the functions of the library.

[0045] 2. Import module library into the project

[0046] The import tool imports the library into the main project, such as... Figure 2 As shown, it is divided into the following steps.

[0047] (1) The import tool reads the data in info.json in the module library and verifies whether the system version, CPU instruction set, gradle plugin version, etc. supported by the library are compatible with the main project;

[0048] If compatible, proceed to step (2);

[0049] If incompatible, a pop-up dialog box will appear, displaying all incompatible locations;

[0050] (2) The import tool copies all files in the api directory of the module library to the Model / {module name} directory of the main project;

[0051] (3) Call the gradle script to compile the library and automatically copy the compiled .aar file to the libs directory of the main project;

[0052] (4) Add a reference to the library in the compilation script of the main project.

[0053] This invention reduces compatibility issues after library integration by performing a pre-inspection to check whether the library is compatible with the main project before importing it.

[0054] like Figure 3 The diagram shows a specific operation of the method of the present invention. First, open the import tool and click to select the project. Then, select the main project of the library to be imported on the computer. Next, select the function library to be imported from the list of available modules. Finally, click to import the module and import the selected library into the main project.

[0055] The present invention also provides an apparatus for importing a standard module library into software engineering, including...

[0056] The standard module library design module is used to add an api directory and an info.json file to the root directory of the module library to design a standard module library, and implement the external interface and configuration of the standardized code library;

[0057] The import device is used to import the standard module library into the main project using import tools.

[0058] The design standard for the Android project function module library and the project import tool of the standard provided by this invention simplify the import of module functions in Android project development, standardize them, and reduce the learning cost of the library.

[0059] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the present invention should be included within the protection scope of the present invention.

Claims

1. A method for importing a standard module library into software engineering, characterized in that: This includes designing a standard module library by adding an api directory and an info.json file to the root directory of the module library, thus implementing the external interface and configuration of the standardized code library; and importing the standard module library into the main project using an import tool. The api directory contains all public interfaces provided for the main project to call the library. Files in this directory are not dependent on functions outside this directory. The info.json file contains basic information, compatibility information, and supported CPU instruction set information for the module library. The basic information includes the module name, package name, and a brief description; the compatibility information includes the supported Android system versions; and the supported CPU instruction set information includes x86 and armeabi. Meanwhile, other library logic does not provide external interfaces to the main project. Importing a standard module library into the main project using an import tool involves the following steps: The import tool reads the data from the info.json file in the standard module library and verifies its compatibility with the main project; the import tool copies all files in the api directory of the standard module library to the Model / {module name} directory of the main project; the import tool calls a Gradle script to compile the library and automatically copies the compiled .aar file to the libs directory of the main project; and a reference to the standard module library is added to the compilation script of the main project.

2. The method for importing a standard module library into software engineering according to claim 1, characterized in that: Verifying the compatibility of the standard module library with the main project includes verifying whether the system version, CPU instruction set, and Gradle plugin version supported by the standard module library are compatible with the main project.

3. The method for importing a standard module library into software engineering according to claim 2, characterized in that: If the standard module library is compatible with the main project, proceed to the next step; if the standard module library is not compatible with the main project, a prompt box will pop up, displaying all incompatible locations.

4. An apparatus for importing a standard module library into software engineering, characterized in that: It includes a standard module library design module, which is used to design a standard module library by adding an api directory and an info.json file to the root directory of the module library, and implement the external interface and configuration of the standardized code library; and an import device, which is used to import the standard module library into the main project using an import tool; The api directory contains all public interfaces provided for the main project to call the library. Files in this directory are not dependent on functions outside this directory. The info.json file contains basic information, compatibility information, and supported CPU instruction set information for the module library. The basic information includes the module name, package name, and a brief description; the compatibility information includes the supported Android system versions; and the supported CPU instruction set information includes x86 and armeabi. Meanwhile, other library logic does not provide external interfaces to the main project. Importing a standard module library into the main project using an import tool involves the following steps: The import tool reads the data from the info.json file in the standard module library and verifies its compatibility with the main project; the import tool copies all files in the api directory of the standard module library to the Model / {module name} directory of the main project; the import tool calls a Gradle script to compile the library and automatically copies the compiled .aar file to the libs directory of the main project; and a reference to the standard module library is added to the compilation script of the main project.