« Google ADmob sample bug ? | メイン | ffmpeg オプションTips »

Android

gradleエラーその2

Execution failed for task ':app:processDebugMainManifest'.
> Manifest merger failed : 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.

* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.
エラーメッセージに示される
https://developer.android.com/guide/topics/manifest/activity-element#exported
によれば...▼
プロジェクト/app/build.gradle で
targetSdkVersion 31
となっており、SDK API 31 (android 12)を指定する場合、プロジェクト/app/src/main/AndroidManifest.xml で android:exported の明示が必要。
他のアプリから起動できる場合は "true"
		<activity
			android:name=".MainActivity"
			android:exported="true"
		>
起動できない場合は "false"
		<activity
			android:name=".MainActivity"
			android:exported="false"
		>

トラックバック

このエントリーのトラックバックURL:
https://www.remix.asia/cgi/mt/mt-tb.cgi/7731

コメントを投稿

(いままで、ここでコメントしたことがないときは、コメントを表示する前にこのブログのオーナーの承認が必要になることがあります。承認されるまではコメントは表示されません。そのときはしばらく待ってください。)