Matsalolin shirye-shirye sau da yawa suna cikin rikitattun kurakurai da kurakuran da masu haษakawa ke ci karo da su yayin aiwatar da codeing. Fahimta da magance waษannan kurakuran ba wai kawai tana inganta ฦwarewar mai haษakawa ba amma har ma yana ฦara haษaka haษakar software.
Kwafin Class android.support.v4.app
Yayin aiki tare da ci gaban Android, kuskuren 'Duplicate class android.support.v4.app' matsala ce ta gama gari da masu haษakawa ke fuskanta. Tushen wannan matsala yawanci yana cikin rashin daidaituwa ko kwafin abubuwan dogaro da ke cikin fayil ษin Gradle. Wadannan sabani suna faruwa lokacin da dakali da yawa, dogara da sigogi daban-daban na irin sigogi, an ฦara su zuwa aikace-aikace da yawa a cikin aiki mai santsi.
dependencies { implementation fileTree(dir: 'libs', include: ['*.jar']) implementation 'com.android.support:appcompat-v7:28.0.0' implementation 'com.android.support.constraint:constraint-layout:1.1.3' testImplementation 'junit:junit:4.12' androidTestImplementation 'com.android.support.test:runner:1.0.2' androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.2' }
A cikin lambar da aka bayar, 'com.android.support:appcompat-v7:28.0.0' da 'com.android.support.constraint:constraint-layout:1.1.3' sune ษakunan karatu masu cin karo da juna waษanda ke haifar da kuskuren kwafi.
Magance wannan batu yana buฦatar aiki tare da waษannan ษakunan karatu, tare da tabbatar da cewa sun samo asali daga nau'i ษaya na ajin iyaye, don haka kawar da kwafi.
Magance Batun 'Kwafin Aji'
Don magance kuskuren 'Duplicate class android.support.v4.app', mai haษakawa dole ne ya fara gane kuma ya gano ษakunan karatu masu cin karo da juna. Wannan yawanci ya ฦunshi binciken kusa da sashin dogara na fayil ษin build.gradle na aikace-aikacen. Bayan gano ษakunan karatu masu cin karo da juna, ana iya maye gurbinsu da abubuwan dogaro masu dacewa waษanda aka daidaita kuma an samo su daga nau'ikan ajin iyaye ษaya.
Canje-canje ya kamata a bayyana kamar haka:
dependencies { implementation fileTree(dir: 'libs', include: ['*.jar']) implementation 'com.android.support:appcompat-v7:28.0.0' implementation 'com.android.support.constraint:constraint-layout:1.1.3' testImplementation 'junit:junit:4.12' androidTestImplementation 'com.android.support.test:runner:1.0.2' androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.2' }
Fahimtar Lambobin: Tafiya Ta Mataki-Ta-Tafi
A cikin fayil ษin Gradle da aka sabunta, duk abin dogara yanzu an daidaita su kuma daga sigar ษakin ษakin karatu na iyaye ษaya, don haka kawar da kuskuren 'Duplicate class android.support.v4.app'.
A cikin wannan fayil ษin, kalmar 'aiwatarwa' tana nufin ษakunan karatu waษanda software ta dogara da su. Misali, 'com.android.support:appcompat-v7:28.0.0' babban ษakin karatu ne wanda aikace-aikacen ke buฦata don gudanar da shi.
Mabuษin 'testImplementation' yana nufin ษakin karatu na gwaji don gudanar da gwaje-gwaje a cikin yanayin ci gaba. 'junit:junit:4.12', alal misali, ษakin karatu ne da ake amfani da shi don gudanar da gwaje-gwaje.
A ฦarshe, kuskuren 'Duplicate class android.support.v4.app' yana fitowa daga sabani a cikin ษakunan karatu masu dogaro da ke cikin fayil ษin Gradle na aikace-aikacen. Ta hanyar ganowa da daidaita waษannan ษakunan karatu, mai haษakawa zai iya gyara wannan kuskure cikin sauฦi. Wannan dabarar tana nuna mahimmancin fahimtar abin dogaro da sarrafa su a fagen haษaka software.
[b]Bi waษannan matakan yana tabbatar da cewa amfani da ajin android.support.v4.app baya haifar da matsalolin kwafi - don haka kiyaye mutunci da kwanciyar hankali na aikace-aikacenku.[/b]