Android dependency 'com.android.support:appcompat-v7' has different version for the compile (26.1.0) and runtime (27.1.0) classpath.
See original GitHub issueSteps to reproduce
1.When I introduced it, I got the following error in Android.
* What went wrong:
Execution failed for task ':app:preDebugBuild'.
> Android dependency 'com.android.support:appcompat-v7' has different version for the compile (26.1.0) and runtime (27.1.0) classpath. You should manually set the same version via DependencyResolution
I use the following version in my project and don’t want to update the new version.
compile 'com.android.support:support-v4:26.1.0'
compile 'com.android.support:appcompat-v7:26.1.0'
Expected behaviour
Can be compatible with the version I am using, without updating to 27.1.0
Environment
Environment: OS: macOS High Sierra 10.13.4 Node: 8.3.0 Yarn: Not Found npm: 5.3.0 Watchman: Not Found Xcode: Xcode 9.4.1 Build version 9F2000 Android Studio: 3.1 AI-173.4819257
Packages: (wanted => installed) react: 16.0.0 => 16.0.0 react-native: 0.51.0 => 0.51.0
react-native-share
“react-native-share”: “^1.1.2”,
Issue Analytics
- State:
- Created 5 years ago
- Reactions:1
- Comments:5
Top Results From Across the Web
'com.android.support:appcompat-v7' has different version for ...
Android dependency 'com.android.support:appcompat-v7' has different version for the compile (26.1.0) and runtime (27.0.1) classpath.
Read more >Android dependency has different version for the compile and ...
android.support:support-support-v4' has different version for the compile (25.2.0) and runtime (26.0.0-beta2) classpath.
Read more >Support Library Packages - Android Developers
Each of these libraries supports a specific range of Android platform versions and set of features. This guide explains the important features and…...
Read more >Android dependency 'com.android.support:support-v4' has ...
[Solved]-Android dependency 'com.android.support:support-v4' has different version for the compile (27.0.1) and runtime (27.1.1) classpath-Flutter.
Read more >[Solved] All com.android.support libraries must use ... - YouTube
Solving the Android Studio error in gradle file with implementation dependencies of API 28 Android.The text of error is:All ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@suwu150 it will solve by using In
app/build.gradle
This question and the first answer describe the whole thing and how to control it as deeply as you want:
https://stackoverflow.com/questions/48027019/how-to-manage-different-support-library-versions-for-3rd-party-deps-with-gradle
Note that in my projects I don’t go as far as re-programming the dependency resolution behavior of gradle as the original question (in the second part) and the answer discuss, I simply use the “naive” (read as: simple, but works) style the question first discusses and it is sufficient for my needs while being understandable for other collaborators that aren’t as familiar with gradle.
Please let us know if this works as the newest version here actually moves to support 28 etc…