2012-01-10 166 views
1

我有一个我开发的应用程序,我正在多个设备上测试它。我的应用程序不会安装在HVGA设备上

该应用程序不会安装在三星Galaxy Q上(运行带有HVGA 320x480屏幕的Froyo)。

minSdkVersion是7,所以不应该是问题。它安装并运行良好的其他。更大的屏幕设备。

我已将AndroidManifest.xml <supports-screens>标志设置为对所有屏幕尺寸均为真。

当我尝试安装.apk时,看到的错误是“应用程序未安装”。

它安装在具有相同屏幕分辨率和操作系统版本的模拟器上。

这里是清单,请注意,因为该项目是在NDA下,我用“%%%%”替换了可识别的元素。

AndroidManifest.xml

<manifest android:versionCode="1" 
     android:versionName="1.0" 
     package="%%%%" 
     xmlns:android="http://schemas.android.com/apk/res/android"> 
<application android:debuggable="false" 
      android:hardwareAccelerated="true" 
      android:icon="@drawable/icon" 
      android:label="@string/app_name" 
      android:name="%%%%" 
      android:theme="@style/Theme.LoadingBackground"> 
<activity android:label="@string/app_name" 
      android:name="%%%%" /> 
<activity android:icon="@drawable/icon" 
      android:label="@string/app_name" 
      android:launchMode="singleTask" 
      android:name="%%%%" 
      android:screenOrientation="portrait"> 
    <intent-filter> 
    <action android:name="android.intent.action.MAIN" /> 
    <category android:name="android.intent.category.DEFAULT" /> 
    <category android:name="android.intent.category.LAUNCHER" /> 
    </intent-filter> 
</activity> 
<activity android:label="Store Front Widget" 
      android:name="%%%%" 
      android:screenOrientation="portrait" 
      android:taskAffinity="%%%%"> 
    <intent-filter> 
    <action android:name="android.intent.action.MAIN" /> 
    </intent-filter> 
</activity> 
<receiver android:label="%%%%" 
      android:name="%%%%"> 
    <intent-filter> 
    <action android:name="android.appwidget.action.APPWIDGET_UPDATE" /> 
    </intent-filter> 
    <meta-data android:name="android.appwidget.provider" 
      android:resource="@xml/widget_provider" /> 
</receiver> 
<receiver android:name="%%%%" /> 
<service android:name="c%%%%" /> 
<service android:name="%%%%"> 
    <intent-filter> 
    <action android:name="%%%%" /> 
    </intent-filter> 
</service> 
<service android:name="%%%%"> 
    <intent-filter> 
    <action android:name="%%%%" /> 
    </intent-filter> 
</service> 
<uses-library android:name="com.google.android.maps" /> 
</application> 
<supports-screens android:anyDensity="true" 
       android:largeScreens="true" 
       android:normalScreens="true" 
       android:smallScreens="true" /> 

<uses-feature android:name="android.hardware.camera" /> 
<uses-feature android:name="android.hardware.camera.autofocus" /> 
<uses-permission android:name="android.permission.CAMERA" /> 
<uses-permission android:name="android.permission.READ_PHONE_STATE" /> 
<uses-permission android:name="android.permission.INTERNET" /> 
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" /> 
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" /> 
<uses-permission android:name="android.permission.RECEIVE_BOOT_COMPLETED" /> 
<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" /> 

<uses-sdk android:minSdkVersion="7" 
     android:targetSdkVersion="7" /> 
</manifest> 

回答

2

你做了什么样的应用程序?

如果您在您的应用中使用相机资源,那么您必须检查您的预览帧大小。

public Camera getCameraInstance(){ 
    Camera c = null; 
    try { 
     c = Camera.open(); 

     Parameters param = c.getParameters(); 

     List<Size> list = param.getSupportedPreviewSizes(); 
     int list_size = list.size(); 

     Log.e("list size", Integer.toString(list_size)); 

     int supportedH = list.get(2).height; 
     int supportedW = list.get(2).width; 

     Log.e("supported height", Integer.toString(supportedH)); 
     Log.e("supported width", Integer.toString(supportedW)); 

     param.setPreviewFormat(ImageFormat.NV21); 
     c.setParameters(param);    
    } 
    catch (Exception e){ 
     Log.e("colorPicker", e.toString()); 
    } 
    return c; 
} 
+0

在哪里指定? – howettl 2012-01-10 23:01:23

+0

另外,这是安装时的问题吗? – howettl 2012-01-10 23:15:59

+0

是的,我的项目中有同样的问题。 – lv0gun9 2012-01-10 23:17:52

1

仔细检查有没有安装在设备上已经您的应用程序的一个版本。如果您尝试安装一个应用程序,并使用相同的软件包名称,但设备上已存在不同的签名,则会出现相同的错误。

如果有一个可能使用不同的密钥(过期的调试密钥或释放密钥或其他东西)进行签名,请将其卸载并且您应该很好。

如果您还没有安装另一个,请发布您的清单文件,以便我们可以看一看。

+0

我正在研究的项目是在NDA之下,所以我需要小心我发布的内容。是否有与清单相关的特定部分? – howettl 2012-01-10 22:55:01

相关问题