2016-10-02 62 views
0

播放控制檯顯示「支持的設備0」。支持的設備0在播放控制檯上

問題

  1. 我應該等待出版是完整的?
  2. 我應該期望支持的設備編號在上傳後立即上升> 0嗎?

我需要相機的功能,沒有相機我沒事,如果它不顯示在該設備的Play商店。

我的Manifest文件的相關部分如下。

<?xml version="1.0" encoding="utf-8"?> 
<manifest xmlns:android="http://schemas.android.com/apk/res/android" 
      xmlns:tools="http://schemas.android.com/tools" 
      package="<mypackagename>"> 


    <!-- Without this Google Play Store will not support any device --> 
    <supports-screens 
     android:anyDensity="true" 
     android:largeScreens="true" 
     android:normalScreens="true" 
     android:resizeable="true" 
     android:smallScreens="true" 
     android:xlargeScreens="true" /> 

    <!-- For Options menu call support --> 
    <uses-permission android:name="android.permission.CALL_PHONE"/> 

    <!-- To auto-complete the email text field in the login form with the user's emails --> 
    <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.ACCESS_WIFI_STATE" /> 

    <!-- To auto-complete the email text field in the login form with the user's emails --> 
    <uses-permission android:name="com.google.android.providers.gsf.permission.READ_GSERVICES"/> 
    <uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION"/> 
    <uses-permission android:name="android.permission.ACCESS_FINE_LOCATION"/> 
    <!-- For the background service to run forever --> 
    <uses-permission android:name="android.permission.WAKE_LOCK"/> 

    <!-- For Current Location on Driver App --> 
    <permission 
     android:name="${manifestApplicationId}.permission.MAPS_RECEIVE" 
     android:protectionLevel="signature"/> 

    <uses-permission android:name="${manifestApplicationId}.permission.MAPS_RECEIVE"/> 
    <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/> 

    <!-- For QR Code --> 
    <uses-permission android:name="android.permission.WRITE_INTERNAL_STORAGE"/> 
    <uses-permission android:name="android.permission.CAMERA"/> 
    <uses-feature android:name="android.hardware.camera2"/> 
    <uses-permission android:name="android.permission.GET_TASKS"/> 

    <!-- Google Cloud Messaging --> 
    <uses-permission 
     android:name="${manifestApplicationId}.permission.C2D_MESSAGE" 
     android:protectionLevel="signature"/> 
    <uses-permission android:name="com.google.android.c2dm.permission.RECEIVE"/> 

    <!-- This must be set to true, since Google Maps V2.0 needs this --> 
    <uses-feature 
     android:glEsVersion="0x00020000" 
     android:required="true"/> 

    <application 
     android:name="<mypackagename>.InitializingApplication" 
     android:allowBackup="true" 
     android:icon="@mipmap/ic_launcher" 
     android:label="@string/app_name" 
     android:largeHeap="true" 
     android:supportsRtl="true" 
     android:theme="@style/AppTheme.NoActionBar"> 
     <meta-data 
      android:name="com.google.android.gms.version" 
      android:value="@integer/google_play_services_version"/> 

     <meta-data 
      android:name="com.google.android.geo.API_KEY" 
      android:value="${mapsKey}"/> 

     <activity 
      android:name="<mypackagename>.SplashScreen" 
      android:configChanges="orientation|keyboardHidden|screenSize" 
      android:label="<AppliationName>" 
      android:screenOrientation="portrait" 
      android:theme="@style/AppTheme.NoActionBar.Translucent" 
      android:noHistory="true"> 
      <intent-filter> 
       <action android:name="android.intent.action.MAIN"/> 

       <category android:name="android.intent.category.LAUNCHER"/> 
      </intent-filter> 
     </activity> 
     <activity 
      android:name="<mypackagename>.DeviceProvision" 
      android:label="@string/title_activity_device_provision" 
      android:screenOrientation="portrait"/> 
     <activity 
      android:name="<mypackagename>.PassengerHome" 
      android:label="@string/title_activity_passenger_home" 
      android:screenOrientation="portrait" 
      android:theme="@style/AppTheme.NoActionBar"/> 



    </application> 

</manifest> 

編輯:

使用<uses-feature android:name="android.hardware.camera2"/>給我0支持的設備。使用<uses-feature android:name="android.hardware.camera2" required=false/>給了我8900個設備。

什麼廢話?我應該只能選擇帶攝像頭的設備。這是什麼樣的一個愚蠢的設置?

而且我沒有等待發布完成,就上傳了所支持的設備數量高達8900

回答

2

你得到0支持的設備,因爲你需要一個不存在的功能。沒有這種功能稱爲android.hardware.camera2

android.hardware.camera2是提供Camera接口的包。所以,這是包不是功能的標籤。

如果您的應用程序需要攝像頭,然後從這些功能中選擇:

  • <uses-feature android:name="android.hardware.camera"/> - 如果背部攝像頭需要
  • <uses-feature android:name="android.hardware.camera.front"/> - 如果前面...
  • <uses-feature android:name="android.hardware.camera.any"/> - 任何凸輪會做

Src:https://developer.android.com/guide/topics/manifest/uses-feature-element.html

而且我沒有等待發布完成,就上傳了 支持的設備數量高達8900

是的,一旦上傳Play商店可以訪問您的apk文件。所以它可以運行

aapt dump badging <path-to-apk> 

並獲取您請求的設備功能列表。你可以自己嘗試。從命令行運行它。

相關問題