After start using constraint layout my app does not build. It shows an error
This thing maybe fixed when I implement each library separately.
This error FOR now doesn't show but and not compile
Now dependencies like this
dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])
implementation 'com.android.support:multidex:1.0.3'
implementation 'com.android.support:support-v4:27.1.0'
implementation 'com.android.support:cardview-v7:27.1.0'
implementation 'com.android.support:animated-vector-drawable:27.1.0'
implementation 'com.android.support:customtabs:27.1.0'
implementation 'com.android.support:appcompat-v7:27.1.0'
implementation 'com.android.support:design:27.1.0'
implementation 'com.android.support.constraint:constraint-layout:1.0.2'
I have done already Clean -> Rebuild also i tried to change libraries from that error manually but no results. Also after all that work with manual working i received new error
My OLD VERSION gradle file code below
apply plugin: 'com.android.application'
android {
compileSdkVersion 27
defaultConfig {
applicationId "com.borisruzanov.myapp"
minSdkVersion 21
targetSdkVersion 27
versionCode 1
versionName "1.0"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
resConfigs "auto"
// Enabling multidex support.
multiDexEnabled true
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
}
dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])
implementation 'com.android.support:multidex:1.0.3'
implementation 'com.android.support:support-v4:27.1.0'
implementation 'com.android.support:appcompat-v7:27.1.0'
implementation 'com.android.support:design:27.1.0'
implementation 'com.android.support.constraint:constraint-layout:1.0.2'
testImplementation 'junit:junit:4.12'
androidTestImplementation 'com.android.support.test:runner:1.0.1'
androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.1'
//General
compile 'com.facebook.android:facebook-android-sdk:4.29.0'
//Firebase
compile 'com.google.firebase:firebase-core:11.8.0'
compile 'com.google.firebase:firebase-database:11.8.0'
compile 'com.google.firebase:firebase-auth:11.8.0'
compile 'com.google.firebase:firebase-storage:11.8.0'
implementation 'com.firebaseui:firebase-ui-auth:3.2.1'
implementation 'com.firebaseui:firebase-ui-database:3.2.1'
compile 'com.google.firebase:firebase-messaging:11.8.0'
compile 'com.google.firebase:firebase-config:11.8.0'
//Images
implementation 'com.github.bumptech.glide:glide:4.6.1'
annotationProcessor 'com.github.bumptech.glide:compiler:4.6.1'
compile 'de.hdodenhof:circleimageview:2.2.0'
compile 'com.theartofdev.edmodo:android-image-cropper:2.6.+'
compile 'com.squareup.picasso:picasso:2.5.2'
compile 'id.zelory:compressor:2.1.0'
//Network
compile 'com.squareup.okhttp:okhttp:2.7.5'
compile 'com.android.support:cardview-v7:27.1.0'
}
apply plugin: 'com.google.gms.google-services'
Figured out that Firebase using support library different version. How I can change it ?
I was facing this from two days and now I solved it today these are the steps
First Try this in your app level gradle file
implementation('com.github.bumptech.glide:glide:4.6.1') {
exclude group: 'com.android.support'
}`
if it does not solve try logging dependencies run this command
./gradlew -q dependencies app:dependencies --configuration compile
in your android studio's Terminal Tab it will log all the dependency tree of your project
then find which libraries are using duplicating dependencies
for example
implementation 'com.github.bumptech.glide:glide:4.6.1' is using duplicate dependencies
so change
implementation 'com.github.bumptech.glide:glide:4.6.1'
to
implementation('com.github.bumptech.glide:glide:4.6.1') {
exclude group: 'com.android.support'
}
Thats It..
Related
I have Created an application in android, and hosted in play store
the application works fine in all version except android 9. when i search my application
in android pie version using playstore, it is not showing my application,
I had set the sdk version to 28, but it is not showing my application.
I don't know what is the problem. Please help to solve the problem.
Thanks in advance.
apply plugin: 'com.android.application'
android {
compileSdkVersion 28
buildToolsVersion '28.0.2'
defaultConfig {
applicationId "com.sample.name"
minSdkVersion 19
targetSdkVersion 28
versionCode 42
versionName "5.1"
multiDexEnabled true
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
}
buildTypes {
release {
minifyEnabled true
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
}
dependencies {
implementation fileTree(include: ['*.jar'], dir: 'libs')
androidTestImplementation('com.android.support.test.espresso:espresso-core:2.2.2', {
exclude group: 'com.android.support', module: 'support-annotations'
})
implementation 'com.android.support:appcompat-v7:28.0.0'
implementation 'com.android.support:design:28.0.0'
// compile 'com.squareup.retrofit2:retrofit:2.4.0'
// compile 'com.squareup.retrofit2:converter-gson:2.4.0'
implementation 'org.apache.commons:commons-lang3:3.4'
implementation 'com.squareup.okhttp3:logging-interceptor:3.11.0'
// compile 'com.squareup.okio:okio:1.3.0'
implementation 'com.android.support:cardview-v7:28.0.0'
implementation 'com.android.support:recyclerview-v7:28.0.0'
implementation 'com.android.support:support-v4:28.0.0'
implementation 'com.google.code.gson:gson:2.8.5'
implementation 'com.squareup.retrofit2:retrofit:2.4.0'
implementation 'com.squareup.retrofit2:converter-gson:2.4.0'
// compile 'com.razorpay:checkout:1.4.7'
//compile 'com.razorpay:checkout:1.4.8'
implementation 'com.razorpay:checkout:1.4.9'
implementation 'com.squareup.okhttp3:okhttp:3.11.0'
implementation 'com.squareup.okhttp3:okhttp-urlconnection:3.11.0'
implementation 'org.jsoup:jsoup:1.8.3'
implementation 'com.github.hotchemi:android-rate:1.0.1'
//compile 'com.google.firebase:firebase-database:11.8.0'
implementation 'com.google.firebase:firebase-database:16.0.1'
//compile 'com.google.firebase:firebase-messaging:1
// 1.4.2'
//compile 'com.google.firebase:firebase-core:11.4.2'
implementation 'com.google.firebase:firebase-messaging:17.3.0'
//compile 'com.google.firebase:firebase-messaging:11.8.0'
implementation 'com.github.danielemaddaluno.androidupdatechecker:library:1.0.2'
//compile 'com.google.firebase:firebase-core:11.8.0'
implementation 'com.google.firebase:firebase-core:16.0.1'
implementation 'com.google.android.gms:play-services-gcm:15.0.0'
// compile 'com.google.android.gms:play-services-analytics:16.0.1'
//compile 'com.google.android.gms:play-services-analytics:11.8.0'
implementation 'com.github.kassisdion:ViewPagerWithIndicator:v1.0'
implementation 'com.squareup.picasso:picasso:2.5.2'
annotationProcessor 'com.jakewharton:butterknife-compiler:8.5.1'
testImplementation 'junit:junit:4.12'
implementation files('libs/PGSDK_V2.0.jar')
}
apply plugin: 'com.google.gms.google-services'
I've gone through several threads with the same error to find a solution (they mention duplicate package names in gradle files, duplicates in AndroidManifests and dependency version mismatches) but none are the same with my case. This is the error message I'm receiving when building the app:
Program type already present: ff.ecochallenges.game.BuildConfig
Message{kind=ERROR, text=Program type already present: ff.ecochallenges.game.BuildConfig, sources=[Unknown source file], tool name=Optional.of(D8)}
My app gradle file looks like this:
apply plugin: 'com.android.application'
android {
compileSdkVersion 27
defaultConfig {
applicationId "ff.ecochallenges"
minSdkVersion 21
targetSdkVersion 27
versionCode 1
versionName "1.0"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
}
dependencies {
implementation fileTree(include: ['*.jar'], dir: 'libs')
//noinspection GradleCompatible
implementation 'com.android.support:appcompat-v7:27.1.1'
implementation 'com.android.support:design:27.0.2'
implementation 'com.android.support.constraint:constraint-layout:1.0.2'
implementation 'com.google.firebase:firebase-storage:16.0.1'
implementation 'com.google.firebase:firebase-firestore:17.1.0'
implementation 'com.android.support:support-v4:27.1.1'
testImplementation 'junit:junit:4.12'
androidTestImplementation 'com.android.support.test:runner:1.0.1'
androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.2'
implementation 'com.android.support:cardview-v7:27.0.2'
implementation 'com.android.support:recyclerview-v7:27.0.2'
implementation 'com.squareup.picasso:picasso:2.71828'
implementation 'com.google.firebase:firebase-auth:16.0.3'
implementation 'com.google.firebase:firebase-database:16.0.1'
implementation 'com.firebaseui:firebase-ui-auth:4.1.0'
implementation 'com.google.firebase:firebase-core:16.0.1'
implementation 'com.firebaseui:firebase-ui-storage:0.6.0'
implementation 'com.github.bumptech.glide:glide:3.7.0'
implementation 'com.firebaseui:firebase-ui-database:4.1.0'
implementation 'com.inthecheesefactory.thecheeselibrary:stated-fragment-support-v4:0.9.1'
implementation 'com.google.android.gms:play-services-auth:16.0.0'
implementation 'com.github.PhilJay:MPAndroidChart:v3.0.3'
implementation 'com.github.varunest:sparkbutton:1.0.5'
implementation 'info.hoang8f:android-segmented:1.0.6'
implementation "com.android.support:support-compat:27.1.1"
implementation project(":garden-release")
implementation fileTree(dir: 'libs', include: ['*.jar'])
implementation project(":game")
// Required for local unit tests (JUnit 4 framework)
// Required for instrumented tests
androidTestImplementation 'com.android.support:support-annotations:24.0.0'
androidTestImplementation 'com.android.support.test:runner:0.5'
}
apply plugin: 'com.google.gms.google-services'
And the gradle for the new library I added (game) is this:
apply plugin: 'com.android.library'
android {
compileSdkVersion 27
defaultConfig {
minSdkVersion 21
targetSdkVersion 27
versionCode 1
versionName "1.0"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
//[DO NOT REMOVE THE COMMENTED CODE BELOW!]
//////////////////////////////////////////////////////
afterEvaluate {
assembleDebug.finalizedBy(exportJar)
}
/////////////////////////////////////////////////////
//[DO NOT REMOVE THE COMMENTED CODE ABOVE!]
}
dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])
//noinspection GradleCompatible
implementation 'com.android.support:appcompat-v7:27.1.1'
implementation 'com.google.firebase:firebase-database:16.0.1'
implementation 'com.google.firebase:firebase-core:16.0.1'
implementation 'com.android.support.constraint:constraint-layout:1.1.2'
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'
}
//[DO NOT REMOVE THE COMMENTED CODE BELOW!]
///////////////////////////////////////////////////////////////////////////////////////////////////
task exportJar(type: Copy) {
from('build/intermediates/packaged-classes/debug/classes.jar')
include('classes.jar')
into('../garden/Assets/Plugins/Android')
rename('classes.jar', 'ecochallenges.jar')
}
task deleteOldJar(type: Delete) {
delete '../garden/Assets/Plugins/Android/ecochallenges.jar'
}
exportJar.dependsOn(deleteOldJar)
///////////////////////////////////////////////////////////////////////////////////////////////////
//[DO NOT REMOVE THE COMMENTED CODE ABOVE!]
When I comment out the "implementation project(":game")" line in my app gradle it builds without error so I'm sure something's wrong with the "game" gradle but I can't find what it is.
one of these lines might define ff.ecochallenges.game twice:
implementation fileTree(dir: 'libs', include: ['*.jar'])
implementation project(":garden-release")
implementation project(":game")
would assume, that there either is a .jar contained in the libs directory
or module garden-release might have a dependency on module game.
eg. you could use api project(":game") in module garden-release.
In my case I only run Build->Clean Project and problem have been solved!
I have a problem in gradle configuration, I get this error
All com.android.support libraries must use the exact same version specification (mixing versions can lead to runtime crashes). Found versions 28.0.0-alpha1, 27.1.1, 27.0.2. Examples include `com.android.support:animated-vector-drawable:28.0.0-alpha1` and `com.android.support:cardview-v7:27.1.1`
https://image.ibb.co/gwJ16n/Untitled.png "error"
How do I fix this problem?
Here is the complete buil.gradle configuration.
apply plugin: 'com.android.application'
android {
compileSdkVersion 27
defaultConfig {
applicationId "com.sakan"
minSdkVersion 15
targetSdkVersion 27
versionCode 1
versionName "1.0"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
}
dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])
implementation 'com.android.support:appcompat-v7:27.1.1'
implementation 'com.android.support.constraint:constraint-layout:1.1.0'
testImplementation 'junit:junit:4.12'
androidTestImplementation 'com.android.support.test:runner:1.0.1'
androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.1'
implementation 'com.android.support:design:27.1.1'
implementation 'com.android.support:cardview-v7:27.1.1'
implementation 'com.android.support:recyclerview-v7:27.1.1'
implementation 'com.github.linger1216:labelview:v1.1.1'
implementation 'com.github.ViksaaSkool:AwesomeSplash:v1.0.0'
implementation 'com.nineoldandroids:library:2.4.0'
implementation 'com.daimajia.easing:library:1.0.1#aar'
implementation 'com.daimajia.androidanimations:library:1.1.3#aar'
implementation 'com.android.support:multidex:1.0.3'
implementation 'com.google.android.gms:play-services-maps:15.0.0'
implementation 'com.google.android.gms:play-services-location:15.0.0'
implementation 'com.facebook.android:facebook-android-sdk:4.32.0'
implementation group:'com.squareup.picasso', name:'picasso', version:'2.5.0'
implementation 'com.github.chenupt.android:springindicator:1.0.2#aar'
implementation 'me.relex:circleindicator:1.2.2#aar'
implementation 'com.txusballesteros:bubbles:1.2.1'
implementation 'com.romainpiel.shimmer:library:1.4.0#aar'
implementation 'tyrantgit:explosionfield:1.0.1'
implementation 'com.github.ksoichiro:android-observablescrollview:1.5.0'
implementation 'com.nineoldandroids:library:2.4.0'
implementation 'com.github.bumptech.glide:glide:3.7.0'
implementation 'com.google.android.gms:play-services-auth:15.0.0'
implementation 'com.jakewharton:butterknife:7.0.1'
implementation 'com.mcxiaoke.volley:library-aar:1.0.0'
implementation 'com.loopj.android:android-async-http:1.4.9'
implementation 'com.github.darsh2:MultipleImageSelect:v0.0.4'
implementation 'com.facebook.android:facebook-android-sdk:4.32.0'
implementation 'com.android.support.constraint:constraint-layout:1.1.0'
implementation 'com.google.firebase:firebase-appindexing:15.0.0'
implementation 'com.github.manuelpeinado.fadingactionbar:fadingactionbar:3.1.2'
implementation 'com.github.manuelpeinado.fadingactionbar:fadingactionbar-abc:3.1.2'
}
I think one of the dependencies is using a different target version, I don't know how to fix this problem.
Add this to the very end of your build.gradle (Module:app):
configurations.all {
resolutionStrategy.eachDependency { details ->
def requested = details.requested
if (requested.group == 'com.android.support') {
if (!requested.name.startsWith("multidex")) {
details.useVersion '27.1.1'
}
}
}
}
Make sure that you replace '27.1.1' with the version of the android support library that you want to use for all the dependencies , it should not be lower than your complile sdk version
than re sync gradle
I found this answer in : here
try to change config in build.gradle, as below
configurations.all {
resolutionStrategy {
force 'com.android.support:design:27.0.2'
force 'com.android.support:support-v4:27.0.2'
force 'com.android.support:appcompat-v7:27.0.2'
}
}
It makes forcefull changed to stated version, sometimes this is needed for signed apks
EDIT 1:
The error which is shown in image, won't bother builiding apk.
The error here is of aapt2.
By default aapt2 is enabled from gradle version 3.0+, you need to disable it by adding android.enableAapt2=false to gradle.properties file.
If it doesn't work, look for solution for aapt2 errors.
I have run build apk with above, by forcing support version as above, works fine for me, although error line didn't disappear
Change build.gradle to -> dependencies {
implementation 'com.android.support:appcompat-v7:27.1.1'
implementation 'com.android.support.constraint:constraint-layout:1.1.0'
}
The error is Error
:Execution failed for task
':app:transformDexArchiveWithExternalLibsDexMergerForDebug'. >
java.lang.RuntimeException: java.lang.RuntimeException:
com.android.builder.dexing.DexArchiveMergerException: Unable to merge dex
I have tried all the solutions given on stackoverflow but none of them worked for me.
This is app level gradle file. I think I am using all the latest dependencies.
app level build.gradle file is uploaded here. help me to solve this problem
apply plugin: 'com.android.application'
android {
compileSdkVersion 26
defaultConfig {
applicationId"com.example.pratikrathi.registerapp"
minSdkVersion 20
targetSdkVersion 26
versionCode 1
versionName "1.0"
multiDexEnabled = true
testInstrumentationRunner
"android.support.test.runner.AndroidJUnitRunner"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'),
'proguard-rules.pro'
}
}
}
dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])
implementation 'com.android.support:appcompat-v7:26.1.0'
implementation 'com.android.support:design:26.1.0'
implementation 'com.android.support.constraint:constraintlayout:1.0.2'
implementation 'com.android.support:cardview-v7:26.1.0'
implementation 'com.google.firebase:firebase-auth:11.8.0'
compile 'com.google.firebase:firebase-core:11.8.0'
compile 'com.google.firebase:firebase-database:11.8.0'
compile 'com.google.firebase:firebase-storage:11.8.0'
compile 'com.google.firebase:firebase-firestore:11.8.0'
compile 'com.google.firebase:firebase-crash:11.8.0'
implementation 'com.android.support:support-v4:26.1.0'
testImplementation 'junit:junit:4.12'
androidTestImplementation 'com.android.support.test:runner:1.0.1'
androidTestImplementation
'com.android.support.test.espresso:espresso-core:3.0.1'
compile 'de.hdodenhof:circleimageview:2.2.0'
compile 'com.theartofdev.edmodo:android-image-cropper:2.6.+'
implementation 'com.github.bumptech.glide:glide:4.6.1'
annotationProcessor 'com.github.bumptech.glide:compiler:4.6.1'
}
apply plugin: 'com.google.gms.google-services'
You are mixing old firebase dependencies with the new firebase dependencies.
You need to remove the following from your root build.gradle dependencies:
classpath 'com.firebase:firebase-client-android:2.3.1'
Then check and remove old firebase depedencies from your module build.gradle. Please read https://firebase.google.com/support/guides/google-android
UPDATE
You also have a duplicated support library.
'com.theartofdev.edmodo:android-image-cropper:2.6.+' library implicitly using support library version 27+, which you can check from its root build.gradle.
You can fix it by exclude support library from image-cropper like this:
implementation ("com.theartofdev.edmodo:android-image-cropper:2.6.+") {
exclude group: 'com.android.support'
exclude module: 'appcompat-v7'
}
Or updating all of your support library to version 27.1.0.
I started getting the below error
Error:Execution failed for task ':app:transformDexArchiveWithExternalLibsDexMergerForDebug'.
java.lang.RuntimeException: java.lang.RuntimeException: com.android.builder.dexing.DexArchiveMergerException: Unable to merge dex
I tried to reset my backup when it was working but the same problem
I tried all the solution such as
multiDexEnabled true
cleaning and rebuilding the project, but it didn't work. Any help will be appreciated.
App file
apply plugin: 'com.android.application'
android {
compileSdkVersion 27
buildToolsVersion '27.0.2'
defaultConfig {
applicationId "com.example"
minSdkVersion 18
targetSdkVersion 27
versionCode 1
versionName "1.0"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
multiDexEnabled true
resConfigs "auto"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
}
ext {
supportLibraryVersion = '27.0.2'
grpcVersion = '1.4.0'
}
dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])
compile 'com.android.support.constraint:constraint-layout:1.0.2'
testCompile 'junit:junit:4.12'
testImplementation 'junit:junit:4.12'
//appcompat libraries
compile 'com.android.support:design:27.0.2'
compile 'com.android.support:appcompat-v7:27.0.2'
implementation 'com.android.support:support-v4:27.1.0'
//butterknife
compile 'com.jakewharton:butterknife:8.8.1'
annotationProcessor 'com.jakewharton:butterknife-compiler:8.8.1'
//retrofit
implementation 'com.squareup.retrofit2:retrofit:2.3.0'
implementation 'com.squareup.retrofit2:converter-gson:2.1.0'
implementation 'com.squareup.okhttp3:okhttp:3.8.0'
implementation 'com.jakewharton.retrofit:retrofit1-okhttp3-client:1.0.2'
implementation 'com.android.support.constraint:constraint-layout:1.0.2'
implementation 'com.scottyab:aes-crypto:0.0.4'
//circleimageview
implementation 'de.hdodenhof:circleimageview:2.2.0'
//ZXing for barCode reader
compile 'com.journeyapps:zxing-android-embedded:3.2.0#aar'
compile 'com.google.zxing:core:3.2.1'
//gson
compile 'com.google.code.gson:gson:2.8.2'
//recyclerview and cardview
implementation 'com.android.support:cardview-v7:27.0.2'
compile 'com.android.support:recyclerview-v7:+'
//play-services
compile 'com.google.android.gms:play-services-maps:11.8.0'
implementation 'com.github.bumptech.glide:glide:4.3.1'
implementation 'com.jaeger.statusbarutil:library:1.4.0'
androidTestImplementation 'com.android.support.test:runner:1.0.1'
androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.1'
compile 'com.android.support:support-annotations:27.0.2'
compile 'com.wang.avi:library:2.1.3'
}
Project file
buildscript {
repositories {
google()
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:3.0.1'
}
}
allprojects {
repositories {
google()
jcenter()
}
}
task clean(type: Delete) {
delete rootProject.buildDir
}
I had looked at many other questions and answers on here but cannot seem to find a solution that will rectify the problem :(
I have solved after try all the solutions on stackoverflow, try to do the following steps in its order
Replace all compile with implementation
Make all supportLibraryVersion = '27.0.2'
Change
'com.google.android.gms:play-services-maps:11.8.0'
to
'com.google.android.gms:play-services-maps:11.4.0'
Remove all the unused library
Delete the .gradle folder inside your project
Remove build folders and the gradle cache
file -> invalidate caches/restart
Build > Clean Project
Add
dependencies { implementation 'com.android.support:multidex:1.0.1'}
Add
android {
defaultConfig {
multiDexEnabled true
}
}
Async project
And finally this is my App file
apply plugin: 'com.android.application'
android {
compileSdkVersion 27
defaultConfig {
applicationId "com.example"
minSdkVersion 18
targetSdkVersion 27
versionCode 1
versionName "1.0"
multiDexEnabled true
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
}
ext {
supportLibraryVersion = '27.0.2'
}
dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])
testImplementation 'junit:junit:4.12'
androidTestImplementation 'com.android.support.test:runner:1.0.1'
androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.1'
implementation 'com.android.support:support-v4:27.0.2'
implementation 'com.android.support:appcompat-v7:27.0.2'
implementation 'com.android.support:design:27.0.2'
//constraint
implementation 'com.android.support.constraint:constraint-layout:1.0.2'
//butterknife
implementation 'com.jakewharton:butterknife:8.8.1'
annotationProcessor 'com.jakewharton:butterknife-compiler:8.8.1'
//avi:library
implementation 'com.wang.avi:library:2.1.3'
//circleimageview
implementation 'de.hdodenhof:circleimageview:2.2.0'
//retrofit2
implementation 'com.squareup.retrofit2:retrofit:2.3.0'
implementation 'com.squareup.retrofit2:converter-gson:2.1.0'
implementation 'com.squareup.okhttp3:okhttp:3.8.0'
implementation 'com.jakewharton.retrofit:retrofit1-okhttp3-client:1.0.2'
//recyclerview and cardview
implementation 'com.android.support:recyclerview-v7:27.0.2'
implementation 'com.android.support:cardview-v7:27.0.2'
//ZXing for barCode reader
implementation 'com.journeyapps:zxing-android-embedded:3.2.0#aar'
implementation 'com.google.zxing:core:3.2.1'
//play-services
implementation 'com.google.android.gms:play-services-maps:11.4.0'
//gson
implementation 'com.google.code.gson:gson:2.8.2'
//statusbarutil
implementation 'com.jaeger.statusbarutil:library:1.4.0'
//glide
implementation 'com.github.bumptech.glide:glide:4.6.1'
annotationProcessor 'com.github.bumptech.glide:compiler:4.6.1'
//multidex
implementation 'com.android.support:multidex:1.0.1'
}
ِِActually I didn't understand the real reason about it and why that happened suddenly
So if anyone know that please tell me with full details
I hope this will help you
this worked for me after couple of hours wasting time
just do this
Implementation >>> annotationProcessor