1

So I tried to open an older project to make some fixes but I have a problem I'm completely lost at. After fixing all the gradle versions, changing the way I import native libs etc I get this error

Error:Execution failed for task ':wallet:processDebugManifest'.
 Manifest merger failed : uses-sdk:minSdkVersion 14 cannot be smaller than version L declared in library com.android.support:support-v4:21.0.0-rc1

The thing is I don't use the 21.x support libraries. I searched through my whole codebase. the v4 support libs are used in two subprojects but both have

compile 'com.android.support:support-v4:20.0.0'

defined (no "+" wildcards or anything). I have absolutely no idea where it's dragging the 21.x library from. If I try "find in path" over the root of the project for "com.android.support" I two occurences of v4:20.0.0 and one occurence of v13:20.0.0 . If I search for "com.android.support:support-v4:21.0.0-rc1" the only reference I find is in .idea/workspace.xml, nowhere else. I tried cleaning the project, restarting IDEA, checking the project out from the SVN again and doing all the fixes needed to run on AS 0.8.+ and now I'm out of ideas. Anyone ran into a similar problem? Any tips how to solve it?

EDIT:

http://pastebin.com/Yzi9szr9

here's my main build.gradle file. The 'CountryPicker' project also uses support-v4 (no other lib) but it also has v4-20.0.0 specified (no wildcards)

ciny
  • 481
  • 3
  • 15

1 Answers1

1

I think it's because of compileSdkVersion and targetSdkVersion in your app build.gradle file.

If your build.gradle has

compileSdkVersion 'android-L'

targetSdkVersion 'android-L'

your dependencies can be

dependencies {
  compile fileTree(dir: 'libs', include: ['*.jar'])
  compile 'com.android.support:support-v4:21.0.0-rc1'
}

OR if your build.gradle has

compileSdkVersion 20

targetSdkVersion 20

then the dependencies will be like this

dependencies {
  compile fileTree(dir: 'libs', include: ['*.jar'])
  compile 'com.android.support:support-v4:20.0.0'
}

EDIT

Try updating your Manifest file like below.

<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:tools="http://schemas.android.com/tools"
    package="com.example.app">
    .
    .
    <uses-sdk tools:node="replace" />
    .
    .
</manifest>
Ye Lin Aung
  • 11,234
  • 8
  • 45
  • 51