简体   繁体   English

我的Android智能手机无法从我的Apache服务器下载apk,这是Mime类型的问题吗?

[英]My Android smartphone can't download apk from my Apache server, is it a Mime-type issue?

I have MyApplication.apk in a directory named downloads on my Tomcat Apache server, and I made a link to that file in a web page so my Android Smartphone would be able to download and install it. 我在Tomcat Apache服务器上的名为downloads的目录中有MyApplication.apk ,并且在网页中建立了指向该文件的链接,因此我的Android Smartphone可以下载并安装它。 However, it can't download it, whereas my PC web browser can. 但是,它无法下载,而我的PC Web浏览器可以下载。

I did some research on Stackoverflow ( this subject for example ) and the web, and found out that I had to add the mime-type for apk files in my server (in the file web.xml in the project named Server in Eclipse). 我对Stackoverflow( 例如本主题 )和Web 进行了一些研究,发现我必须为服务器中的apk文件添加mime类型(在Eclipse中名为Server的项目中的web.xml文件中)。 I did that. 我做到了

I also saw that I had to create an .htaccess , place it in the contexts I called, and write a line to add apk mime-type. 我还看到我必须创建一个.htaccess ,将其放置在我调用的上下文中,并编写一行以添加apk mime-type。 I also did that. 我也这样做了。

But I still can't download my apk in my smartphone web browser ! 但是我仍然无法在智能手机网络浏览器中下载我的apk! Does anyone has an idea ? 有人有主意吗?

NB : I use Eclipse to run my Apache Tomcat. 注意:我使用Eclipse运行我的Apache Tomcat。 My application is signed and its weight is 1.5MB. 我的应用程序已签名,权重为1.5MB。

应该把mime-type:application/vnd.android.package-archive

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM