omar hassan
omar hassan

Reputation: 171

overridelibrary in android studio

I had two packages in my purchased app and when I run them, this message appears to me. I don't know how I can get rid of "override library"

Error:Execution failed for task ':hDWallPaperWithAdmob:processDebugManifest'.
Error: [/Users/omar/Downloads/HDWallPaperWithAdmob/hDWallPaperWithAdmob/src/main/AndroidManifest.xml:9] Invalid instruction 'overridelibrary', valid instructions are : REMOVE,REPLACE,STRICT

I purchased this app and I can attach link to download it.

Upvotes: 1

Views: 2110

Answers (1)

Psypher
Psypher

Reputation: 10829

To override it you need to add tools:overrideLibrary with the package name in AndroidManifest.xml

<uses-sdk tools:overrideLibrary="library package name"/>

For eg:- For google play services use as below

   <uses-sdk tools:overrideLibrary="com.google.android.gms.all"/>
   --------------------------------
   --------------------------------

tools:overrideLibrary marker

A special marker that can only be used with uses-sdk declaration to override importing a library which minimum SDK version is more recent than that application's minimum SDK version. Without such a marker, the manifest merger will fail. The marker will allow users to select which libraries can be imported ignoring the minimum SDK version.

Also it seems your project has an old gradle version, try updating the gradle.

Upvotes: 1

Related Questions