1

I am new at Android programming.I have just added some texts into my app just to learn it.But I couldnt run my app.It shows an error like this:

Error:Execution failed for task :app:processDebugManifest.

Manifest merger failed : uses-sdk:minSdkVersion 8 cannot be smaller than version 9 declared in library [com.android.support:appcompat-v7:24.2.0] D:\MyAndroidProjects\MyApplication\app\build\intermediates\exploded-aar\com.android.support\appcompat-v7\24.2.0\AndroidManifest.xml Suggestion: use tools:overrideLibrary="android.support.v7.appcompat" to force usage**

This was my first post.Sorry if I have done something wrong.I would be grateful if you could correct me.Thanks

3
  • Go to your AndroidManifest.xml file and change minSdkVersion to 9. Commented Aug 24, 2016 at 17:01
  • @AjayP.Prajapati i think the changes is in the build.gradle Commented Aug 24, 2016 at 17:13
  • yes, you can change it to both places. Manifest and gradle file. Then sync the project. it will be resolved Commented Aug 24, 2016 at 17:14

2 Answers 2

2

The error explains the problem fairly clearly:

ses-sdk:minSdkVersion 8 cannot be smaller than version 9 declared in library [com.android.support:appcompat-v7:24.2.0]

The AppCompat v7 library has a minimum SDK version of 9. Thus you cannot support anything lower than 9 in your application.

Change your application's minSdkVersion to 9, and it will compile fine.

If you want to support API level 8 (you probably don't), then you either need to use an older version of AppCompat that supports it, or not use AppCompat at all.

Sign up to request clarification or add additional context in comments.

3 Comments

How come it is named appcompat-v7 and it has minSDK at 9? Wasn't the suffix supposed to represent the minSDK version supported by the library?
@DanieleRicci the min SDK version for AppCompat was only changed in a very recent release. You are correct that the "v7" originally meant that it provided shims back to version 7. However, when the support library team decided to bump up the minimum SDK version, they left the naming in place for a variety of reasons, mostly to prevent breaking existing builds.
Yes thank you @Tanis.7x I recently became aware of that. I was just surprised when I saw the build error :-)
0

Change minimum SDK version to 9 it will work properly.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.