0

just having a freakout moment while upgrading my app from android api 30 to 33, when i upload it on play console i am getting the error which says

You uploaded an APK or Android App Bundle without the 'android:exported' property set.

even when i have set the 'android:exported' property. but it still shows the same error.

Merge Errors

Error: android:exported needs to be explicitly specified for element <activity#com.onesignal.NotificationOpenedActivityHMS>. Apps targeting Android 12 and higher are required to specify an explicit value for android:exported when the corresponding component has an intent filter defined. See https://developer.android.com/guide/topics/manifest/activity-element#exported for details. CamScanner.app main manifest (this file), line 68 Error: android:exported needs to be explicitly specified for element <receiver#com.onesignal.FCMBroadcastReceiver>. Apps targeting Android 12 and higher are required to specify an explicit value for android:exported when the corresponding component has an intent filter defined. See https://developer.android.com/guide/topics/manifest/activity-element#exported for details. CamScanner.app main manifest (this file), line 48 Error: android:exported needs to be explicitly specified for element <receiver#com.onesignal.BootUpReceiver>. Apps targeting Android 12 and higher are required to specify an explicit value for android:exported when the corresponding component has an intent filter defined. See https://developer.android.com/guide/topics/manifest/activity-element#exported for details. CamScanner.app main manifest (this file), line 99 Error: android:exported needs to be explicitly specified for element <receiver#com.onesignal.UpgradeReceiver>. Apps targeting Android 12 and higher are required to specify an explicit value for android:exported when the corresponding component has an intent filter defined. See https://developer.android.com/guide/topics/manifest/activity-element#exported for details. CamScanner.app main manifest (this file), line 105

here is my androidmanifest code:

<?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="com.scanit.camscanner">
    <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" />
    <uses-permission android:name="android.permission.CAMERA" />
    <uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />
    <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
    <uses-feature
        android:name="android.hardware.camera"
        android:required="true" />
    <uses-feature
        android:name="android.hardware.camera.autofocus"
        android:required="false" />
    <uses-permission android:name="android.permission.WAKE_LOCK" />
    <uses-permission android:name="android.permission.RECEIVE_BOOT_COMPLETED" />
    <uses-permission android:name="com.android.vending.BILLING" />
    <application
        android:name="com.scanit.camscanner.MyApp"
        android:allowBackup="true"
        android:debuggable="true"
        android:hardwareAccelerated="true"
        android:icon="@mipmap/ic_launcher"
        android:label="@string/app_name"
        android:largeHeap="true"
        android:networkSecurityConfig="@xml/network_security_config"
        android:requestLegacyExternalStorage="true"
        android:roundIcon="@mipmap/ic_launcher_round"
        android:supportsRtl="true"
        android:theme="@style/Theme.CamScanner"
        android:usesCleartextTraffic="true"
        tools:ignore="HardcodedDebugMode">
        <provider
            android:name="androidx.core.content.FileProvider"
            android:authorities="${applicationId}.provider"
            android:exported="false"
            android:grantUriPermissions="true"
            tools:replace="android:authorities">
            <meta-data
                android:name="android.support.FILE_PROVIDER_PATHS"
                android:resource="@xml/provider_paths"
                tools:replace="android:resource"/>
        </provider>

        <activity android:name="com.scanit.camscanner.activity.BaseActivity"/>
        <activity
            android:name="com.scanit.camscanner.activity.SplashActivity"
            android:screenOrientation="portrait"
            android:exported="true">
            <intent-filter>
                <action android:name="android.intent.action.MAIN"/>
                <category android:name="android.intent.category.LAUNCHER"/>
            </intent-filter>
        </activity>
        <activity
            android:name="com.scanit.camscanner.activity.MainActivity"
            android:screenOrientation="portrait"
            android:windowSoftInputMode="adjustPan" />
        <activity
            android:name="com.scanit.camscanner.activity.ScannerActivity"
            android:screenOrientation="portrait"/>
        <activity
            android:name="com.yalantis.ucrop.UCropActivity"
            android:theme="@style/uCropStyle"
            android:screenOrientation="portrait"/>
        <activity
            android:name="com.scanit.camscanner.activity.IDCardPreviewActivity"
            android:screenOrientation="portrait"/>
        <activity
            android:name="com.scanit.camscanner.activity.CropDocumentActivity"
            android:screenOrientation="portrait"/>
        <activity
            android:name="com.scanit.camscanner.activity.CurrentFilterActivity"
            android:screenOrientation="portrait"/>
        <activity
            android:name="com.scanit.camscanner.activity.SavedDocumentActivity"
            android:screenOrientation="portrait"/>
        <activity
            android:name="com.scanit.camscanner.activity.DocumentEditorActivity"
            android:screenOrientation="portrait"
            android:windowSoftInputMode="adjustNothing"/>
        <activity
            android:name="com.scanit.camscanner.activity.SavedEditDocumentActivity"
            android:screenOrientation="portrait"/>
        <activity
            android:name="com.scanit.camscanner.activity.SavedDocumentPreviewActivity"
            android:screenOrientation="portrait"/>
        <activity
            android:name="com.scanit.camscanner.activity.NoteActivity"
            android:screenOrientation="portrait"/>
        <activity
            android:name="com.scanit.camscanner.activity.ImageToTextActivity"
            android:screenOrientation="portrait"/>
        <activity
            android:name="com.scanit.camscanner.activity.GroupDocumentActivity"
            android:screenOrientation="portrait"/>
        <activity
            android:name="com.scanit.camscanner.activity.PDFViewerActivity"
            android:screenOrientation="portrait"/>
        <activity
            android:name="com.scanit.camscanner.activity.QRGenerateActivity"
            android:screenOrientation="portrait"/>
        <activity
            android:name="com.scanit.camscanner.activity.QRReaderActivity"
            android:screenOrientation="portrait"/>
        <activity
            android:name="com.scanit.camscanner.activity.PrivacyPolicyActivity"
            android:screenOrientation="portrait"/>
        <meta-data
            android:name="com.google.android.gms.vision.DEPENDENCIES"
            android:value="ocr"/>
        <meta-data
            android:name="com.google.android.gms.ads.APPLICATION_ID"
            android:value="@string/admob_app_id"/>
    </application>
</manifest>
James Z
  • 12,209
  • 10
  • 24
  • 44
  • Is see a lot of `` elements in your AndroidManifest .xml that misses the `android:exported` attribute. Have you tried to update them? Please read https://stackoverflow.com/q/68554294/150978 and it's answers. – Robert May 07 '23 at 11:55

1 Answers1

0

As for new android version , you need to set android:exported for each activity , service and receiver in manifest file . In you file , I am able to see android:exported for a few activities only not all .. So kindly consider 2 points here which can fix your issue

  1. Set android:exported to each activity , service and receiver in your manifest
  2. Errors you are getting for other activity , service and receiver which is part of some library and not your code so either upgrade your library to latest version if they have added support for new android version or re-register those activity , service or receiver in your manifest with android:exported tag
jayesh gurudayalani
  • 1,368
  • 1
  • 9
  • 14
  • Manifest merger failed with multiple errors, see logs – Rayyan Studios May 07 '23 at 12:11
  • Yes i saw errors and found that there are some libraries like onesingle you are using and it's receiver and activity don't have exported tag which you need to add in your manifest as mentioned in my answer or upgrade your lib – jayesh gurudayalani May 07 '23 at 12:26