Method and device for removing useless picture resources in APK (Android Package)

A technology using pictures and pictures, applied in the direction of program control device, program loading/starting, software deployment, etc., can solve problems such as inability to solve fundamental problems, large limitations, etc., and achieve ideal use effect, high accuracy and efficiency , Optimize the effect of APK resources

Active Publication Date: 2017-05-24
WUHAN DOUYU NETWORK TECH CO LTD
View PDF5 Cites 17 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

However, the limitation of this solution is still relatively large, it can only clear duplicate resources, but there may be many image resources in the Android APK that are not repeated but are not used, so this method cannot solve the fundamental problem

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
  • Method and device for removing useless picture resources in APK (Android Package)
  • Method and device for removing useless picture resources in APK (Android Package)

Examples

Experimental program
Comparison scheme
Effect test

Embodiment Construction

[0018] The present invention will be further described in detail below in conjunction with the accompanying drawings and specific embodiments.

[0019] see figure 1 As shown, the embodiment of the present invention provides a method for clearing useless image resources in APK, including the following steps:

[0020] Step S1: Find all the Java files, find out all the image resources used in the Java files (that is, find the image resources referenced in the code), and save them to the created list of used image resources, the list of used image resources It is used to store image resources referenced in Java files and resource files.

[0021] It is understandable that in the Android system, in order to facilitate the application to quickly access its own resource files (including image resources), when each resource file is added to the application project, the compiler will automatically assign a resource to the resource The constant of ID (Identifier, identifier), through w...

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 method and a device for removing useless picture resources in an APK (Android Package), and relates to the technical field of picture removal in the APK. The method comprises the following steps that: searching all Java files, finding all adopted picture resources in the Java file, and storing the picture resources in a created adopted picture resource list; searching all resource files, finding all adopted picture resources in the resource file, and storing the picture resources in the adopted picture resource list; in the APK file, finding all picture resource file directories, and storing all picture resources under the picture resource file directories in a created local picture resource list; and carrying out comparison analysis on the current local picture resource list and the adopted picture resource list, finding the useless picture resources in the APK file, and deleting the useless picture resources. By use of the method, picture references in codes and the resource files can be intelligently scanned so as to analyze and remove ineffective picture resources, and therefore, the method is intelligent, efficient and high in accuracy.

Description

technical field [0001] The present invention relates to the technical field of image clearing in APK (Android Package, Android installation package), specifically a method and device for clearing useless image resources in APK. Background technique [0002] During the development and use of the Android system, with product updates and UI (User Interface, user interface) changes, there will be more or less useless resource images. Useless image resources not only greatly increase the size of the application APK, but also cause trouble for new developers in the project during development, making it difficult to understand the logic of the project. Moreover, for a relatively large project, it is basically impossible to manually find and delete invalid image resources. Therefore, a method is needed to allow the program to identify invalid image resources by itself. [0003] Currently, an Android SDK (Software Development Kit, software development kit) provides a tool lint for ...

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 Applications(China)
IPC IPC(8): G06F9/445
CPCG06F8/61
Inventor 刘一琛
Owner WUHAN DOUYU NETWORK TECH 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