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

How to find out if my app has “usage access” on Android Lollipop?
Android L permission conflict between release and debug apks
Backward calls and onActivityResult() not calling in Fragment but calls in activity
altbeacon - constants for calculating distance
Performance for Android ViewPager and FragmentPagerAdapter with 3 Web Related Fragments [closed]
use textview to display message when json response is null
FragmentManager is always null
Compatible in lenovo a369i
Android and SQLite - select datetime error
Data Transfer Rate
Do works in background indefinitely
How to Scroll GridView in Full Screen
Lolipop toolbar drawer toggle not clickable
Error by using Gson class [STACKOVERFLOW ERROR]
Passing URL string to AsyncTask
Phonegap instalation - 'phonegap is not recognized as an internal or'

Categories

HOME
url-redirection
prism
jmeter
apache-jena
webdriver
numbers
components
appcelerator
pdfbox
xbee
google-apps
dojo
big-o
tail
jquery-ui
joomla3.0
siddhi
why3
jsonpath
plink
screen-readers
firefox-addon
wolframalpha
google-container-registry
delphi-xe5
enterprise-miner
displaytag
expressionengine3
xcode-ui-testing
spotipy
rpgle
tpm
livelink
dst
wacom
jett
pop3
arduino-ide
sql-delete
docfx
timing
z-notation
protein-database
loading
opensmpp
p4merge
parser-generator
subclipse
print-css
outputcache
berkeley-db-je
user-defined-fields
dtsearch
scalding
er-diagram
template-toolkit
py2neo
node-request
pure-css
omxplayer
autosar
mapinfo
vorpal.js
stream-processing
uiactionsheet
fink
pushbots
jnlua
qt5.2
fits
mmwormhole
gamekit
delayed-execution
uncaught-typeerror
big-ip
named-parameters
ora-00904
parallel-testing
cancellation
jquery-slider
mutual-authentication
rfc5322
composite-component
pagedown
bjyauthorize
android-loadermanager
saleslogix
garbage
urlrewriter
ikimagebrowserview
matlab-load
undefined-index
binomial-heap
aspmenu
folding
cuda.net
escrow
information-management
commercial-application

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