Android SDK dynamically loads APK (Fragment or Activity implementation) and androidapk
Respect originality: Http://blog.csdn.net/yuanzeyao/article/details/38565345
Recently, due to the project being too large, compilation and translation failed (Android seems to have a limit on the number of methods in an application),
Company Yun-Dimensional asked me how to install the simulator on Windows, I you say you install simulator what? He said, "I install the simulator to view the app's package name for this information to do statistics."
I immediately thought, it is necessary to toss it?
And I loaded him with the Android SDK to get all the APK information by executing the command b
1. Click the Edit--preferences interface2. Put the Java JDK into the Android sdk;jdk option in the SDK options in Android. (: HTTP://TOOLS.ANDROID-STUDIO.ORG/INDEX.PHP/SDK)3. Click Close and the Android in Unity is ready to be con
The android.apk file is actually a zip file that can be opened directly with WinRAR.
As shown in:
Includes a META-INF directory
A res directory
An androidmanifest. xml
A classes. Dex
Androidmanifest. XML must be defined and contained by each application. It describes the application name, version, permission, referenced library file, and other information. For example, to upload an APK to Google market, configure the XML file.
META-INF directory
Th
My android SDK is android4.0.4 of the A10 solution. Because the company develops a device based on this platform, it needs to remove the software that comes with android and the software that comes with the manufacturer. To learn how to crop the android apk. The method is re
scale, number of methods and so on.
Analysis of any APK
Check the size of the APK download package, the actual size after decompression
decompile resource file, restore resource ID in layout, code
Analyze Dex, show the number of methods in each section, and see the size of the library directly
How to use: Build-Analyz APKWith Analyz APK
Unity3d publishes detailed steps for APK to run in the Android virtual machine (Unity3d export Android apk), the total process is divided into the following 6 steps:
1. Installation JAVA_JDK
2. Configure Java Environment variables
3, update the Android
Android: several common tips for compiling and packaging apk: android: compiling and packaging apk
Today I will share with you three tips for packaging apk with eclipse:
1. Prevent obfuscation and encryption from being decompiled:
1. Open this sentence in the project. proper
, which is very convenient and recommended, as follows:
First step: Export.
Step Two: Create KeyStore keystore, enter the KeyStore export location and password, remember the password, the next use existing KeyStore will be used.
Step three: Fill in the key library information, fill in some apk file password, the use of time and organizational unit information.
Step Fourth: Generate the
();} inputStream. close ();} System. out. println ("downloaded"); // send a Message to handler to change the text attribute of the button. message = handler. obtainMessage (); message. what = 1; handler. sendMessage (message);} catch (MalformedURLException e) {e. printStackTrace ();} catch (IOException e) {e. printStackTrace ();}}}). start (); return file ;}
Here is how to install APK:
/*** Install APK *
be modified.
3. zipalign Optimization
Using zipalign to optimize your APK file can reduce the usage of running Memory RAM.
If you have downloaded Android SDK tools, the file is located in the Android-SDK-Windows \ tools directory.
Command Format
Zipalign.exe-V 4 your
${android_sdk_home}/build-tools/android_version/aidl
Frameworks\base\tools\aidl
javac
java Compiler
${jdk_home}/java C or/usr/bin/javac
dex
Convert. class files to. dex files that are recognized by the Davik VM
${ANDROID_SDK_HOME}/BUILD-TOOLS/NBSP;ANDROID_VERSION/DX
Apkbuilder
Build APK Package
${android_sdk_home}/tools/apkbuilder
Because you want to implement a platform that edits from the front end and then automatically produces the APK, you first need to take care of the auto-generate APK feature. After studying the 7 steps of the APK generation, it was found that a slightly more complicated program, especially the Res folder with subfolders, could not be implemented directly with the
that the anti-compilation code and the original code are not very different, the main difference is that the original resource references have all become numbers.
即使那些代码是混淆过的,你可以得到他的大体思路对你的开发有益无害
Prevent the APK program from being recompiled
As an Android app developer, you have to face an awkward situation where your hard-to-develop apps can be easily recompiled by others.
Build a fully command-line Android build system
Step 1 Installing JDK environment
With the Android JDK it's best to use the official JDK version instead of the open JDK, and here's how to install JDK 1.7 under Unbuntu.
The code is as follows:
sudo add-apt-repository Ppa:webupd8team/java
sudo apt-get update
sudo apt-get install Oracle-java7-installer
Step 2 Installs the
signature, which is very convenient and recommended. The steps are as follows:Step 1: export.
Step 2: Create the keystore, enter the location and password for the keystore export, and remember the password. It will be used in the next use existing keystore.
Step 3: Enter the keystore information, password of some APK files, expiration time, and organization unit information.
Step 4: generate an APK fi
unfriendly to u3d projects
Not all SDKs are available in U3d plugins form
APK Export
Android IDE Export
Unity Export
Suggestions:If you do an SDK, it is recommended to separate the Android SDK (can be the library), and the Unity3d fo
First, prefaceThe previous article made clear the way unity and Android call, but many of the actual access to the part is not very detailed, because in this article, will detail the specific access to the Android SDK, and how to do a convenient unity Access SDK.Portal :Previous: Unity3d and Android call each otherhttp
Server Installation PHP EnvironmentDownload Android-sdk-windows Download JDK1. Open the ZIP support C:/windows/php.ini and open the exec2.APK SupportMIME Add. apk application/vnd.android.package-archive3. Install JAVASDK (to be consistent with Android's edit version)4. Edit IIS Bind permissions (www:www), directory doe
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.