Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

"Missing 'package' key attribute on element package at AndroidManifest.xml:11:5-64"

Actually I published a app in play store, in the next update I want to add UPI payments in the app. So, I am using upi_pay package. When I installing the package getting error as "Missing 'package' key attribute on element package at AndroidManifest.xml:11:5-64". Can someone help me in this ? Thanks in advance.

like image 946
Phanindra Avatar asked Jun 03 '21 09:06

Phanindra


1 Answers

This issue happens for the combination of:

  • Using Android-SDK's API level 31 (or later),
  • With old Gradle version(s).

Basically, updating build-tools to 31 is not enough to support queries element (of manifest, added since Android 11+). Gradle needs to be updated, too.

It worked for me when I upgraded Gradle from 3.5.0 to 3.5.4.

In root build.gradle file, like:

// ...

dependencies {
    classpath 'com.android.tools.build:gradle:3.5.4'
    classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
}

// ...
like image 116
Phanindra Avatar answered Nov 19 '22 21:11

Phanindra