android 问题上传APK到Google Play控制台(安卓:导出)

vnzz0bqm  于 2023-03-21  发布在  Android
关注(0)|答案(1)|浏览(178)

bounty将在6天后过期。回答此问题可获得+50的声誉奖励。Fred正在寻找来自声誉良好来源的答案

我最近更新了targetSDK版本31,之后,我开始收到以下错误上传APK到Google Play控制台.
我已经进行了必要的更正,报告如下:developer.android.com/about/versions/12/behavior-changes-12#exported,但是我仍然收到错误。
在下面的文件中,我一直设置android:exported=“true”。不过,我之前遵循了建议:
如果应用组件包含LAUNCHER类别,请将android:exported设置为true。在大多数其他情况下,请将android:exported设置为false。
但还是不行。
构建脚本:

ext {
        buildToolsVersion = "30.0.2"
        minSdkVersion = 21
        compileSdkVersion = 31
        targetSdkVersion = 31
        googlePlayServicesAuthVersion = "16.0.1"
        ndkVersion = "21.4.7075529"
    }

查看我的AndroidManifest.xml文件

<manifest
  xmlns:android="http://schemas.android.com/apk/res/android"
  package="farmacia.digital.com"
>
  <uses-permission android:name="android.permission.INTERNET" />
  <uses-permission android:name="android.permission.SYSTEM_ALERT_WINDOW" />
  <uses-permission android:name="android.permission.READ_PHONE_STATE" />
  <uses-permission android:name="android.permission.USE_FINGERPRINT" />
  <uses-permission android:name="android.permission.USE_BIOMETRIC" />
  <uses-permission android:name="android.permission.VIBRATE" />
  <uses-permission android:name="android.permission.MODIFY_AUDIO_SETTINGS" />
  <uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" />
  <uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
  <uses-permission android:name="android.permission.FOREGROUND_SERVICE" />
  <uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />
  <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
  <uses-permission android:name="android.permission.WAKE_LOCK" />
  <uses-permission android:name="android.permission.RECEIVE_BOOT_COMPLETED" />
  <application
    android:requestLegacyExternalStorage="true"
    android:name=".MainApplication"
    android:label="@string/app_name"
    android:icon="@drawable/icon"
    android:roundIcon="@drawable/icon"
    android:allowBackup="false"
    android:theme="@style/AppTheme"
  >
    <meta-data
      android:name="com.facebook.sdk.ApplicationId"
      android:value="@string/facebook_app_id"
    />
    <meta-data
      android:name="expo.modules.updates.EXPO_UPDATE_URL"
      android:value="https://exp.host/@datalytics/farmacia-digital"
    />
    <meta-data
      android:name="expo.modules.updates.EXPO_SDK_VERSION"
      android:value="40.0.0"
    />
    <meta-data
      android:name="expo.modules.updates.EXPO_RELEASE_CHANNEL"
      android:value="default"
    />

    <activity
      android:name=".MainActivity"
      android:label="@string/app_name"
      android:configChanges="keyboard|keyboardHidden|orientation|screenSize|uiMode"
      android:launchMode="singleTask"
      android:windowSoftInputMode="adjustResize"
      android:theme="@style/Theme.App.SplashScreen"
      android:exported="true"
    >
      <intent-filter>
        <action android:name="android.intent.action.MAIN" />
        <category android:name="android.intent.category.LAUNCHER" />
      </intent-filter>
      <intent-filter>
        <action android:name="android.intent.action.VIEW" />
        <category android:name="android.intent.category.DEFAULT" />
        <category android:name="android.intent.category.BROWSABLE" />
        <data android:scheme="farmaciadigital" />
      </intent-filter>
    </activity>

    <activity
      android:name="com.facebook.react.devsupport.DevSettingsActivity"
      android:exported="false"
    />

    <meta-data
      android:name="com.dieam.reactnativepushnotification.notification_foreground"
      android:value="true"
    />
    <!-- Change the resource name to your App's accent color - or any other color you want -->
    <meta-data
      android:name="com.dieam.reactnativepushnotification.notification_color"
      android:resource="@color/blue"
    />

    <receiver
      android:name="com.dieam.reactnativepushnotification.modules.RNPushNotificationActions"
    />
    <receiver
      android:name="com.dieam.reactnativepushnotification.modules.RNPushNotificationPublisher"
    />
    <receiver
      android:name="com.dieam.reactnativepushnotification.modules.RNPushNotificationBootEventReceiver"
      android:exported="false"
    >
        <intent-filter>
          <action android:name="android.intent.action.BOOT_COMPLETED" />
          <action android:name="android.intent.action.QUICKBOOT_POWERON" />
          <action android:name="com.htc.intent.action.QUICKBOOT_POWERON" />
        </intent-filter>
    </receiver>

    <service
      android:name="com.dieam.reactnativepushnotification.modules.RNPushNotificationListenerService"
      android:exported="false"
    >
      <intent-filter>
          <action android:name="com.google.firebase.MESSAGING_EVENT" />
      </intent-filter>
    </service>
  </application>
</manifest>
guicsvcw

guicsvcw1#

您可以看到<activity android:name="com.facebook.react.devsupport.DevSettingsActivity" />没有导出的标记,添加android:exported='false'就足够了。
问候。

相关问题