After doing some refactors on my build.gradle, i can't stop having this error.
My application Class extends Multidex and is installed on attachBaseContext.
Clean + Rebuild don't work :(
I googled a lot, and i can't find anything. Can anyone help me?
Error:
java.io.IOException: Can't write [/build/intermediates/multi-dex/debug/componentClasses.jar] (Can't read [/build/intermediates/transforms/desugar/debug/106.jar(;;;;;;**.class)] (Duplicate zip entry [106.jar:android/support/design/widget/CoordinatorLayout$Behavior.class]))
build.gradle
tasks.whenTaskAdded { task ->
if (task.name == "lintVitalRelease") {
task.enabled = false
}
}
apply plugin: 'project-report'
apply plugin: 'com.android.application'
apply plugin: 'realm-android'
repositories {
maven { url "https://jitpack.io" }
maven { url 'https://repo.spring.io/libs-milestone' }
maven { url 'https://maven.fabric.io/public' }
mavenCentral()
google()
}
buildscript {
repositories {
maven { url 'https://maven.fabric.io/public' }
mavenCentral()
}
dependencies { classpath 'io.fabric.tools:gradle:1.24.3' }
}
android {
compileSdkVersion 27
buildToolsVersion '26.0.2'
defaultConfig {
applicationId "appIdHere"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
minSdkVersion 17
targetSdkVersion 27
versionName "3.2.0.0"
versionCode 13
multiDexEnabled true
}
dataBinding.enabled = true
compileOptions {
sourceCompatibility 1.8
targetCompatibility 1.8
}
signingConfigs {
release {
storeFile file(RELEASE_STORE_FILE)
storePassword RELEASE_STORE_PASSWORD
keyAlias RELEASE_KEY_ALIAS
keyPassword RELEASE_KEY_PASSWORD
}
}
buildTypes {
release {
signingConfig signingConfigs.release
}
}
dexOptions {
preDexLibraries = false
javaMaxHeapSize "2g"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
lintOptions {
abortOnError false
}
packagingOptions {
exclude 'META-INF/NOTICE'
exclude 'META-INF/LICENSE'
exclude 'META-INF/notice'
exclude 'META-INF/notice.txt'
exclude 'META-INF/license'
exclude 'META-INF/license.txt'
exclude 'META-INF/rxjava.properties'
}
}
dependencies {
ext {
android = '27.0.2'
firebase = '10.2.0'
}
implementation fileTree(include: ['*.jar'], dir: 'libs')
implementation "com.android.support:appcompat-v7:$android"
implementation "com.android.support:cardview-v7:$android"
implementation "com.android.support:recyclerview-v7:$android"
implementation "com.android.support:design:$android"
implementation "com.android.support:palette-v7:$android"
implementation "com.android.support:support-v4:$android"
implementation "com.google.android.gms:play-services:10.2.0"
implementation 'com.squareup.okhttp3:okhttp:3.10.0'
implementation 'com.google.guava:guava:23.0-android'
implementation('com.crashlytics.sdk.android:crashlytics:2.7.0#aar') {transitive = true}
implementation 'com.android.support:multidex:1.0.2'
implementation 'com.google.code.gson:gson:2.8.2'
implementation 'net.danlew:android.joda:2.9.4.2'
implementation 'de.hdodenhof:circleimageview:2.1.0'
implementation 'com.orhanobut:logger:1.15'
implementation 'com.joanzapata.iconify:android-iconify-fontawesome:2.2.2'
implementation 'com.beardedhen:androidbootstrap:1.2.3'
implementation 'com.github.aakira:expandable-layout:1.6.0#aar'
implementation 'com.rengwuxian.materialedittext:library:2.1.4'
implementation 'io.realm:android-adapters:2.0.0'
implementation 'com.github.bumptech.glide:glide:3.7.0'
implementation 'com.github.bluejamesbond:textjustify-android:2.1.6'
implementation 'com.github.darsh2:MultipleImageSelect:v0.0.4'
implementation 'com.daimajia.swipelayout:library:1.2.0#aar'
implementation 'com.mcxiaoke.volley:library:1.0.19'
implementation 'com.oguzdev:CircularFloatingActionMenu:1.0.2'
implementation 'br.com.jansenfelipe:androidmask:1.0.1'
implementation 'cat.ereza:customactivityoncrash:1.5.0'
implementation 'com.github.piasy:rxandroidaudio:1.5.1'
implementation 'com.github.chrisbanes:PhotoView:2.1.2'
implementation 'com.github.sharish:CreditCardView:v1.0.4'
implementation 'me.shaohui.advancedluban:library:1.3.5'
implementation 'com.github.jkwiecien:EasyImage:2.0.4'
implementation 'com.jakewharton:butterknife:8.8.1'
implementation 'me.relex:circleindicator:1.2.2#aar'
implementation 'com.github.amlcurran.showcaseview:library:5.4.3'
implementation 'com.github.deano2390:MaterialShowcaseView:1.2.0#aar'
implementation 'com.theartofdev.edmodo:android-image-cropper:2.6.0'
implementation 'com.android.support.constraint:constraint-layout:1.0.2'
implementation 'io.reactivex:rxjava:1.1.1'
annotationProcessor 'com.jakewharton:butterknife-compiler:8.8.1'
androidTestCompile 'junit:junit:4.12'
}
apply plugin: "com.google.gms.google-services"
apply plugin: 'io.fabric'
Related
I am working on native android project, I am migrating project code from support library to AndroidX.After that I have also fixed code related issue manually which are not fixed automatically by studio using Migate To AndroidX option.
After upgrading project code to AndroidX getting build errors for drawable.xml files.
here is screenshot of build error:
build error image
[1]: https://i.stack.imgur.com/OtHE5.png
**Project level build gradle :**
buildscript {
repositories {
mavenCentral()
google()
jcenter()
maven {
url 'https://maven.google.com/'
// name 'Google'
}
}
dependencies {
classpath 'com.android.tools.build:gradle:4.1.2' //4.1.2 //3.0.0
classpath 'com.google.gms:google-services:4.0.1'
classpath "io.realm:realm-gradle-plugin:2.2.1"
classpath 'com.google.firebase:firebase-plugins:1.1.5'
classpath 'com.github.dcendents:android-maven-gradle-plugin:1.5'
}
}
allprojects {
repositories {
google()
jcenter()
maven { url 'https://jitpack.io' }
// maven {
maven {
url 'https://github.com/QuickBlox/quickblox-android-sdk-releases/raw/master/'
}
// }
maven { url 'https://maven.google.com/' }
}
}
task clean(type: Delete) {
delete rootProject.buildDir
}
ext{
// Sdk and tools
minSdkVersion = 21
targetSdkVersion = 29
compileSdkVersion = 29
gmsVersion = "16.1.0"
}
**App level build.gradle file :**
apply plugin: 'com.android.application'
apply plugin: 'realm-android'
buildscript {
repositories {
// maven { url 'https://maven.fabric.io/public' }
}
dependencies {
// These docs use an open ended version so that our plugin
// can be updated quickly in response to Android tooling updates
// We recommend changing it to the latest version from our changelog:
// https://docs.fabric.io/android/changelog.html#fabric-gradle-plugin
// classpath 'io.fabric.tools:gradle:1.+'
}
}
//apply plugin: 'io.fabric'
repositories {
//maven { url 'https://maven.fabric.io/public' }
}
allprojects {
repositories {
jcenter()
maven {
url "https://maven.google.com"
}
}
}
android {
useLibrary 'org.apache.http.legacy'
signingConfigs {
}
lintOptions {
abortOnError false
checkReleaseBuilds false
disable 'InvalidPackage'
}
buildTypes {
release {
debuggable false
proguardFiles getDefaultProguardFile('proguard-android.txt'),'proguardrules.pro'
signingConfig signingConfigs.config
}
debug {
debuggable true
signingConfig signingConfigs.config
}
}
compileSdkVersion rootProject.ext.compileSdkVersion
defaultConfig {
applicationId "com.app.homemade"
minSdkVersion rootProject.ext.minSdkVersion
targetSdkVersion rootProject.ext.targetSdkVersion
// versionCode 21
// versionName "2.0"
versionCode 21
versionName "2.1"
testInstrumentationRunner 'androidx.test.runner.AndroidJUnitRunner'
multiDexEnabled true
signingConfig signingConfigs.config
}
dexOptions {
javaMaxHeapSize "4g"
}
productFlavors {
}
packagingOptions {
exclude 'META-INF/DEPENDENCIES'
exclude 'META-INF/NOTICE'
exclude 'META-INF/LICENSE'
exclude 'META-INF/DEPENDENCIES.txt'
exclude 'META-INF/LICENSE.txt'
exclude 'META-INF/NOTICE.txt'
exclude 'META-INF/NOTICE'
exclude 'META-INF/LICENSE'
exclude 'META-INF/DEPENDENCIES'
exclude 'META-INF/notice.txt'
exclude 'META-INF/license.txt'
exclude 'META-INF/dependencies.txt'
exclude 'META-INF/LGPL2.1'
exclude 'META-INF/proguard/androidx-annotations.pro' //added
}
compileOptions {
// sourceCompatibility JavaVersion.VERSION_1_7
// targetCompatibility JavaVersion.VERSION_1_7
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
}
sourceSets {
main {
assets.srcDirs = ['src/main/assets', 'src/main/assets/fonts']
resources.srcDirs = ['src/main/resources', 'src/main/java/org.jivesoftware.smack']
}
}
}
repositories {
jcenter()
mavenCentral()
maven { url "https://jitpack.io" }
flatDir {
dirs 'libs'
}
}
configurations.all {
resolutionStrategy.eachDependency { details ->
def requested = details.requested
if (requested.group == 'com.android.support') {
if (!requested.name.startsWith("multidex")) {
details.useVersion '28.0.0'
}
}
}
}
dependencies {
implementation fileTree(include: ['*.jar'], dir: 'libs')
implementation 'androidx.legacy:legacy-support-v4:1.0.0'
implementation 'androidx.appcompat:appcompat:1.2.0'
implementation 'androidx.constraintlayout:constraintlayout:2.0.4'
implementation 'com.google.android.gms:play-services-auth:16.0.1' //16.0.1
implementation "com.google.android.gms:play-services-maps:$rootProject.ext.gmsVersion"
implementation 'com.google.android.gms:play-services-location:16.0.0' //16.0.0
implementation 'com.google.android.gms:play-services-places:16.0.0' //16.0.0
// implementation 'com.google.android.gms:play-services-vision:16.2.0'
implementation 'com.google.firebase:firebase-core:17.5.1'
implementation 'com.google.firebase:firebase-iid:17.1.0' //17.1.0
implementation 'com.google.firebase:firebase-auth:16.0.4' //16.0.4
implementation 'com.google.firebase:firebase-messaging:17.4.0' //17.4.0
implementation 'com.google.firebase:firebase-crash:16.2.1'
implementation 'com.braintreepayments.api:drop-in:3.7.1' //5.1.0
implementation project(':chatinterface')
implementation project(':library')
implementation project(':jiaozivideoplayer')
implementation project(':cropper')
implementation 'io.pristine:libjingle:9690#aar'
implementation 'androidx.multidex:multidex:2.0.1' //1.0.1
implementation 'androidx.recyclerview:recyclerview:1.1.0'
implementation 'androidx.cardview:cardview:1.0.0'
implementation 'com.google.android.material:material:1.3.0'
implementation 'com.github.CiaoIM:emojicon:v1.0.1'
implementation 'com.romainpiel.shimmer:library:1.4.0#aar'
implementation 'pl.droidsonroids.gif:android-gif-drawable:1.1.+' //1.1.+
implementation 'com.github.danielnilsson9:color-picker-view:1.4.0#aar'
implementation 'com.nineoldandroids:library:2.4.0+' //2.4.0+
implementation 'com.github.chrisbanes:PhotoView:1.2.6'
implementation 'com.squareup.picasso:picasso:2.5.2' //2.5.2
implementation 'com.github.bumptech.glide:glide:3.7.0'
implementation 'io.realm:android-adapters:1.3.0#aar'
implementation 'com.googlecode.libphonenumber:libphonenumber:7.4.3'
implementation 'org.apache.httpcomponents:httpmime:4.2.1' //4.2.1
implementation 'com.mcxiaoke.volley:library:1.0.19'
implementation 'com.squareup.retrofit:retrofit:1.6.1'
implementation 'com.google.code.gson:gson:2.3' //2.3
implementation 'com.squareup.okhttp:okhttp-urlconnection:2.0.0'
implementation 'com.squareup.okhttp:okhttp:2.0.0'
implementation 'log4j:log4j:1.2.17'
// compile 'com.facebook.android:facebook-android-sdk:4.22.0'
implementation 'fr.avianey.com.viewpagerindicator:library:2.4.1.1#aar'
implementation 'com.loopj.android:android-async-http:1.4.9'
implementation 'com.googlecode.mp4parser:isoparser:1.1.20'
implementation 'com.anjlab.android.iab.v3:library:1.0.44'
implementation "com.andkulikov:transitionseverywhere:1.8.0"
implementation 'de.hdodenhof:circleimageview:2.1.0' //2.1.0
implementation 'io.branch.sdk.android:library:5.+' //5.+
implementation 'com.nabinbhandari.android:permissions:3.8'
implementation 'fr.avianey.com.viewpagerindicator:library:2.4.1.1#aar'
// compile('com.crashlytics.sdk.android:crashlytics:2.10.1#aar') {
// transitive = true;
// }
}
apply plugin: 'com.google.gms.google-services'
**Gradle wrapper properties :**
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-6.5-all.zip
**gradle properties:**
org.gradle.jvmargs=-Xmx4608m -Duser.country=US -Duser.language=en
android.useAndroidX=true
android.enableJetifier=true
**tried below solutions but not worked for me:**
1. https://stackoverflow.com/questions/58084850/how-to-fix-this-error-a-failure-occurred-while-executing-com-android-build-grad
2. Created drawable-v24 folder and pasted drawables.xml resources as mentioned below
https://stackoverflow.com/questions/50079312/resource-drawable-not-found
Please let me know any solutions.
I am developing an Android app and when building the app for generating a signed file for publishing I am getting the following error.
error: cannot access zzbgl
class file for com.google.android.gms.internal.zzbgl not found
My **build.gradle (Module: app)** file is this:
`apply plugin: 'com.android.application'
buildscript {
repositories {
maven { url 'https://maven.fabric.io/public' }
}
}
android {
compileSdkVersion 27
defaultConfig {
applicationId 'com.brainoidtech.dbm'
minSdkVersion 19
targetSdkVersion 27
versionCode 1
versionName "1.0"
multiDexEnabled true
manifestPlaceholders = [onesignal_app_id: "a515bddd-f7c8-48c9-a079-372706858f8d", onesignal_google_project_number: "REMOTE"]
}
repositories {
mavenCentral()
mavenLocal() // For google-play-services is not on Maven Central.
//for vimeo video player
maven { url "https://jitpack.io" }
}
buildTypes {
release {
minifyEnabled true
proguardFiles getDefaultProguardFile('proguard-android.txt')
proguardFile 'proguard-google-api-client.txt'
proguardFile getDefaultProguardFile('proguard-android.txt')
}
}
aaptOptions {
cruncherEnabled = false
}
productFlavors {
}
lintOptions {
abortOnError false
}
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
}
packagingOptions {
exclude 'META-INF/DEPENDENCIES'
exclude 'META-INF/INDEX.LIST'
exclude 'META-INF/LICENSE'
exclude 'META-INF/LICENSE.txt'
exclude 'META-INF/license.txt'
exclude 'META-INF/NOTICE'
exclude 'META-INF/NOTICE.txt'
exclude 'META-INF/notice.txt'
exclude 'META-INF/ASL2.0'
}
}
dependencies {
implementation 'com.android.support:appcompat-v7:27.1.1'
implementation 'com.android.support.constraint:constraint-layout:1.1.3'
implementation 'com.android.support:design:27.1.1'
implementation 'com.android.support:support-v4:27.1.1'
implementation 'com.android.support:cardview-v7:27.1.1'
implementation 'com.android.support:preference-v7:27.1.1'
implementation 'com.android.support:preference-v14:27.1.1'
implementation 'com.android.support:recyclerview-v7:27.1.1'
implementation 'com.google.code.gson:gson:2.8.2'
implementation 'com.squareup.retrofit2:retrofit:2.4.0'
implementation 'com.squareup.retrofit2:converter-gson:2.4.0'
implementation 'com.squareup.okhttp3:okhttp:3.11.0'
implementation 'com.squareup.okhttp3:logging-interceptor:3.9.1'
implementation 'com.squareup.picasso:picasso:2.5.2'
implementation 'com.mcxiaoke.volley:library:1.0.19'
implementation 'com.github.bumptech.glide:glide:3.7.0'
implementation 'com.nineoldandroids:library:2.4.0'
implementation 'com.bogdwellers:pinchtozoom:0.1'
implementation 'com.daimajia.slider:library:1.1.5#aar'
implementation 'com.crystal:crystalrangeseekbar:1.1.1'
implementation 'com.github.apl-devs:appintro:v4.2.3'
implementation 'hyogeun.github.com.colorratingbar:ColorRatingBar:1.0.1'
implementation 'com.onesignal:OneSignal:3.10.1'
implementation 'com.facebook.android:facebook-android-sdk:4.39.0'
implementation 'com.google.firebase:firebase-core:12.0.1'
implementation 'com.google.firebase:firebase-ads:12.0.1'
implementation 'com.google.firebase:firebase-auth:12.0.1'
implementation 'com.google.firebase:firebase-messaging:12.0.1'
implementation 'com.google.android.gms:play-services-auth:16.0.1'
implementation 'com.google.android.gms:play-services-maps:16.0.0'
implementation 'com.google.android.gms:play-services-location:16.0.0'
//Multidex dependency
implementation 'com.android.support:multidex:1.0.3'
//R- rules
implementation 'org.dmfs:rfc5545-datetime:0.2.4'
//Rounded image view
implementation 'com.makeramen:roundedimageview:2.2.1'
implementation 'com.google.apis:google-api-services-calendar:v3-rev260-1.23.0' exclude module: 'httpclient'
implementation 'com.google.api-client:google-api-client-android:1.23.0' exclude module: 'httpclient'
implementation 'com.google.http-client:google-http-client-gson:1.23.0' exclude module: 'httpclient'
implementation 'com.google.api-client:google-api-client:1.25.0'
implementation 'com.google.oauth-client:google-oauth-client-jetty:1.23.0'
//Exo Player
implementation 'com.google.android.exoplayer:exoplayer:2.9.2'
//Youtube video api
implementation project(':YouTubeAndroidPlayerApi')
//Vimeo video player
implementation 'com.github.ed-george:AndroidVimeoExtractor:1.1.2'
//Pdf reader
implementation 'com.github.barteksc:android-pdf-viewer:3.1.0-beta.1'
implementation 'com.mindorks.android:prdownloader:0.5.0'
}
apply plugin: 'com.google.gms.google-services'
My build.gradle (Project: myPorojectName) file is this:
buildscript {
repositories {
google()
jcenter()
mavenCentral()
}
dependencies {
classpath 'com.android.tools.build:gradle:3.2.1'
classpath 'com.google.gms:google-services:4.2.0'
}
}
allprojects {
repositories {
google()
jcenter()
mavenCentral()
maven { url "https://jitpack.io"}
}
}
task clean(type: Delete) {
delete rootProject.buildDir
}
I have tried solutions posted on the internet or on stackoverflow but the solutions do not seem to work for me or am I doing something wrong?
Any help at all will be appreciated. Thank you!
The full problem is:
error: Could not find the AndroidManifest.xml file, using generation folder [/Users/gopublic/bamboo-home/xml-data/build-dir/131073/REF-RD-VRANDROID/app/build/generated/source/apt/debug])
This is how my build.gradle looks like:
apply plugin: 'com.android.application'
apply plugin: 'io.fabric'
apply plugin: 'realm-android'
buildscript {
repositories {
jcenter()
maven {
url 'https://maven.google.com'
}
google()
maven { url 'https://maven.fabric.io/public' }
}
dependencies {
classpath "io.realm:realm-gradle-plugin:3.2.0"
classpath 'io.fabric.tools:gradle:1.+'
}
}
repositories {
mavenCentral()
mavenLocal()
maven { url 'https://maven.fabric.io/public' }
}
def AAVersion = '4.4.0'
dependencies {
// AndroidAnnotations
annotationProcessor "org.androidannotations:androidannotations:$AAVersion"
implementation "org.androidannotations:androidannotations-api:$AAVersion"
implementation fileTree(dir: 'libs', include: ['*.jar'])
androidTestImplementation('com.android.support.test.espresso:espresso-core:2.2.2', {
exclude group: 'com.android.support', module: 'support-annotations'
})
implementation group: 'org.apache.commons', name: 'commons-io', version: '1.3.2'
// Support libraries
implementation 'com.android.support:appcompat-v7:27.1.1'
implementation 'com.android.support:design:27.1.1'
implementation 'com.android.support.constraint:constraint-layout:1.0.2'
implementation 'com.android.support:cardview-v7:27.1.1'
implementation 'com.google.android.gms:play-services-location:12.0.1'
// Mosby mvp
implementation 'com.hannesdorfmann.mosby3:mvp:3.0.0'
implementation 'com.hannesdorfmann.mosby3:mvp-lce:3.0.0'
implementation 'com.hannesdorfmann.mosby3:mvp-nullobject-presenter:3.0.0'
// Gson
implementation 'com.google.code.gson:gson:2.8.0'
// EventBus
implementation 'org.greenrobot:eventbus:3.0.0'
// YoYo
implementation 'com.daimajia.easing:library:2.0#aar'
implementation 'com.daimajia.androidanimations:library:2.2#aar'
// Glide
implementation 'com.github.bumptech.glide:glide:3.7.0'
implementation 'com.android.support:support-v4:27.1.1'
// Android SpinKit
implementation 'com.github.ybq:Android-SpinKit:1.1.0'
// Retrofit
implementation 'com.squareup.retrofit2:retrofit:2.2.0'
implementation 'com.squareup.retrofit2:converter-gson:2.2.0'
// OkHTTP
testImplementation 'com.squareup.okhttp3:mockwebserver:3.6.0'
implementation 'com.squareup.okhttp3:logging-interceptor:3.6.0'
// RxJava
implementation 'io.reactivex.rxjava2:rxandroid:2.0.1'
implementation 'io.reactivex.rxjava2:rxjava:2.0.1'
// Expandable Layout
implementation 'com.github.aakira:expandable-layout:1.6.0#aar'
// Apache Common Collections
implementation group: 'org.apache.commons', name: 'commons-collections4', version: '4.1'
//Google Analytics
implementation 'com.google.android.gms:play-services-analytics:12.0.1'
testImplementation 'junit:junit:4.12'
implementation 'org.jetbrains:annotations-java5:15.0'
implementation('com.crashlytics.sdk.android:crashlytics:2.9.2#aar') {
transitive = true;
}
implementation('com.crashlytics.sdk.android:crashlytics-ndk:1.1.6#aar') {
transitive = true
}
}
android {
compileSdkVersion 27
buildToolsVersion '28.0.2'
defaultConfig {
applicationId "nl.dtt.refcom4all"
minSdkVersion 16
targetSdkVersion 27
versionCode 9
versionName "1.4.1"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
ndk {
abiFilters 'x86', 'x86_64', 'armeabi-v7a', 'arm64-v8a'
}
externalNativeBuild {
cmake {
cppFlags "-fexceptions"
}
}
}
signingConfigs {
release {
keyAlias 'alias here'
keyPassword 'password here'
storeFile file('keystore/release-keystore.jks')
storePassword 'password here'
}
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
ext.enableCrashlytics = true
ext.betaDistributionReleaseNotesFilePath = "/Users/gopublic/bamboo-home/xml-data/build-dir/131073/REF-RD-VRANDROID/changelog.txt"
}
debug{
minifyEnabled false
debuggable true
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.txt'
ext.enableCrashlytics=true
ext.betaDistributionReleaseNotesFilePath = "/Users/gopublic/bamboo-home/xml-data/build-dir/131073/REF-RD-VRANDROID/changelog.txt"
}
}
sourceSets {
main {
jniLibs.srcDirs = ['libs/ts3_sdk_3.0.4/bin/android']
}
}
externalNativeBuild {
cmake {
path 'src/main/cpp/CMakeLists.txt'
}
}
}
This works perfectly on my machine (running the same, latest version of AS 3.2) but on my build machine, it gets this error. Any ideas what I can do, regarding this?
Is there possible to be a difference in the way AndroidStudio settings are set, that could cause this?
I reverted to using classpath 'com.android.tools.build:gradle:3.1.4' instead of classpath 'com.android.tools.build:gradle:3.2.0' and that worked
I just tried everything I found on stackoverflow and I can't solve my problem, I enabled multidexing and disabled miniyfenabled and nothing happened, here is my app build.gradle, I can't find the problem and is getting annoying since 3 hours now.
android {
signingConfigs {
}
compileSdkVersion 26
buildToolsVersion '26.0.2'
useLibrary 'org.apache.http.legacy'
defaultConfig {
applicationId "com.xxxx.xxxx"
minSdkVersion 19
targetSdkVersion 26
versionCode 38
versionName "4.3.0" //
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
// Enabling multidex support.
multiDexEnabled true
}
dexOptions {
preDexLibraries = false
javaMaxHeapSize "4g"
}
buildTypes {
debug {
applicationIdSuffix '.debug'
}
//sourceSets.debug.resources.srcDirs = ['src/debug/res']
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
zipAlignEnabled true
}
}
// packagingOptions {
// exclude 'META-INF/LICENSE.txt'
// exclude 'META-INF/NOTICE.txt'
// }
}
repositories {
mavenCentral()
maven() { url "https://oss.sonatype.org/content/repositories/snapshots" }
maven { url 'https://maven.fabric.io/public' }
maven { url "https://jitpack.io" }
maven {
url 'https://maven.google.com/'
name 'Google'
}
jcenter()
}
dependencies {
compile fileTree(include: ['*.jar'], dir: 'lib')
compile('com.github.worker8:tourguide:1.0.17-SNAPSHOT#aar') {
transitive = true
}
// Required -- JUnit 4 framework
compile files('libs/SimpleNLG-4.4.8.jar')
compile files('libs/activation.jar')
compile files('libs/additionnal.jar')
compile files('libs/mail.jar')
compile('com.crashlytics.sdk.android:crashlytics:2.6.5#aar') {
transitive = true;
}
compile('com.github.worker8:tourguide:1.0.17-SNAPSHOT#aar') {
transitive = true
}
// Optional -- Mockito framework
implementation 'com.android.support:appcompat-v7:26.1.0'
implementation 'com.android.support:cardview-v7:26.1.0'
implementation 'com.android.support:recyclerview-v7:26.1.0'
implementation 'com.google.android.gms:play-services:11.8.0'
implementation 'com.android.support:support-v4:26.1.0'
implementation 'com.google.android.gms:play-services-analytics:11.8.0'
implementation 'com.google.android.gms:play-services-location:11.8.0'
implementation 'com.google.android.gms:play-services-auth:11.8.0'
implementation 'com.android.support:customtabs:26.1.0'
implementation 'junit:junit:4.12'
implementation 'com.android.support:multidex:1.0.2'
implementation 'com.google.firebase:firebase-storage:11.8.0'
implementation 'com.google.firebase:firebase-auth:11.8.0'
implementation 'com.google.firebase:firebase-database:11.8.0'
implementation 'com.google.firebase:firebase-messaging:11.8.0'
implementation 'io.github.kobakei:ratethisapp:1.2.0'
implementation 'com.android.support.constraint:constraint-layout:1.0.2'
implementation 'com.mercadopago:sdk:3.7.2'
implementation 'com.google.guava:guava:23.3-android'
androidTestCompile 'com.android.support.test:runner:1.0.1'
androidTestCompile 'com.android.support.test.espresso:espresso-core:3.0.1'
implementation group: 'com.google.apis', name: 'google-api-services-translate', version: 'v2-rev48-1.22.0'
implementation group: 'com.google.api-client', name: 'google-api-client-gson', version: '1.22.0'
testCompile 'junit:junit:4.12'
testCompile 'org.mockito:mockito-core:1.10.19'
// Testing-only dependencies
androidTestCompile 'com.android.support.test:runner:1.0.1'
androidTestCompile 'com.android.support.test.espresso:espresso-core:3.0.1'
compile('com.google.code.findbugs:jsr305:2.0.1')
}
configurations.all {
resolutionStrategy.eachDependency { DependencyResolveDetails details ->
def requested = details.requested
if (requested.group == 'com.android.support') {
if (!requested.name.startsWith("multidex")) {
details.useVersion '25.3.0'
}
}
}
}
apply plugin: 'com.google.gms.google-services'
also tried disabling this implementation 'com.google.android.gms:play-services:11.8.0' and nothing too.
try with this inside dependencies
compile ('com.google.dagger:dagger:2.4') {
exclude group: 'com.google.guava'
}
I recently updated android studio to 3.0.0 same for the gradle to the corresponding version, the gradle build successfully but I cant run my project anymore here is my gradle file
enter code here
buildscript {
repositories {
maven { url 'https://maven.fabric.io/public' }
}
dependencies {
classpath 'io.fabric.tools:gradle:1.+'
}
}
apply plugin: 'com.android.application'
apply plugin: 'io.fabric'
repositories {
maven { url 'https://maven.fabric.io/public' }
mavenCentral()
google()
}
apply plugin: 'realm-android'
android
{
signingConfigs {
config {
keyAlias 'XXXX'
keyPassword 'XXXX'
storeFile
file('/XXX/XXX/XXXX/XXX.jks')
storePassword 'XXX'
}
}
compileSdkVersion 26
buildToolsVersion '26.0.2'
defaultConfig {
applicationId "www.XXX"
minSdkVersion 23
targetSdkVersion 26
versionCode 46
versionName "1.0"
testInstrumentationRunner
"android.support.test.runner.AndroidJUnitRunner"
multiDexEnabled true
vectorDrawables.useSupportLibrary = true
javaCompileOptions {
annotationProcessorOptions {
includeCompileClasspath false
}
}
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-
android.txt'), 'proguard-rules.pro'
signingConfig signingConfigs.config
}
}
dexOptions {
javaMaxHeapSize "4g"
preDexLibraries = false
}
packagingOptions {
exclude 'META-INF/DEPENDENCIES.txt'
exclude 'META-INF/LICENSE.txt'
exclude 'META-INF/NOTICE.txt'
exclude 'META-INF/NOTICE'
exclude 'META-INF/LICENSE'
exclude 'META-INF/DEPENDENCIES'
exclude 'META-INF/notice.txt'
exclude 'META-INF/license.txt'
exclude 'META-INF/dependencies.txt'
exclude 'META-INF/LGPL2.1'
}
configurations.all {
resolutionStrategy.force
'com.google.code.findbugs:jsr305:1.3.9'
all*.exclude group: 'org.apache.commons'
}
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
}
}
dependencies {
compile fileTree(include: ['*.jar'], dir: 'libs')
androidTestCompile('com.android.support.test.espresso:espresso-
core:2.2.2', {
exclude group: 'com.android.support', module: 'support-annotations'
})
implementation project(':carpolo_sdk')
implementation project(':material-sheet-fab')
implementation('org.eclipse.paho:org.eclipse.paho.android.service:1.0.2') {
exclude module: 'support-v4'
}
implementation 'com.android.support:multidex:1.0.2'
implementation 'org.eclipse.paho:org.eclipse.paho.client.mqttv3:1.1.1'
implementation 'com.android.support:appcompat-v7:26.1.0'
implementation 'com.google.android.gms:play-services:11.4.2'
implementation 'com.android.support:design:26.1.0'
implementation 'com.jakewharton:butterknife:8.6.0'
implementation 'com.squareup.picasso:picasso:2.5.2'
implementation 'com.android.support:cardview-v7:26.1.0'
implementation 'com.android.support:support-v4:26.1.0'
implementation 'com.amazonaws:aws-android-sdk-core:2.3.9'
implementation 'com.amazonaws:aws-android-sdk-s3:2.3.9'
implementation 'com.amazonaws:aws-android-sdk-cognito:2.3.9'
implementation 'com.amazonaws:aws-android-sdk-cognitoidentityprovider:2.3.9'
implementation 'io.saeid:fab-loading:0.6.0'
implementation 'com.google.firebase:firebase-messaging:11.4.2'
implementation 'com.google.firebase:firebase-auth:11.4.2'
implementation 'com.google.firebase:firebase-crash:11.4.2'
implementation 'com.firebaseui:firebase-ui-auth:2.0.1'
implementation 'com.google.android.gms:play-services-auth:11.4.2'
implementation 'com.android.support.constraint:constraint-layout:1.0.2'
implementation 'com.github.clans:fab:1.6.4'
implementation 'com.github.florent37:singledateandtimepicker:1.1.0'
implementation 'com.github.apl-devs:appintro:v4.2.0'
implementation 'com.github.curioustechizen.android-ago:library:1.3.4'
implementation 'me.relex:circleindicator:1.2.2#aar'
implementation 'com.github.Mariovc:ImagePicker:1.2.0'
testCompile 'junit:junit:4.12'
implementation 'com.google.guava:guava:22.0-android'
implementation('com.crashlytics.sdk.android:crashlytics:2.7.1#aar') {
transitive = true;
}
}
apply plugin: 'com.google.gms.google-services'
My swagger gradle file contains the following
enter code here
dependencies {
compile "io.swagger:swagger-annotations:$swagger_annotations_version"
compile "com.google.code.gson:gson:$gson_version"
compile "org.apache.httpcomponents:httpcore:$httpcore_version"
compile "org.apache.httpcomponents:httpmime:$httpmime_version"
compile "org.apache.httpcomponents:httpclient-
android:$httpclient_version"
compile "com.android.volley:volley:${volley_version}"
testCompile "junit:junit:$junit_version"
testCompile "org.robolectric:robolectric:${robolectric_version}"
testCompile "net.jodah:concurrentunit:${concurrent_unit_version}"
}
I cant find whats wrong with my code any help would be appreciated .
Turns out libraries were mixed together since I did the update to solve that I deleted the .idea folder then I clean and rebuild the project and the error was resolved.