Android:我的应用支持 0 台设备

标签 android

你知道,我现在真的很失望。我花了过去 5 个月的时间制作这个应用程序,从设计到编码 a..z,现在我很接近了:我的应用程序支持 0 台设备。

然后我已经花了将近 24 小时试图弄清楚到底发生了什么,但仍然无法正常工作。我需要帮助。

p.s:“Localizations: default+49 languages”字段:在我的应用程序中,我只有英语和默认的 values/strings.xml 但我没有请注意,在手机上使用其他语言的用户会看到我的英文应用。

更新:找到并添加了我的澄清答案,但是接受的答案让我走上了正确的道路。非常感谢。

这是我得到的:

enter image description here

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

    <uses-sdk
        android:minSdkVersion="8"
        android:targetSdkVersion="17" />

    <uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
    <uses-permission android:name="android.permission.CAMERA" />
    <uses-permission android:name="android.permission.INTERNET" />        
    <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />    

    <uses-feature android:name="android.hardware.CAMERA" />
    <uses-feature android:name="android.hardware.camera.AUTOFOCUS" />

    <application
        android:hardwareAccelerated="true"        
        android:allowBackup="true"
        android:icon="@drawable/ic_launcher"
        android:label="@string/app_name"
        android:theme="@style/Holo.Theme"
        android:name="org.holoeverywhere.app.Application">

        <!-- Blank Activity -->
        <activity            
            android:name=".BlankActivity"
            android:label="@string/app_name"
            android:screenOrientation="portrait"
            android:theme="@android:style/Theme.NoTitleBar">
            <intent-filter>
                <action android:name="android.intent.action.MAIN" />
                <category android:name="android.intent.category.LAUNCHER" />
            </intent-filter>
        </activity>

        <!-- Access Activity -->
        <activity                                    
            android:name=".AccessActivity"
            android:label="@string/title_activity_access"             
            android:screenOrientation="portrait">
        </activity>

        <!-- Register Activity -->
        <activity                        
            android:name=".RegisterActivity"
            android:screenOrientation="portrait"            
            android:label="@string/lbActRegister">
        </activity>

        <!-- Login Activity -->
        <activity                        
            android:name=".LoginActivity"
            android:screenOrientation="portrait"            
            android:label="@string/lbActLogin">
        </activity>

        <!-- Recovery Activity -->
        <activity            
            android:name=".RecoveryActivity"
            android:screenOrientation="portrait"
            android:label="@string/lbActRecovery">
        </activity>

        <!-- Dashboard Activity -->
        <activity                                    
            android:name=".DashboardActivity"
            android:label="@string/app_name"
            android:launchMode="singleTop"             
            android:screenOrientation="portrait"
            android:configChanges="orientation|keyboardHidden|screenSize">
        </activity>

        <!-- Edit Profile Activity -->
        <activity            
            android:name=".EditProfileActivity"
            android:screenOrientation="portrait"
            android:label="@string/lbActEditProfile">
        </activity>

        <!-- Feedback Activity -->
        <activity            
            android:name=".FeedbackActivity"
            android:screenOrientation="portrait"
            android:label="@string/lbActFeedback">
        </activity>

        <!-- TOSU Activity -->
        <activity            
            android:name=".TOSUActivity"
            android:screenOrientation="portrait"
            android:label="@string/lbActTerms">
        </activity>

        <!-- About Activity -->
        <activity            
            android:name=".AboutActivity"
            android:screenOrientation="portrait"
            android:label="@string/lbActAbout">
        </activity>

        <!-- Donation Activity -->
        <activity            
            android:name=".DonationActivity"
            android:screenOrientation="portrait"
            android:label="@string/lbActDonation">
        </activity>

        <!-- Image Upload Activity -->
        <activity                        
            android:name=".photo.ImageUploadActivity"
            android:screenOrientation="portrait"
            android:label="@string/lbActUpload" 
            android:configChanges="orientation|keyboardHidden|screenSize">
        </activity>

        <!-- Me Detail Activity -->
        <activity            
            android:name=".photo.MeDetailActivity"
            android:label="@string/lbActCollection"
            android:parentActivityName=".DashboardActivity"            
            android:configChanges="orientation|keyboardHidden|screenSize">

            <meta-data android:name="android.support.PARENT_ACTIVITY"
                       android:value=".DashboardActivity" />
        </activity>

        <!-- Explore Detail Activity -->
        <activity            
            android:name=".photo.ExploreDetailActivity"
            android:label="@string/lbActExplore"
            android:parentActivityName=".DashboardActivity"            
            android:uiOptions="splitActionBarWhenNarrow"
            android:configChanges="orientation|keyboardHidden|screenSize">

            <meta-data android:name="android.support.PARENT_ACTIVITY"
                       android:value=".DashboardActivity" />
        </activity>

        <!-- Liked Detail Activity -->
        <activity            
            android:name=".photo.LikedDetailActivity"
            android:label="@string/lbActLikes"
            android:parentActivityName=".DashboardActivity"            
            android:configChanges="orientation|keyboardHidden|screenSize">

            <meta-data android:name="android.support.PARENT_ACTIVITY"
                       android:value=".DashboardActivity" />
        </activity>

    </application>

</manifest>

最佳答案

尝试将 android.hardware.CAMERA 更改为 android.hardware.camera。然后

For any of the permissions below, you can disable filtering based on the implied feature by explicitly declaring the implied feature explicitly, in a element, with an android:required="false" attribute.

并根据permissions features ,您没有添加 android.hardware.camera.autofocus 功能。

因此添加此功能或更改您的相机权限:

 <uses-feature android:name="android.hardware.camera" android:required="false" />

希望它有用:)

关于Android:我的应用支持 0 台设备,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/16483786/

相关文章:

android - 如何在 android 中仅设置 EditTextPreference 的数值?

android - android.support.v7 中的 DialogPreference 导致 override nothing 错误

安卓NDK : How to get a Class Loader With a NativeActivity and native_app_glue?

java - eclipse indigo 不断卡住并给出问题

android - 模块根文件夹中缺少文件 google-services.json。没有它,Google 服务插件将无法运行

android - 使用 Firebase 身份验证时 token 服务 API 中的错误请求

android - 将像素转换为 sp

android - findViewById 未定义

android - state as class 是否需要 SatefulWidget?

android - Phonegap3 插件