2012-01-10 175 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

相關問題