简体   繁体   English

支持Android Wear的Google Play APK的SDK版本必须至少为23

[英]Google play APKs supporting Android Wear must have a minimum SDK version of at least 23

I have tried to upload new Android wear app to google play developer console and I've got the following message: 我尝试将新的Android Wear应用程序上传到Google Play开发者控制台,并且收到以下消息:

Upload failed APKs that use the 'android.hardware.type.watch' feature must have minimum SDK version of at least 23, and this APK has 20. If you are embedding a watch APK inside a phone APK, the phone APK does not need to use the 'android.hardware.type.watch' feature. 使用“ android.hardware.type.watch”功能上传失败的APK的SDK版本必须至少为23,且该APK的最低版本为20。如果您将watch APK嵌入手机APK中,则无需使用手机APK使用“ android.hardware.type.watch”功能。

my app is configured to sdk 20. I need it to be available for android 5.1. 我的应用配置为sdk20。我需要它可用于android 5.1。 my app is designed for wear only and not for both wear and phone/tablets. 我的应用程序仅设计用于穿戴,不适用于穿戴和手机/平板电脑。

things I have tried and didn't help: 我尝试过但没有帮助的事情:

1.remove 1.删​​除

android:name="android.hardware.type.watch"

-the app is abled to be uploaded but I couldn't run it on a virtual watch device, it says: -该应用程序能够上传,但我无法在虚拟手表设备上运行它,它说:

missing uses-feature watch, non-watch apks cannot be launched on a watch 缺少用途的功能手表,无法在手表上启动非手表apk

2.instead of removing 2.而不是删除

android:name="android.hardware.type.watch"

I have tried changing it to: 我尝试将其更改为:

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

-the app is abled to be uploaded but I couldn't run it on a virtual watch device, it says: -该应用程序能够上传,但我无法在虚拟手表设备上运行它,它说:

missing uses-feature watch, non-watch apks cannot be launched on a watch 缺少用途的功能手表,无法在手表上启动非手表apk

  1. tried changing the minimum sdk from 20 to 23 -the app won't work on 20-22 sdk devices. 尝试将最低sdk从20更改为23-该应用将无法在20-22 sdk设备上运行。

My manifest file: 我的清单文件:

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

    <uses-feature
        android:name="android.hardware.type.watch"/>
    <uses-permission android:name="android.permission.VIBRATE"/>

    <application
        android:allowBackup="true"
        android:icon="@mipmap/ic_launcher"
        android:label="@string/app_name"
        android:supportsRtl="true"
        android:theme="@android:style/Theme.DeviceDefault">
        <activity
            android:name=".MainActivity"
            android:label="@string/app_name">
            <intent-filter>
                <action android:name="android.intent.action.MAIN" />

                <category android:name="android.intent.category.LAUNCHER" />
            </intent-filter>
        </activity>
    </application>

</manifest>

没有API级别低于23的Android Wear设备。当您上传的SDK版本最低为23时,您没有限制客户群。

Android Wear 2.0 Developer Preview 4 has extensive documentation for your question, see the App Distribution topic. Android Wear 2.0 Developer Preview 4包含有关您的问题的大量文档,请参阅“ 应用程序分发”主题。

To paraphrase: 释义:

  • Android Wear 2.0 apps need a minimum API level of 24 Android Wear 2.0应用程式的最低API等级为24
  • If you want to use the old distribution model (of using an embedded APK), you may use API level 23 如果要使用旧的分发模型(使用嵌入式APK),则可以使用API​​级别23

It seems like you want to distribute a standalone Android Wear 2.0 app, so you should set the API level to 24. 您似乎想分发一个独立的Android Wear 2.0应用,因此您应该将API级别设置为24。

Also, you must set up targeting for watches by providing <uses-feature android:name="android.hardware.type.watch" /> and mark the app as standalone (see this part of the docs) by specifying <meta-data android:name="com.google.android.wearable.standalone" android:value="true" /> 另外,您必须通过提供<uses-feature android:name="android.hardware.type.watch" />来设置手表的定位目标,并通过指定<meta-data android:name="com.google.android.wearable.standalone" android:value="true" />将应用标记为独立应用(请参阅文档的部分) <meta-data android:name="com.google.android.wearable.standalone" android:value="true" />

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

相关问题 支持Android Wear的APK必须至少具有至少23的SDK版本 - APKs supporting Android Wear must have a minimum SDK version of at least 23 是否有支持inappbrowser的最低Android版本? - Is there a minimum Android version for supporting inappbrowser? Android Wear上的Google Play服务 - Google Play Services on Android Wear 谷歌播放:我怎样才能有不同的APK分发到不同的国家,但具有相同的版本? - google play: How can I have different apks distributed to different countries but with same version? Android Wear Google Play服务 - Android Wear Google Play Services android穿内置应用程序最低版本 - android wear build-in app minimum version Android - 在更新 SDK 版本 23 后添加至少一个带有 ACTION-VIEW 意图过滤器的活动 - Android - Adding at least one Activity with an ACTION-VIEW intent-filter after Updating SDK version 23 tensorflowlite 的最低支持 Android 和 iOS 版本 - Minimum Supporting Android and iOS version for tensorflowlite Android Play 上传失败:最大 SDK 版本不能低于最小 SDK 版本 - Android Play Upload Failed with: The maximum SDK version cannot be lower than the minimum SDK version android:移动视觉ocr的最小谷歌播放服务版本? - android : The minimum google play service version for mobile vision ocr?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM