My Android Studio claims that declaring the package in the manifest like this is deprecated:
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="this.is.my.package">
The error message is:
Move package from Android manifest to build files
Declaration of a project's namespace using the package attribute of the Android manifest is deprecated in favour of a namespace declaration in build files.
But the button "Run selected steps" is disabled and I cannot click it.
How to fix this error message?
leave this line in there, thats an old, "legacy" way from times when there were no Gradle used in Android projects... it's still used for generate R.*
references for resource files
current times and Gradle-based projects: declare an applicationId
and namespace
in your gradle files (e.g. with same value "this.is.my.package"
). some DOC in HERE, some sample below:
android {
namespace "this.is.my.package"
defaultConfig {
applicationId "this.is.my.package"
... rest of code
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With