Unlock instant, AI-driven research and patent intelligence for your innovation.

Dex subpackage method, device, equipment and medium

A technology of file division and entry, which is applied in the direction of program control devices, program control design, instruments, etc., can solve problems such as slow app startup, uncontrollable subcontracting at random, and development cannot be carried out normally, and achieve the effect of improving startup efficiency

Active Publication Date: 2020-02-18
TENCENT TECH (SHENZHEN) CO LTD
View PDF6 Cites 0 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

[0002] In the Android (android) system, the work of developing an application app is constantly adding new codes and adding new class libraries with the development of the business scale. When the number of methods in the project exceeds 65535, you will encounter this error INSTALLFAILED DEXOPT , resulting in the failure of the app to be installed, and the development cannot proceed normally. This kind of problem is the 65536 problem often encountered in the android development process, which is a common MultiDex problem.
[0003] In order to solve the above-mentioned MultiDex problem, the official provides a general method to package Classes into different Dex respectively, and load all Dex at once during the startup process. Although this method can solve the 65536 problem, it also leads to new problems: The random uncontrollable subpackage and the inability to load on demand lead to slow app startup
For this reason, another method has been proposed in the industry, which is to obtain Class dependencies through the first startup record, and configure the Class files required in the startup process into the first Dex. Although this method can complete Dex subcontracting, it can solve The problem of subcontracting is controllable, but this method also has the problem that Dex cannot be loaded on demand. At the same time, it also has the problem of loading different classes with the operating environment, resulting in loading failures in some operating environments and causing the app to fail to start.

Method used

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
View more

Image

Smart Image Click on the blue labels to locate them in the text.
Viewing Examples
Smart Image
  • Dex subpackage method, device, equipment and medium
  • Dex subpackage method, device, equipment and medium
  • Dex subpackage method, device, equipment and medium

Examples

Experimental program
Comparison scheme
Effect test

Embodiment Construction

[0039] In order to make those skilled in the art better understand the solutions of the present application, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present application. Obviously, the described embodiments are only It is a part of the embodiments of the present application, but not all of the embodiments. Based on the embodiments in this application, all other embodiments obtained by those of ordinary skill in the art without creative efforts shall fall within the protection scope of this application.

[0040] The terms "first", "second", "third", "fourth", etc. (if any) in the description and claims of this application and the above-mentioned drawings are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It is to be understood that the data so used may be interchanged under...

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to View More

PUM

No PUM Login to View More

Abstract

The invention discloses a Dex subpackaging method. The method comprises the steps of obtaining a Class file set, an entry method list and a Dex splitting gradient, wherein the Class file set comprisesa plurality of Class files, and each Class file comprises a class; according to the Class file set and the entry method list, determining an execution directed graph routed from the entry method to each class; determining the minimum distance from each class to the entry method according to the execution directed graph; according to the minimum distance from each class to the entrance method andthe Dex splitting gradient, dividing each Class file in the Class file set into the Dex file of the corresponding gradient; traversing the classes in the Class files in each Dex file; when the currentclass and the class called by the current class do not belong to the same Dex file, adding a loading code to the front end of a calling instruction of the current class, wherein the loading code is used for dynamically loading the next Dex file to a runtime environment during execution, and effective subpackaging and loading according to needs are achieved. The invention further discloses a corresponding device, a software development system, equipment and a medium.

Description

technical field [0001] The present application relates to the technical field of software development, and in particular, to a Dex subcontracting method, apparatus, device and medium. Background technique [0002] In the Android system, with the development of the business scale, the work of developing application apps constantly adds new codes and new class libraries. When the number of methods in the project exceeds 65535, this error INSTALLFAILED DEXOPT will be encountered. , The app cannot be installed and the development cannot be carried out normally. This problem is the 65536 problem often encountered in the android development process, which is the common MultiDex problem. [0003] In order to solve the above MultiDex problem, the official provides a general method to package Classes into different Dex, and load all Dex at one time during the startup process. Although this approach can solve the 65536 problem, it also leads to new problems: Subcontracting is random ...

Claims

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to View More

Application Information

Patent Timeline
no application Login to View More
IPC IPC(8): G06F9/445
CPCG06F9/445G06F9/44521
Inventor 严君辉
Owner TENCENT TECH (SHENZHEN) CO LTD