Android Application Package Generation via Class File Attribute Parsing
Find Innovative SolutionsGenerate Solutions
Solution Overview
Problem
The existing method of packaging Android applications results in large base resource packages due to a coarse file packaging granularity, leading to increased storage space occupation and user unfriendliness during installation and usage.
Innovation Solution
A method that involves parsing attribute information of each class file in the code resource file to sub-package them accurately, distributing each class file into corresponding sub-code resource packages, and generating a target application package in a target format, such as AAR, to reduce the base resource package size.
Engineering Contradictions & Design Principles
Engineering Contradiction Analysis
1Ease of manufacture
If code resource files are packaged into a base resource package with uniform packaging, then the packaging process is simple, but the base resource package occupies large storage space
Solution Approach 1:
The patent segments the code resource files into multiple sub-code resource packages based on class file attributes (such as dependency relationships, usage frequency, or module boundaries). Instead of uniform packaging, each sub-package contains selectively packaged class files, enabling the base resource package to occupy smaller storage space while maintaining packaging simplicity through automated attribute-based classification.
2Volume of stationary object
If code resource files are sub-packaged at class file granularity, then the base resource package size is reduced, but the packaging process complexity increases
Solution Approach 1:
The patent performs preliminary analysis of class file attributes before the actual packaging process. By pre-extracting and analyzing attributes such as dependency relationships, usage frequency, or module boundaries, the system determines the packaging strategy in advance. This preliminary action enables the complex sub-packaging process to be executed systematically and automatically, reducing the perceived complexity during execution.
Solution Approach 2:
The patent implements a feedback mechanism where the packaging system analyzes class file attributes, determines optimal packaging strategies, and adjusts the sub-packaging process accordingly. By continuously monitoring and adjusting based on attribute analysis results, the system manages packaging process complexity through adaptive control, ensuring efficient base resource package size reduction without overwhelming complexity.
3Device complexity
If all code resources are packaged into a single base resource package, then the application structure is simple, but code resource allocation optimization is limited
Solution Approach 1:
The patent applies local quality by packaging code resources differently based on their specific attributes and usage patterns. Instead of uniform packaging, the system identifies and packages frequently used classes, dependency-critical classes, and module-boundary classes into appropriate sub-packages. This enables optimized code resource allocation where each sub-package has tailored packaging strategies, improving productivity while maintaining manageable application structure complexity through automated classification.
Data Source
AI summary
Disclosed are a method, an apparatus, a device, a medium and a product for application package generation, wherein the method comprises: acquiring a code resource file of a target application, and parsing attribute information of a code resource in each class file in the code resource file; distributing each class file into a corresponding sub-code resource package in accordance with the attribute information; generating a target application package in a target format based on each sub-code resource package; wherein the code resource file of the target application is an AAR file of the target application program.


