A kind of dex subcontracting method, device, equipment and medium

A file division and entry technology, applied in program control devices, program control design, instruments, etc., can solve the problems of loading failure, inability to load on demand, slow app startup, etc., to avoid startup failure and achieve effective subcontracting. , the effect of improving startup efficiency

Active Publication Date: 2022-04-12
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
  • A kind of dex subcontracting method, device, equipment and medium
  • A kind of dex subcontracting method, device, equipment and medium
  • A kind of dex subcontracting method, device, equipment and medium

Examples

Experimental program
Comparison scheme
Effect test

Embodiment Construction

[0039] In order to enable those skilled in the art to better understand the solution of the present application, the technical solution in the embodiment of the application will be clearly and completely described below in conjunction with the accompanying drawings in the embodiment of the application. Obviously, the described embodiment is only It is a part of the embodiments of this application, not all of them. Based on the embodiments in this application, all other embodiments obtained by persons of ordinary skill in the art without making creative efforts belong to the scope of protection of this application.

[0040] The terms "first", "second", "third", "fourth", etc. (if any) in the specification and claims of the present application and the above drawings are used to distinguish similar objects, and not necessarily Used to describe a specific sequence or sequence. It is to be understood that the data so used are interchangeable under appropriate circumstances such th...

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 application discloses a Dex subcontracting method, including: obtaining a Class file set, a list of entry methods, and a Dex split gradient; wherein, the Class file set includes a plurality of Class files, and each Class file includes a class; according to the Class file set and the entry method list, determine the execution directed graph routed from the entry method to each class; according to the execution directed graph, determine the minimum distance from each class to the entry method; according to the minimum distance from each class to the entry method and the Dex split gradient, Divide each Class file in the Class file set into the Dex file corresponding to the gradient; traverse the classes in the Class file in each Dex file, and when the current class and the class it calls do not belong to the same Dex file, the calling instruction of the current class The loading code is added to the front end, where the loading code is used to dynamically load the next Dex file into the runtime environment during execution, realizing effective subcontracting and on-demand loading. The application also discloses the corresponding device, software development system, equipment and medium.

Description

technical field [0001] The present application relates to the technical field of software development, in particular to a Dex subcontracting method, device, equipment and media. Background technique [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 that is 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 pr...

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
Patent Type & Authority Patents(China)
IPC IPC(8): G06F9/445
CPCG06F9/445G06F9/44521
Inventor 严君辉
Owner TENCENT TECH (SHENZHEN) CO LTD
Who we serve
  • R&D Engineer
  • R&D Manager
  • IP Professional
Why Eureka
  • Industry Leading Data Capabilities
  • Powerful AI technology
  • Patent DNA Extraction
Social media
Try Eureka
PatSnap group products