ossraju opened a new issue #1376:
URL: https://github.com/apache/cordova-android/issues/1376
# Bug Report
### What does actually happen?
build failed
## Information
<!-- Include all relevant information that might help understand and
reproduce the problem -->
Case 1:
create new project using `cordova create hello com.example.hello HelloWorld`
* In config .xml changed the supported like
`<preference name="android-minSdkVersion" value="22" />
<preference name="android-targetSdkVersion" value="31" />`
*Add cordova platform android with the command
`cordova platform add [email protected]`
since [cordova plugin
whitelist](https://github.com/apache/cordova-plugin-whitelist) is not need for
cordova android > 10
so removed plugin with the command `cordova plugin remove
cordova-plugin-whitelist`
now run `cordova build android`
Build Failed with the error specify an explicit value for android:exported
` 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.`
case 2:
removed android platform folder (Just to make sure that error causing by
defalut plugin whitelist which comes when you create a porject )
using `cordova platform remove android`
next added platform once again `cordova platform add [email protected]`
now run `cordova build android`
Build Failed with the error specify an explicit value for android:exported
` 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.`
### Work Around
so I when to android/app/src/AndroidManifest.xml and i added
android:exported="true" in the Activity Tag
` <activity
android:configChanges="orientation|keyboardHidden|keyboard|screenSize|locale|smallestScreenSize|screenLayout|uiMode"
android:exported="true" android:label="@string/activity_name"
android:launchMode="singleTop" android:name="MainActivity"
android:theme="@style/Theme.AppCompat.NoActionBar"
android:windowSoftInputMode="adjustResize">
`
then i run command `cordova build android`
Build Successful
## Checklist
- [ x] I searched for existing GitHub issues
- [ x] I updated all Cordova tooling to most recent version
- [x ] I included all the necessary information above
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]