android


Android dependency conflict error


I tried for many hours to find the solution but could not find. My problem is that when I build my Gradle I get two errors. I tried to look at this solution
Dependency conflict error in my Android app which has Android Tests but could still not solve the problem.
Error:Conflict with dependency 'junit:junit' in project ':app'. Resolved versions for app (4.10) and test app (4.12) differ. See http://g.co/androidstudio/app-test-app-conflict for details.
Error:Conflict with dependency 'org.hamcrest:hamcrest-core' in project ':app'. Resolved versions for app (1.1) and test app (1.3) differ. See http://g.co/androidstudio/app-test-app-conflict for details.
Here's my build.gradle
apply plugin: 'com.android.application'
android {
compileSdkVersion 23
buildToolsVersion "25.0.0"
defaultConfig {
applicationId "voice.com.topsalai"
minSdkVersion 16
targetSdkVersion 23
versionCode 1
versionName "1.0"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'),
'proguard-rules.pro'
}
}
}
dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
androidTestCompile('com.android.support.test.espresso:espresso-core:2.3-
alpha', {
exclude group: 'com.android.support', module: 'support-annotations'
})
compile 'com.android.support:appcompat-v7:23.1.1'
compile 'com.android.support.constraint:constraint-layout:1.0.2'
compile 'com.jakewharton.timber:timber:4.5.1'
compile 'com.google.android.gms:play-services:10.2.4'
compile 'com.android.support:support-annotations:26.0.0-alpha1'
compile 'com.googlecode.json-simple:json-simple:1.1.1'
compile 'com.android.support:support-v4:23.1.1'
}
How can I solve this?
dont use alpha..or beta.. just use the latest stable one..then please dont mix your android support version.. use same version for all android support
example
compile "com.android.support:appcompat-v7:25.3.1"
compile "com.android.support:cardview-v7:25.3.1"
compile "com.android.support:design:25.3.1"
compile "com.android.support:recyclerview-v7:25.3.1"
compile "com.android.support:support-annotations:25.3.1"
compile "com.android.support:support-v4:25.3.1"
compile "com.android.support:support-v13:25.3.1"
please remove this two dependency
testCompile 'com.android.support:support-annotations:26.0.0-alpha1'
androidTestCompile 'com.android.support:support-annotations:26.0.0-alpha1
I found the solution. By upgrading compileSdkVersion to
compileSdkVersion 25
And then Instead of this
compile 'com.android.support:appcompat-v7:23.1.1'
Only by updating appcompat-v7:23.1.1 did not solve it. I needed theese 3 lines of code.
compile 'com.android.support:appcompat-v7:25.3.1'
compile 'com.android.support:animated-vector-drawable:25.3.1'
compile 'com.android.support:mediarouter-v7:25.3.1'

Related Links

Android ExoPlayer- example to use DataSource's read() api
how to convert image to base64 binary value in android?
how to save application data in android [closed]
Android: redesigning producer consumer /approach for sensor data
How can i predict the closest value according to my search?
No emulator image found while creating a cordova mobile app
How to get the UUID from MAC address for Bluetooth Connectivity?
Animate circle in Android with data
Indexing of moveToPosition of Cursor in Android
How to make a widget work on the click of a button?
Implementing android:choiceMode in a RecyclerView
Download the latest android SDK documentation (when SDK manager version is lagging behind)
ViewPager with FragmentPagerAdapter
WebView Video FullScreen Mode Crash in some of Android Device When using application context
Dagger 2 lifecycle of a component, module and scope
Send sensing data on Android to Amazon Web Services

Categories

HOME
go
httparty
fabricjs
localization
facebook-oauth
forms
jelastic
saml-2.0
appcelerator
javacc
vxml
gembox-spreadsheet
onclick
interpolation
python-multithreading
performancepoint
commonjs
fhir
android-securityexception
ipmitool
php-5.6
scrolltop
android-intent
template-engine
charles
rubymotion
comparator
syntax-highlighting
jasmine-node
asymptotic-complexity
underscore.js
intersystems-cache
rpgle
bringtofront
autodesk-designautomation
complex-numbers
dsx-desktop
sammy.js
apiary.io
raft
zoomify
railstutorial.org
claims
placeholder
contract
signal-strength
flask-login
rfc3339
lightning
colorbar
css-transforms
type-theory
lsyncd
android-instrumentation
slackware
mapxtreme
builtins
parfor
observablecollection
jtwig
bizagi
concept-insights
libvlc
opl
sciruby
video-player
zen-cart
dock
toolkit
sapscript
dnssec
xmltype
machine-instruction
human-computer-interface
insight.database
menubar
spring-3
notorm
route-provider
kaleidoscope
traceability
swfobject
idn
redis-py
jquery-address
saxparseexception
winmain
event-receiver
tmx
updatesourcetrigger
facebook-iframe
interprocess
pagemethods
lxr
wcf-instancing
fault-tolerance
unmanagedresources
information-management
mathematical-typesetting
pnrp

Resources

Mobile Apps Dev
Database Users
javascript
java
csharp
php
android
MS Developer
developer works
python
ios
c
html
jquery
RDBMS discuss
Cloud Virtualization
Database Dev&Adm
javascript
java
csharp
php
python
android
jquery
ruby
ios
html
Mobile App
Mobile App
Mobile App