无法安装APK托管自己的Apache服务器 [英] Can't install APK hosted my own apache server

查看:154
本文介绍了无法安装APK托管自己的Apache服务器的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我出口从Eclipse中的APK。我可以,如果我把它复制到手机的SD卡来安装它没有任何问题。

I've exported an apk from eclipse. I am able to install it without any problem if I copy it to the phone's sd card.

在尝试通过手机(银河S)浏览器下载我得到: 下载失败。

When trying to download via phone's (Galaxy S) browser I get: "Download unsuccessful".

我在的mime.types设置MIME类型application / vnd.android.package存档,重新启动Apache的,还是同样的结果。 也尝试过:

I have set mime type application/vnd.android.package-archive in the mime.types, restarted apache, still same result. Also tried :

<a href="downloads/my_apk.apk" type="application/vnd.android.package-archive">Download App</a>

仍然没有运气。

Still no luck.

我能够下载并安装从Android Market的应用程序。我怀疑Apache不发送MIME类型,但是这仅仅是一个在黑暗中拍摄。 我该如何解决这个问题,并能够从我的Web服务器上安装的APK? (或者至少检查如果Apache发送正确的头MIME类型)

I am able to download and install applications from android market. I suspect that apache is not sending the mime type but this is just a shot in the dark. How can I fix the problem and be able to install APKs from my web server? (or at least to check if apache sends correct header with mime type)

任何帮助将AP preciated。

Any help will be appreciated.

推荐答案

毕竟我发现这个问题,这部分得益于CommonsWare指教。

After all I found the problem thanks in part to CommonsWare advise.

目录,我把对的APK下载是由simpe AUTH保护。手机浏览器正确要求(一次)的用户名/密码浏览时,但显然忘记送试图下载该文件时,验证信息,并导致401未经授权。

Directory where I put apks for downloads is protected by simpe auth. Phone's browser correctly asks (once) for username/password when browsing it but obviously forgets to send auth info when trying to download the file and that causes 401 Unauthorized.

解决方案:从目录中删除基本身份验证或使用其他未受保护目录的的apk

Solution: remove basic auth from that dir or use another unprotected dir for the apks.

这篇关于无法安装APK托管自己的Apache服务器的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆