Confuse about some items in build.gradle file, android studio -


i have bad confuse items in build.gradle file, have read document here, cannot understand something, forgive me new in android. here, take file example, my build.gradle

first

as can see, there red line in dependencies element, reminds me the support library should not use different version(23) compliesdkversion(18). but, program can run prefectly! shouldn't there errors??

but, but, when add new activities, there happens 98 errors this, enter image description here

and, changed 23.0.1 18.+, red line there new added activity working fine, , program can run normal again.

omg, i'm totally confuse !

second

i explain why need compilesdkversion 18 , appcompat version 23. firstly, have import android.support.v4.app.fragment, , required compilesdkversion 18.

then, since added zjhttpclient module, looks complile 'com.android.support:appcompat-v7:23.0.1' appeared automatically, , can't delete line.

so, should solve 'problem'(if it's true problem)?

as can see, there red line in dependencies element, reminds me support library should not use different version(23) compliesdkversion(18). but, program can run prefectly! shouldn't there errors??

when compilesdkversion 18 , support support library version not 18+ show warning(the support library should not use different version(23) compliesdkversion(18)) not error.

but, but, when add new activities, there happens 98 errors this,

when targetsdkversion 23 , dependencies library version >= 23 you must have use compilesdkversion 23 , using 18 that's why show 98 errors. after changed dependencies library version 18+ error resolved right?

so when targetsdkversion 23 , dependencies library version >= 23 compile 'com.android.support:cardview-v7:23.0.1' must have use compilesdkversion 23


you second problem: can't understand better think below explanation solve query.

if app need compile 'com.android.support:appcompat-v7:23.0.1' include support.v4 library check here.

when use compile 'com.android.support:design:23.0.1' include

compile 'com.android.support:recyclerview-v7:23.0.1' compile 'com.android.support:appcompat-v7:23.0.1' compile 'com.android.support:support-v4:23.0.1' 

so com.android.support:design:23.0.1 library include above. don't have use additional library if include in library


Comments

Popular posts from this blog

sublimetext3 - what keyboard shortcut is to comment/uncomment for this script tag in sublime -

java - No use of nillable="0" in SOAP Webservice -

ubuntu - Laravel 5.2 quickstart guide gives Not Found Error -