vue2 data hijacking principle

2023-01-23   ES  


** The Mid -Autumn Festival is really a holiday ~, I slept directly from 1 am to 3 pm, and the fatigue that accumulated after 14 hours of sleep was swept away and the empty head was good ..
Before I tried to study a very fun project .. The details are not to mention. When I realize how I get out of Eclipse and compile the source code of the project, I can compile the project source
found that there are ready -made answers on the Internet, refer to the following
Although the original author was written for the earlier Android 1.5 (API-3), the principle and usage were the same.

The path and tools used
include (I can stole a laziness to directly directly the part of the batch processing content directly CP):
SET WORK_SPACE=E:\code\autopack_demo
SET PKG_PATH=com\xxx\apk\autopack_demo
SET JAVA_SPACE=D:\Progra~2\Java\jdk1.6.0_21\bin
SET ANDROID_SPACE=E:\android-sdk-windows
SET AAPT=%ANDROID_SPACE%\platform-tools\aapt.exe
SET DX=%ANDROID_SPACE%\platform-tools\dx.bat
Rem output path
Yi Hulu Painting Scoop is written for a trial operation and found that stuck on a problem: Some functional modules in the project quote the class in the third party jar
When compiled an error, error,
javac, all things quoted in JAR’s categories reported errors such as Class Not Found
Gen/R.Java also not match the objects and do not match and there is a lot of things
according to the wrong prompts to solve one by one, according to the packing process
1. First solve the generation of R.Java
Here I copy the third party’s 3rd.jar to the lib/ under the project folder, and then define it in the processing
reM The following lines to generate R.Java
%AAPT% package -m -J %GEN_FOLDER% -M %WORK_SPACE%\AndroidManifest.xml -S %RESOURCE_FOLDER% -I %ANDROID_JAR% -I % THIRD_JAR%
At the end of the command, a -I % Third_JAR % was added, so the report on the R.Java report disappeared
2. Javac’s error prompt .. Here is to compile .java to .class prompts to find a third party package
So add it at the original command and add it.-classpath %THIRD_JAR%This reference parameter, the problem is solved

Declarily compile and have no error, and pack other resource files into the APK. Finally, add the signature ~ generated APK, it seems to be successful
Installed on the phone, running, the program collapsed …Android笔记34:命令行打包编译.apk 包含第三方.jar 的方法 - 恶 - 早衰男的巢
Look at the DDMS output field log ~~ The question is still the third party category ..not Found … uh, isn’t it compiled?
Looking back at that apk file, it is indeed too small .. It does not include that jar
Do your reverse research … Look at the difference between the apk (104KB) compiled from Eclipse and the (26KB) I packed me …
Use the APK file as a zip to decompress ~ The difference in the size of the size lies in the files.dex file
! The original problem is here …
generating DEX file is to check the use of % dx % -HELP usage with % dx %, and found the last step to solve the problem
3. When the output DEX, the jar of the third party is included
What I said in DX -Help is very clear:


Related Posts

java swing to achieve a simple login interface WOO

Linux Mount

Unity’s PlayerMaker plug -in Introduction -Affiliated Chinese Tutorial and Plug -in

linux adds delete FTP users

vue2 data hijacking principle

Random Posts

[FPGA] The design of the single port RAA (synchronous reading, synchronous writing)

IDEA Maven MyBatisgenrator plug -in DEMO project Twenty

Linux Mount

C language review (1)

Python Draw a function curve and set the intersection of the XY shaft at the position of the original point of the coordinate origin