简体   繁体   English

我制作的Android App不会安装但在模拟器中工作正常吗?

[英]Android App I made won't Install but works fine in emulator?

I'm having an issue installing an exported, unsigned .apk on my android device. 我在Android设备上安装导出的,未签名的.apk时遇到问题。 I have an HTC Droid Incredible 2 and can't get my apk to install. 我有一个HTC Droid Incredible 2,无法安装我的apk。 Whenever I try to with the Astro File Manager app or AppInstaller app it prompts me for the install and everything, says the permissions it uses, and then when I hit the "Install" button it shows the loading bar for about half a second and then says "Application not installed" and I have no way to debug or anything on my phone because the Incredible 2 will not connect to my PC no matter what I enable or try and it won't show on adb. 每当我尝试使用Astro文件管理器应用程序或AppInstaller应用程序时,它会提示我安装和所有内容,说明它使用的权限,然后当我点击“安装”按钮时,它会显示加载栏大约半秒钟然后说“应用程序未安装”,我无法在手机上进行调试或任何操作,因为无论我启用或试用什么,Incredible 2都无法连接到我的PC,因此无法在adb上显示。

Here's a copy of my Manifest, is there anything that could be causing an install issue, or something I left out? 这是我的Manifest的副本,有什么可能导致安装问题,或者我遗漏了什么? It runs on my emulator with 0 problems. 它运行在我的模拟器上,有0个问题。

<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
    package="com.slammednavigator"
    android:versionCode="1"
    android:versionName="1.0" >
    <supports-screens
        android:largeScreens="true"
        android:normalScreens="true"
        android:smallScreens="true"
        android:resizeable="true"
        android:anyDensity="true"
    />
    <uses-sdk android:minSdkVersion="3" android:targetSdkVersion="4"/>
    <uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" />
    <uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
    <uses-permission android:name="android.permission.ACCESS_LOCATION_EXTRA_COMMANDS"     />
    <uses-permission android:name="android.permission.INTERNET" />
    <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
    <uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" /> 
    <application
        android:icon="@drawable/ic_launcher"
        android:label="@string/app_name"
        android:hardwareAccelerated="true" >
        <activity
            android:name=".SlammedNavigatorActivity"
            android:label="@string/app_name"
            android:configChanges="orientation|keyboardHidden" >
            <intent-filter>
                <action android:name="android.intent.action.MAIN" />
                <category android:name="android.intent.category.LAUNCHER" />
            </intent-filter>
        </activity>
        <activity 
            android:name="org.apache.cordova.DroidGap" 
            android:label="@string/app_name" 
            android:configChanges="orientation|keyboardHidden" >
            <intent-filter> 
            </intent-filter> 
        </activity>
    </application>

</manifest>

You need to sign your .apk file or else Android won't install it. 您需要签署.apk文件,否则Android将无法安装它。 When you are running it on the emulator, or a device through eclipse, the .apk is signed with a certain debug certificate which allows installation. 当您在模拟器上运行它,或者通过eclipse运行设备时,.apk会使用某个允许安装的调试证书进行签名。

Have you enabled the Unknown Source in your mobile device. 您是否在移动设备中启用了“未知来源”。 As you are installing unsigned apk you have to enable the Unknown Source. 在安装unsigned apk时,您必须启用Unknown Source。 To enable go to settings -> Applications -> check the Unknown source in the list -> click on ok button. 要启用设置 - >应用程序 - >检查列表中的未知来源 - >单击确定按钮。

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

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