The apk file is actually in the zip format, but the suffix name is modified to APK, after decompression through unzip, you can see the Dex file, Dex is the full name of Dalvik VM executes, that is, Android Dalvik execution program, not Java The bytecode of me is the Dalvik byte code.
Since the APK file itself is a compressed package, if the user's computer is loaded with WinRAR (85% installed capacity), using IE to download the apk file, the extension will be automatically changed to ". zip".
If your download server is an Nginx server, then in the Nginx installation directory of the Conf/mime.types file corresponding location, plus the following line of statements, the specified APK file MIME type is application/ Vnd.android.package-archive can:
Application/vnd.android.package-archive apk;
Note: The above configuration is only in the Nginx layer good, but if you are using Nginx+tomcat way, under IE will still become a zip
You also need to configure Conf/web.xml in Tomcat to specify the APK type
<mime-mapping>
<extension>apk</extension>
<mime-type>application/vnd.android.package-archive</mime-type>
</mime-mapping>
Note: When you re-test, you must turn off IE browser to restart one to take effect (closing tab bar does not work)
=================================================
Many users reflect that the website provided on the Android phone application file "xxx.apk", with IE browser download, the extension is automatically renamed as "Xxx.zip", copy to the phone can not be installed. I found that because the APK file itself is a compressed package, if the user's computer is loaded with WinRAR (85% installed capacity), using IE to download the apk file, the extension will be automatically changed to ". zip".
If your download server is an Nginx server, then in the Nginx installation directory of the Conf/mime.types file corresponding location, plus the following line of statements, the specified APK file MIME type is application/ Vnd.android.package-archive can:
Application/vnd.android.package-archive apk;
As of this publication, there are many sites where "xxx.apk" is automatically renamed as "Xxx.zip" when downloading, including some well-known websites that provide downloads for Android programs, such as Sina Weibo and street-side nets.
Sina Weibo official Android Mobile Client download page: http://t.sina.com.cn/mobile/android.php
The following is the configuration of the various file name suffixes in Nginx mime.types:
Text/vnd.sun.j2me.app-descriptor Jad;
application/java-archive jar War Ear;
Application/x-java-archive-diff Jardiff;
Application/vnd.android.package-archive apk;
Application/vnd.ms-cab-compressed cab;
Application/octet-stream bin EXE dll;
Application/vnd.symbian.install sis;
X-epoc/x-sisx-app Sisx;
Application/iphone PXL IPA;
Application/vnd.palm PRC PDB;
APPLICATION/VND.WEBOS.IPK IPK;
Application/vnd.rim.cod cod;
APPLICATION/MRP MRP;
X-nokia-widget Wgz;
Application/octet-stream Deb;
Fix IE apk into zip:android mobile app file download server configuration workaround