My android apk which was running nice on android 10 and previous version, but in android 11 my app getting crash as soon as I download it from google play store, It show only splash screen and then automatically app getting crash
I had given following permission manifest : camera, location, storage, phone
but it throwing security exception :
SecurityException: getDataNetworkTypeForSubscriber
and also not able to debug further because app getting crash immediately
CodePudding user response:
You need to add android:requestLegacyExternalStorage="true"
in AndroidManifest.xml
file into application tag.
android:requestLegacyExternalStorage is give users more control over their files and limit file clutter
CodePudding user response:
You need to set android:exported="true"
in your AndroidManifest.xml
file where you declare this Activity:
<activity
android:name="com.example.lib.MainActivity"
android:label="LibMain"
android:exported="true">
<intent-filter>
<action android:name="android.intent.action.MAIN" >
</action>
</intent-filter>
</activity>