How to force gradle to use a specific appcompat-v7 version?

StackOverflower

In my gradle file I have this

dependencies {
    testCompile 'junit:junit:4.12'
    compile 'com.android.support:appcompat-v7:23.0.0'
    compile 'com.android.support:design:23.0.0'
            ...
}

But then, running gradle dependencies I see something like this

+--- com.android.support:appcompat-v7:23.0.0 -> 23.1.1
|    \--- com.android.support:support-v4:23.1.1

What may indicates that it is automatically using 23.1.1. This causes problems with libraries depending on 23.0.0. I get errors like this

error: cannot find symbol variable dialog_fixed_height_major

error: cannot find symbol variable dialog_fixed_height_minor

error: cannot find symbol variable dialog_fixed_width_major

error: cannot find symbol variable dialog_fixed_width_minor

error: cannot find symbol variable RtlOverlay_Widget_AppCompat_ActionButton_Overflow

This is because those symbols were removed on version 23.1.0

How can I force gradle to build agains 23.0.0 so I make dependencies happy?

Vampire

The "problem" is Gradles conflict resolution strategy. Some dependency you have depends on the newer version of the library. If you scroll down in the output of dependencies, then you see which one.

The default resolution strategy of Gradle is to take the newest requested version. You can change it to fail the build instead which means you have to resolve all version conflicts manually. But if you have stuff that depends on the newer version, the question is whether it can work with the older version.

You can read more about conflict resolution in the Gradle User Guide.

Collected from the Internet

Please contact [email protected] to delete if infringement.

edited at
0

Comments

0 comments
Login to comment

Related

From Dev

Gradle: How to use specific version of snapshot?

From Dev

How to make CircleCI use a specific Gradle version?

From Dev

How could I use Theme.AppCompat while adding support v7 without resources

From Dev

How do I 'force' python to use a specific version of a module?

From Dev

How to Force Visual Studio to Use a Specific Version of DNX

From Dev

Should I use AppCompat v7 if minsdk is 14

From Dev

AppCompat v7: Should I use Framework FragmentManager or SupportFragmentManager?

From Dev

Does Android Studio use appcompat v7 even if not required?

From Dev

AppCompat v7: Should I use Framework FragmentManager or SupportFragmentManager?

From Dev

How to force a specific version of dependency?

From Java

How do I tell Gradle to use specific JDK version?

From Dev

How to define v7 appcompat dependency correctly?

From Dev

How to create a card toolbar using appcompat v7

From Dev

How change actionbar title on appcompat v7 library

From Dev

Force SublimeREPL to use specific version of Ruby

From Dev

Yii generates a jQuery version 1.71. how do i force yii to use a specific jquery version

From Dev

Is there a way to let gradle use a specific ant version?

From Dev

Unable to use ACompat v7 below version 20

From Dev

Error after updating the Android.Support Library v7 AppCompat to the 21.0.3 version

From Dev

How can I force Caliburn.Micro.Xamarin.Forms to use a specific version of Xamarin.Forms?

From Dev

Strange error when trying to use the android v7 appcompat library

From Dev

ActionBar with appcompat library v7 (ava.lang.IllegalStateException: You need to use a Theme.AppCompat theme)

From Dev

How to configure a plugin to depend on a specific version of gradle?

From Dev

How to use a specific version of CocoaPods

From Dev

How to force an application to use a specific cpu?

From Dev

How to force an application to use a specific network card?

From Dev

How to force a computer to use a specific nameserver for lookups?

From Dev

how to set NAVIGATION_MODE_LIST on Toolbar new appcompat v7 21

From Java

How to implement DrawerArrowToggle from Android appcompat v7 21 library

Related Related

  1. 1

    Gradle: How to use specific version of snapshot?

  2. 2

    How to make CircleCI use a specific Gradle version?

  3. 3

    How could I use Theme.AppCompat while adding support v7 without resources

  4. 4

    How do I 'force' python to use a specific version of a module?

  5. 5

    How to Force Visual Studio to Use a Specific Version of DNX

  6. 6

    Should I use AppCompat v7 if minsdk is 14

  7. 7

    AppCompat v7: Should I use Framework FragmentManager or SupportFragmentManager?

  8. 8

    Does Android Studio use appcompat v7 even if not required?

  9. 9

    AppCompat v7: Should I use Framework FragmentManager or SupportFragmentManager?

  10. 10

    How to force a specific version of dependency?

  11. 11

    How do I tell Gradle to use specific JDK version?

  12. 12

    How to define v7 appcompat dependency correctly?

  13. 13

    How to create a card toolbar using appcompat v7

  14. 14

    How change actionbar title on appcompat v7 library

  15. 15

    Force SublimeREPL to use specific version of Ruby

  16. 16

    Yii generates a jQuery version 1.71. how do i force yii to use a specific jquery version

  17. 17

    Is there a way to let gradle use a specific ant version?

  18. 18

    Unable to use ACompat v7 below version 20

  19. 19

    Error after updating the Android.Support Library v7 AppCompat to the 21.0.3 version

  20. 20

    How can I force Caliburn.Micro.Xamarin.Forms to use a specific version of Xamarin.Forms?

  21. 21

    Strange error when trying to use the android v7 appcompat library

  22. 22

    ActionBar with appcompat library v7 (ava.lang.IllegalStateException: You need to use a Theme.AppCompat theme)

  23. 23

    How to configure a plugin to depend on a specific version of gradle?

  24. 24

    How to use a specific version of CocoaPods

  25. 25

    How to force an application to use a specific cpu?

  26. 26

    How to force an application to use a specific network card?

  27. 27

    How to force a computer to use a specific nameserver for lookups?

  28. 28

    how to set NAVIGATION_MODE_LIST on Toolbar new appcompat v7 21

  29. 29

    How to implement DrawerArrowToggle from Android appcompat v7 21 library

HotTag

Archive