I tried to build my android project ( react-native ) and it gives me this error
Failed to resolve: com
And when i click on open the file, it show a line in app build.gradle
apply plugin: "com.android.application"
This is my app gradle file
buildscript {
repositories {
maven { url 'https://maven.fabric.io/public' }
maven { url "https://jitpack.io" }
}
dependencies {
classpath 'io.fabric.tools:gradle:1.+'
}
}
apply plugin: "com.android.application"
apply plugin: 'io.fabric'
//apply plugin: 'com.neenbedankt.android-apt'
repositories {
maven { url 'https://maven.fabric.io/public' }
}
android {
compileSdkVersion 27
buildToolsVersion '27.0.3'
flavorDimensions "default"
defaultConfig {
applicationId "[APPLICATINO ID]"
targetSdkVersion 26
versionCode 8
versionName '1.0.5'
ndk {
abiFilters 'armeabi-v7a', 'x86'
}
multiDexEnabled true
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
// Deprecated. Used by net.openid:appauth
manifestPlaceholders = [
'appAuthRedirectScheme': 'host.exp.exponent'
]
}
dexOptions {
javaMaxHeapSize System.getenv("DISABLE_DEX_MAX_HEAP") ? null : "8g"
}
productFlavors {
// Define separate dev and prod product flavors.
dev {
// dev utilizes minSDKVersion = 21 to allow the Android gradle plugin
// to pre-dex each module and produce an APK that can be tested on
// Android Lollipop without time consuming dex merging processes.
minSdkVersion 21
}
devRemoteKernel {
minSdkVersion 21
}
dev19 {
// For debugging / development on older SDK versions. Increases build
// time so use 'dev' if not running on older SDKs.
minSdkVersion 19
}
prod {
// The actual minSdkVersion for the application.
minSdkVersion 19
}
}
buildTypes {
debug {
debuggable true
}
release {
minifyEnabled true
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
zipAlignEnabled true
}
}
signingConfigs {
debug {
storeFile file('../debug.keystore')
}
}
lintOptions {
abortOnError false
}
packagingOptions {
pickFirst "**"
}
}
// Don't use modern jsc-android since it still has some critical bugs that
// crash applications when the string for the JS bundle is loaded and when
// locale-specific date functions are called.
// configurations.all {
// resolutionStrategy {
// force 'org.webkit:android-jsc:r216113'
// }
// }
apply from: 'expo.gradle'
dependencies {
// This should be here already
implementation project(':react-native-firebase')
// Firebase dependencies
implementation "com.google.android.gms:play-services-base:15.0.1"
implementation "com.google.firebase:firebase-core:16.0.1"
implementation fileTree(dir: 'libs', include: ['*.jar'])
implementation 'com.android.support:multidex:1.0.1'
// Our dependencies
implementation 'com.android.support:appcompat-v7:27.1.1'
// Our dependencies from ExpoView
// DON'T ADD ANYTHING HERE THAT ISN'T IN EXPOVIEW. ONLY COPY THINGS FROM EXPOVIEW TO HERE.
implementation 'com.android.support:appcompat-v7:27.1.1'
implementation 'com.facebook.android:facebook-android-sdk:4.7.0'
implementation('com.facebook.android:audience-network-sdk:4.22.1') {
exclude module: 'play-services-ads'
}
compileOnly 'org.glassfish:javax.annotation:3.1.1'
implementation 'com.jakewharton:butterknife:7.0.1'
implementation 'de.greenrobot:eventbus:2.4.0'
implementation 'com.amplitude:android-sdk:2.9.2' // Be careful when upgrading! Upgrading might break experience scoping. Check with Jesse. See Analytics.resetAmplitudeDatabaseHelper
implementation 'com.squareup.picasso:picasso:2.5.2'
implementation 'com.google.android.gms:play-services-gcm:12.0.1'
implementation 'com.google.android.gms:play-services-analytics:12.0.1'
implementation 'com.google.android.gms:play-services-maps:12.0.1'
implementation 'com.google.android.gms:play-services-auth:12.0.1'
implementation 'com.google.android.gms:play-services-location:12.0.1'
implementation 'com.google.android.gms:play-services-ads:12.0.1'
annotationProcessor 'com.raizlabs.android:DBFlow-Compiler:2.2.1'
implementation "com.raizlabs.android:DBFlow-Core:2.2.1"
implementation "com.raizlabs.android:DBFlow:2.2.1"
implementation "com.madgag.spongycastle:core:1.53.0.0"
implementation "com.madgag.spongycastle:prov:1.53.0.0"
debugImplementation 'com.s quareup.leakcanary:leakcanary-android-no-op:1.4-beta1'
// debugCompile 'com.squareup.leakcanary:leakcanary-android:1.4-beta1'
releaseImplementation 'com.squareup.leakcanary:leakcanary-android-no-op:1.4-beta1'
implementation 'com.facebook.device.yearclass:yearclass:1.0.1'
implementation 'commons-io:commons-io:1.3.2'
implementation 'me.leolin:ShortcutBadger:1.1.4#aar'
implementation 'com.nostra13.universalimageloader:universal-image-loader:1.9.5'
implementation 'com.theartofdev.edmodo:android-image-cropper:2.4.7'
implementation 'com.yqritc:android-scalablevideoview:1.0.1'
implementation 'commons-codec:commons-codec:1.10'
implementation 'com.segment.analytics.android:analytics:4.3.0'
implementation 'com.google.zxing:core:3.2.1'
implementation 'net.openid:appauth:0.4.1'
implementation('com.airbnb.android:lottie:2.5.5') {
exclude group: 'com.android.support', module: 'appcompat-v7'
}
implementation 'io.branch.sdk.android:library:2.17.1'
implementation('io.nlopez.smartlocation:library:3.2.11') {
transitive = false
}
implementation 'com.android.support:exifinterface:27.1.1'
implementation 'com.squareup.okhttp3:okhttp:3.4.1'
implementation 'com.squareup.okhttp3:okhttp-urlconnection:3.4.1'
implementation 'com.squareup.okhttp3:okhttp-ws:3.4.1'
implementation 'com.squareup.okio:okio:1.9.0'
// Testing
// androidTestCompile 'com.android.support.test.espresso:espresso-core:3.0.1'
// We use a modified build of com.android.support.test:runner:1.0.1. Explanation in maven-test/README
androidTestImplementation 'com.android.support.test:runner:1.0.1'
androidTestImplementation 'com.android.support:support-annotations:27.1.1'
androidTestImplementation 'com.google.code.findbugs:jsr305:3.0.0'
androidTestImplementation 'com.android.support.test.uiautomator:uiautomator-v18:2.1.1'
androidTestImplementation 'com.azimolabs.conditionwatcher:conditionwatcher:0.2'
testImplementation 'junit:junit:4.12'
testImplementation 'org.mockito:mockito-core:1.10.19'
testImplementation 'org.robolectric:robolectric:3.8'
implementation('host.exp.exponent:expoview:28.0.0#aar') {
transitive = true
}
}
// This has to be down here for some reason
apply plugin: 'com.google.gms.google-services'
And here is my logcat result: https://justpaste.it/60b4o
Try setting http proxy in setting. the fabric library is restricted in some countries like Iran
Related
I have taken over an ex-employees project and I have been trying to make it run since past two days. However, the error I got today took a complete day but is still unsolvable.
I have been getting parameter specified as non null is null for compileSdkVersion in build.gradle of one of the sub projects. The main build.gradle has the required Sdk versions specified but this is still throwing error.
buildscript {
repositories {
maven { url 'https://maven.fabric.io/public' }
mavenCentral()
jcenter()
}
dependencies {
classpath 'io.fabric.tools:gradle:1.25.1'
}
}
apply plugin: 'com.android.application'
apply plugin: 'io.fabric'
apply plugin: 'kotlin-android'
apply plugin: 'kotlin-kapt'
apply plugin: 'kotlin-android-extensions'
def keystorePropertiesFile = rootProject.file("keystore.properties")
def keystoreProperties = new Properties()
keystoreProperties.load(new FileInputStream(keystorePropertiesFile))
android {
signingConfigs {
config {
keyAlias keystoreProperties['keyAlias']
keyPassword keystoreProperties['keyPassword']
storeFile file(keystoreProperties['storeFile'])
storePassword keystoreProperties['storePassword']
}
}
packagingOptions {
exclude 'META-INF/rxjava.properties'
}
dataBinding {
enabled = true
}
compileSdkVersion compileSdk
defaultConfig {
applicationId "com.cleanaway.driversapp"
minSdkVersion minSdk
targetSdkVersion targetSdk
multiDexEnabled true
versionCode 108400
versionName "1.84.0"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
signingConfig signingConfigs.config
javaCompileOptions {
annotationProcessorOptions {
arguments = ["room.schemaLocation": "$projectDir/schemas".toString()]
}
}
}
buildTypes {
debug {
// Disable fabric build ID generation for debug builds
ext.enableCrashlytics = false
}
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
flavorDimensions "product", "mode"
productFlavors {
mock {
applicationIdSuffix = ".mock"
dimension "mode"
}
dev {
applicationIdSuffix = ".dev"
dimension "mode"
}
prod {
dimension "mode"
}
demo {
applicationIdSuffix = ".demo"
dimension "product"
}
cleanaway {
dimension "product"
}
}
}
repositories {
maven { url 'https://maven.fabric.io/public' }
jcenter()
//google()
}
kapt {
correctErrorTypes = true
}
dependencies {
implementation fileTree(include: ['*.jar'], dir: 'libs')
implementation files('libs/evercam-stepglobal-1.0.jar')
implementation project(':ipcameracontrol')
implementation project(':cleanawaymodel')
implementation project(':vehicleapi')
implementation project(':networkutilities')
implementation project(':telogisapi')
//Crashlytics
implementation 'com.crashlytics.sdk.android:crashlytics:2.9.9'
implementation('com.crashlytics.sdk.android:crashlytics:2.6.6#aar') {
transitive = true;
}
// Android/Google
implementation "com.android.support:appcompat-v7:$rootProject.libAndroidSupportVersion"
implementation "com.android.support:design:$rootProject.libAndroidSupportVersion"
implementation 'com.android.support.constraint:constraint-layout:1.1.2'
implementation "com.android.support:recyclerview-v7:$rootProject.libAndroidSupportVersion"
implementation "com.android.support:cardview-v7:$rootProject.libAndroidSupportVersion"
implementation "androidx.appcompat:appcompat:1.+"
//Firebase
implementation "com.google.firebase:firebase-core:$rootProject.firebaseVersion"
implementation "com.google.firebase:firebase-storage:$rootProject.firebaseVersion"
implementation "com.google.firebase:firebase-auth:$rootProject.firebaseVersion"
// Android architecture components
implementation 'android.arch.lifecycle:extensions:1.1.1'
kapt "android.arch.lifecycle:compiler:1.1.1"
implementation 'android.arch.persistence.room:runtime:1.1.1'
kapt "android.arch.persistence.room:compiler:1.1.1"
implementation "android.arch.persistence.room:rxjava2:1.1.1"
androidTestImplementation "android.arch.core:core-testing:1.1.1"
implementation 'android.arch.lifecycle:reactivestreams:1.1.1'
// Kotlin
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk8:$rootProject.kotlin_version"
implementation "org.jetbrains.kotlin:kotlin-stdlib:$rootProject.kotlin_version"
// Data binding
kapt 'com.android.databinding:compiler:3.1.4'
// Crash reporting
implementation('com.crashlytics.sdk.android:crashlytics:2.9.1#aar') {
transitive = true
}
// Injection
implementation "com.google.dagger:dagger:$rootProject.daggerVersion"
implementation "com.google.dagger:dagger-android:$rootProject.daggerVersion"
implementation "com.google.dagger:dagger-android-support:$rootProject.daggerVersion"
kapt "com.google.dagger:dagger-compiler:$rootProject.daggerVersion"
kapt "com.google.dagger:dagger-android-processor:$rootProject.daggerVersion"
kapt "com.google.dagger:dagger-android-support:$rootProject.daggerVersion"
// Data
implementation "com.google.code.gson:gson:$rootProject.libGsonVersion"
implementation "com.squareup.retrofit2:converter-gson:$rootProject.gsonConverterVersion"
implementation "com.squareup.retrofit2:retrofit:$rootProject.retrofitVersion"
implementation "com.squareup.okhttp3:okhttp:$rootProject.libOkHttp3Version"
implementation "com.squareup.picasso:picasso:$rootProject.libPicassoVersion"
implementation('org.simpleframework:simple-xml:2.7.1') {
exclude module: 'stax-api'
exclude module: 'stax'
exclude module: 'xpp3'
}
// Reactive library version 1
implementation "io.reactivex:rxjava:$rootProject.libRxJavaVersion"
implementation "io.reactivex:rxandroid:$rootProject.libRxAndroidVersion"
// Reactive library version 2
implementation 'io.reactivex.rxjava2:rxjava:2.1.1'
implementation 'io.reactivex.rxjava2:rxandroid:2.0.1'
implementation "io.reactivex.rxjava2:rxkotlin:2.0.0"
implementation 'com.jakewharton.retrofit:retrofit2-rxjava2-adapter:1.0.0'
// Memory leak testing
debugImplementation 'com.squareup.leakcanary:leakcanary-android:1.5.4'
releaseImplementation 'com.squareup.leakcanary:leakcanary-android-no-op:1.5.4'
// Unit tests
testImplementation 'junit:junit:4.12'
testImplementation "org.robolectric:robolectric:$rootProject.libRobolectricVersion"
// Instrumentation tests
androidTestImplementation 'com.android.support.test.uiautomator:uiautomator-v18:2.1.3'
androidTestImplementation('com.android.support.test.espresso:espresso-core:2.2.2', {
exclude group: 'com.android.support', module: 'support-annotations'
})
implementation 'com.android.support.test.espresso:espresso-idling-resource:3.0.2'
androidTestImplementation 'com.android.support.test.espresso.idling:idling-concurrent:3.0.2'
// Mocking
testImplementation 'org.mockito:mockito-core:2.9.0'
// Logging
implementation 'com.jakewharton.timber:timber:4.6.0'
// Time and Date
implementation 'joda-time:joda-time:2.9.9'
implementation files('libs/commons-lang-2.6.jar')
}
gradle.projectsEvaluated {
tasks.withType(JavaCompile) {
options.compilerArgs << "-Xmaxerrs" << "500" // or whatever number you want
}
}
apply plugin: 'kotlin-android-extensions'
apply plugin: 'com.google.gms.google-services'
This is the code of sub build.gradle.
This is the error message I am getting.
Where:
Build file 'D:\xxx\cleanaway-myview-app\driversapp\build.gradle' line: 39
What went wrong:
A problem occurred evaluating project ':driversapp'.
Parameter specified as non-null is null: method com.android.build.gradle.internal.dsl.BaseAppModuleExtension.compileSdkVersion, parameter version
The following fields don't make sense:
compileSdkVersion compileSdk
minSdkVersion minSdk
targetSdkVersion targetSdk
I think someone misunderstood the instruction that compileSdkVersion can be replaced with compileSdk. Because you need to put actual numbers there, for example
compileSdkVersion 31
minSdkVersion 28
targetSdkVersion 31
which would be the old way. The new way
compileSdk 31
minSdk 28
targetSdk 31
not sure if the old way still works. In any case you need to put actual numbers there. Which ones you want for your project is up to you. compileSdk and targetSdk it's usually best to use the highest possible and minSdk the minimum android version you want to support.
See also What is difference between compileSdk and compileSdkVersion in android studio gradle script when using jetpack compose
My android studio get me bellow error, what can I do?
Failed to resolve: play-services-base
Here is my gradle:
buildscript {
repositories {
maven { url 'https://plugins.gradle.org/m2/' }
}
dependencies {
classpath 'gradle.plugin.com.onesignal:onesignal-gradle-plugin:[0.11.0, 0.99.99]'
}
}
apply plugin: 'com.onesignal.androidsdk.onesignal-gradle-plugin'
//apply plugin: 'com.jakewharton.butterknife'
repositories {
maven { url 'https://maven.google.com' }
}
def taskRequests = getGradle().getStartParameter().getTaskRequests().toString()
def isPlay = !(taskRequests.contains("Foss") || taskRequests.contains("foss"))
apply plugin: 'com.android.application'
if (isPlay) {
apply plugin: 'io.fabric'
}
apply plugin: 'kotlin-android'
apply plugin: 'kotlin-android-extensions'
apply plugin: 'kotlin-kapt'
apply plugin: "com.github.ben-manes.versions"
apply plugin: 'com.jakewharton.butterknife'
android {
compileSdkVersion versions.compileSdk
buildToolsVersion versions.buildTools
defaultConfig {
manifestPlaceholders = [onesignal_app_id : "xxxxx",
// Project number pulled from dashboard, local value is ignored.
onesignal_google_project_number: "111"]
applicationId "chat.almostafa.android"
minSdkVersion versions.minSdk
targetSdkVersion versions.targetSdk
versionCode 10
versionName "1.9"
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
multiDexEnabled true
def gitSha = 'git rev-parse --short HEAD'.execute([], project.rootDir).text.trim()
def buildTime = new GregorianCalendar().format("MM-dd-yyyy' 'h:mm:ss a z")
buildConfigField "String", "GIT_SHA", "\"${gitSha}\""
javaCompileOptions {
annotationProcessorOptions {
arguments = ["room.schemaLocation": "$projectDir/schemas".toString()]
}
}
}
signingConfigs {
release {
storeFile project.rootProject.file('PortalAlmostafaChat.jks').getCanonicalFile()
storePassword System.getenv("KEYSTORE_PASSWORD")
keyAlias System.getenv("KEY_ALIAS")
keyPassword System.getenv("KEY_PASSWORD")
}
debug {
storeFile project.rootProject.file('debug.keystore').getCanonicalFile()
storePassword "android"
keyAlias "androiddebugkey"
keyPassword "android"
}
}
buildTypes {
release {
lintOptions {
disable 'MissingTranslation'
checkReleaseBuilds false
// Or, if you prefer, you can continue to check for errors in release builds,
// but continue the build even when errors are found:
abortOnError false
}
buildConfigField "String", "REQUIRED_SERVER_VERSION", '"0.62.0"'
buildConfigField "String", "RECOMMENDED_SERVER_VERSION", '"0.64.2"'
signingConfig signingConfigs.release
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
debug {
buildConfigField "String", "REQUIRED_SERVER_VERSION", '"0.62.0"'
buildConfigField "String", "RECOMMENDED_SERVER_VERSION", '"0.64.2"'
signingConfig signingConfigs.debug
applicationIdSuffix ".dev"
}
}
flavorDimensions "type"
productFlavors {
// includes proprietary libs
play {
dimension "type"
}
// only foss
foss {
dimension "type"
}
}
packagingOptions {
exclude 'META-INF/core.kotlin_module'
exclude 'META-INF/main.kotlin_module'
}
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
}
}
dependencies {
implementation fileTree(include: ['*.jar'], dir: 'libs')
//region MOU
implementation 'com.android.support.constraint:constraint-layout:2.0.0-alpha2'
implementation 'com.android.support:exifinterface:28.0.0'
implementation 'com.android.support:design:28.0.0'
implementation 'com.android.support:support-vector-drawable:28.0.0'
implementation 'com.android.support:multidex:1.0.3'
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'
implementation 'com.squareup.retrofit2:converter-scalars:2.3.0'
implementation 'io.reactivex.rxjava2:rxjava:2.2.2'
implementation 'com.jakewharton.retrofit:retrofit2-rxjava2-adapter:1.0.0'
implementation 'com.netflix.rxjava:rxjava-android:0.20.3'
implementation 'com.joanzapata.iconify:android-iconify-fontawesome:2.2.2'
implementation 'com.joanzapata.iconify:android-iconify-material:2.2.2'
implementation 'com.joanzapata.iconify:android-iconify-material-community:2.2.2'
implementation 'com.onesignal:OneSignal:[3.9.1, 3.99.99]'
implementation 'com.onesignal:OneSignal:3.+#aar'
implementation 'com.google.firebase:firebase-messaging:17.3.0'
implementation 'com.google.firebase:firebase-core:16.0.3'
implementation 'com.crashlytics.sdk.android:crashlytics:2.9.5'
implementation 'org.greenrobot:eventbus:3.0.0'
implementation 'com.readystatesoftware.sqliteasset:sqliteassethelper:+'
implementation 'org.jsoup:jsoup:1.10.1'
implementation 'com.mindorks.android:prdownloader:0.4.0'
// //Android-FileBrowser-FilePicker
// implementation 'com.adityak:browsemyfiles:1.7'
//Android-FileBrowser-FilePicker
implementation 'com.github.jaiselrahman:FilePicker:1.1.1'
implementation 'com.jakewharton:butterknife:9.0.0-rc3'
annotationProcessor 'com.jakewharton:butterknife-compiler:9.0.0-rc3'
kapt 'com.jakewharton:butterknife-compiler:9.0.0-rc3'
//Architect Component
// ViewModel and LiveData
implementation "android.arch.lifecycle:extensions:1.1.1"
// alternatively, just ViewModel
implementation "android.arch.lifecycle:viewmodel:1.1.1"
// alternatively, just LiveData
implementation "android.arch.lifecycle:livedata:1.1.1"
kapt "android.arch.lifecycle:compiler:1.1.1"
// Room (use 1.1.0-alpha2 for latest alpha)
implementation "android.arch.persistence.room:runtime:1.1.1"
kapt "android.arch.persistence.room:compiler:1.1.1"
//DNS
implementation 'org.pcap4j:pcap4j-core:1.7.3'
implementation 'org.pcap4j:pcap4j-packetfactory-static:1.7.3'
implementation 'org.minidns:minidns-client:0.3.0'
//endregion
implementation project(':player')
implementation project(':emoji')
implementation project(':draw')
implementation project(':util')
implementation project(':core')
implementation project(':suggestions')
implementation libraries.kotlin
implementation libraries.coroutines
implementation libraries.coroutinesAndroid
implementation libraries.appCompat
implementation libraries.recyclerview
implementation libraries.constraintlayout
implementation libraries.cardview
implementation libraries.browser
implementation libraries.androidKtx
implementation libraries.fragmentsKtx
implementation libraries.dagger
implementation libraries.daggerSupport
kapt libraries.daggerProcessor
kapt libraries.daggerAndroidApt
implementation libraries.flexbox
implementation libraries.material
implementation libraries.room
kapt libraries.roomProcessor
implementation libraries.lifecycleExtensions
kapt libraries.lifecycleCompiler
implementation libraries.viewmodelKtx
implementation libraries.workmanager
implementation libraries.rxKotlin
implementation libraries.rxAndroid
implementation libraries.moshi
implementation libraries.okhttp
implementation libraries.okhttpLogger
implementation libraries.timber
implementation libraries.threeTenABP
implementation libraries.fresco
api libraries.frescoOkHttp
implementation libraries.frescoAnimatedGif
implementation libraries.frescoWebP
implementation libraries.frescoAnimatedWebP
implementation libraries.glide
kapt libraries.kotshiCompiler
implementation libraries.kotshiApi
implementation libraries.frescoImageViewer
implementation libraries.markwon
implementation libraries.aVLoadingIndicatorView
implementation libraries.livedataKtx
implementation 'com.google.code.findbugs:jsr305:3.0.2'
// Proprietary libraries
playImplementation libraries.fcm
playImplementation libraries.firebaseAnalytics
playImplementation libraries.playServicesAuth
playImplementation('com.crashlytics.sdk.android:crashlytics:2.9.5#aar') { transitive = true }
playImplementation('com.crashlytics.sdk.android:answers:1.4.3#aar') { transitive = true }
testImplementation libraries.junit
testImplementation libraries.truth
androidTestImplementation libraries.espressoCore
androidTestImplementation libraries.espressoIntents
}
kotlin {
experimental {
coroutines "enable"
}
}
androidExtensions {
experimental = true
}
// FIXME - build and install the sdk into the app/libs directory
// We were having some issues with the kapt generated files from the sdk when importing as a module
def sdk_location = project.properties['sdk_location'] ?: ""
task compileSdk(type: Exec) {
if (System.getProperty('os.name').toLowerCase(Locale.ROOT).contains('windows')) {
commandLine 'cmd', '/c', 'build-sdk.sh', sdk_location
} else {
commandLine './build-sdk.sh', sdk_location
}
}
preBuild.dependsOn compileSdk
if (isPlay) {
apply plugin: 'com.google.gms.google-services'
}
This the updated gradle libraries for today (09/JAN/19), use them (only libraries you need):
implementation 'com.google.firebase:firebase-core:16.0.6'
implementation 'com.google.firebase:firebase-database:16.0.5'
implementation 'com.google.firebase:firebase-firestore:17.1.5'
implementation 'com.google.firebase:firebase-storage:16.0.5'
implementation 'com.crashlytics.sdk.android:crashlytics:2.9.8'
implementation 'com.google.firebase:firebase-auth:16.1.0'
implementation 'com.google.firebase:firebase-messaging:17.3.4'
implementation 'com.google.firebase:firebase-config:16.1.2'
implementation 'com.google.firebase:firebase-invites:16.0.6'
implementation 'com.google.firebase:firebase-ads:17.1.2'
implementation 'com.google.firebase:firebase-appindexing:17.1.0'
implementation 'com.google.firebase:firebase-perf:16.2.3'
implementation 'com.google.firebase:firebase-functions:16.1.3'
implementation 'com.google.firebase:firebase-ml-vision:18.0.2'
implementation 'com.google.firebase:firebase-ml-model-interpreter:16.2.4'
Resolved my problem. I updated to:
implementation 'com.google.firebase:firebase-messaging:17.3.4'
implementation 'com.google.firebase:firebase-core:16.0.6'
implementation 'com.crashlytics.sdk.android:crashlytics:2.9.8'
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 am using implementation 'com.android.billingclient:billing:1.1' dependency to implement in app purchase billing. but i am getting Unable to merge dex
Caused by: com.android.dex.DexException: Multiple dex files define Lcom/android/vending/billing/IInAppBillingService
Error:Execution failed for task Execution failed for task app:transformDexArchiveWithExternalLibsDexMergerForDebug
java.lang.RuntimeException com.android.builder.dexing.DexArchiveMergerException
Unable to merge dex
Below is my build.gradle app level file code
apply plugin: 'com.android.application'
//def BUTTER_KNIFE_VERSION = "8.5.1" //current version of butterknife
repositories {
flatDir {
dirs 'libs'
}
}
android {
compileSdkVersion 27
defaultConfig {
applicationId "com.app.syncyes"
multiDexEnabled true
minSdkVersion 19
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'
}
}
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
}
dexOptions {
javaMaxHeapSize "4g" //specify the heap size for the dex process
}
}
dependencies {
implementation fileTree(include: ['*.jar'], dir: 'libs')
implementation "com.android.support:appcompat-v7:$project.versionName"
implementation "com.android.support:exifinterface:$project.versionName"
implementation 'com.google.android.gms:play-services-places:15.0.1'
implementation "com.android.support:design:$project.versionName"
implementation 'de.hdodenhof:circleimageview:2.2.0'
implementation 'com.squareup.picasso:picasso:2.71828'
implementation 'com.android.support:support-v4:27.1.1'
// sinch audio calling
implementation(name: 'sinch-android-rtc', version: '+', ext: 'aar')
// compile 'com.google.android.gms:play-services:12.0.1'
// implementation 'com.android.support.constraint:constraint-layout:1.1.0'
implementation 'com.squareup.retrofit2:retrofit:2.3.0'
implementation 'com.squareup.retrofit2:converter-gson:2.3.0'
implementation 'com.android.support.constraint:constraint-layout:1.1.2'
testImplementation 'junit:junit:4.12'
androidTestImplementation 'com.android.support.test:runner:1.0.2'
implementation 'com.squareup.okhttp3:logging-interceptor:3.4.1'
// Multidex
implementation 'com.android.support:multidex:1.0.3'
// RxJava
implementation 'io.reactivex.rxjava2:rxandroid:2.0.2'
implementation 'io.reactivex.rxjava2:rxjava:2.0.2'
implementation 'com.jakewharton.retrofit:retrofit2-rxjava2-adapter:1.0.0'
implementation "com.google.firebase:firebase-core:16.0.3"
// firebase database
implementation 'com.google.firebase:firebase-database:16.0.2'
// videocache
implementation 'com.danikula:videocache:2.7.0'
// InApp Billing
implementation 'com.android.billingclient:billing:1.1'
// // firebase notification
implementation 'com.google.firebase:firebase-messaging:17.3.1'
// compile 'com.google.firebase:firebase-core:16.0.0'
// video compressor
implementation 'com.github.WindSekirun:MediaResizer:1.0.0'
// Dexter runtime permissions
implementation 'com.karumi:dexter:4.2.0'
implementation 'com.github.darsh2:MultipleImageSelect:3474549'
// twitter sharing
implementation('com.twitter.sdk.android:tweet-composer:1.0.5#aar') {
transitive = true;
}
androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.2'
implementation 'com.android.support:cardview-v7:27.1.1'
implementation('com.facebook.android:account-kit-sdk:4.23.0') {
exclude group: 'com.google.android.gms', module: 'play-services-auth-api-phone'
exclude group: 'com.google.android.gms', module: 'play-services-auth'
}
}
// annotationProcessor "com.jakewharton:butterknife-compiler:$BUTTER_KNIFE_VERSION"
apply plugin: 'com.google.gms.google-services'
Below is my project level build.gradle file
// Top-level build file where you can add configuration options common to all sub-projects/modules.
buildscript {
repositories {
google()
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:3.0.0'
// classpath 'com.google.gms:google-services:3.0.0'
classpath 'com.google.gms:google-services:4.0.0'
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
}
}
allprojects {
repositories {
google()
jcenter()
maven {
url "https://jitpack.io"
}
maven {
url 'https://maven.fabric.io/public'
}
}
project.ext{
myBuildToolsVersion="20.0.0" //String
myMinSdkVersion=10 //Integer
myTargetSdkVersion=22
myCompileSdkVersion=27
// ext.versionName = '27.1.1'
versionName = '27.1.1'
}
}
task clean(type: Delete) {
delete rootProject.buildDir
}
Try to clean the project, then it should work.
i recently updated google services to 3.3.0:
classpath 'com.google.gms:google-services:3.3.0'
Now i have the following error and the recommendation from google here is to upgrade to 3.3.0 for the new firebase versioning.
here is the error:
As you can see its failing during the configuration phase.
if i look at the build error details i see the following :
org.gradle.api.ProjectConfigurationException: A problem occurred configuring project ':app'.
at org.gradle.configuration.project.LifecycleProjectEvaluator.addConfigurationFailure(LifecycleProjectEvaluator.java:94)
at org.gradle.configuration.project.LifecycleProjectEvaluator.notifyAfterEvaluate(LifecycleProjectEvaluator.java:89)
at org.gradle.configuration.project.LifecycleProjectEvaluator.doConfigure(LifecycleProjectEvaluator.java:70)
at org.gradle.configuration.project.LifecycleProjectEvaluator.access$100(LifecycleProjectEvaluator.java:34)
at org.gradle.configuration.project.LifecycleProjectEvaluator$ConfigureProject.run(LifecycleProjectEvaluator.java:110)
at org.gradle.internal.progress.DefaultBuildOperationExecutor$RunnableBuildOperationWorker.execute(DefaultBuildOperationExecutor.java:336)
at org.gradle.internal.progress.DefaultBuildOperationExecutor$RunnableBuildOperationWorker.execute(DefaultBuildOperationExecutor.java:328)
at org.gradle.internal.progress.DefaultBuildOperationExecutor.execute(DefaultBuildOperationExecutor.java:199)
at org.gradle.internal.progress.DefaultBuildOperationExecutor.run(DefaultBuildOperationExecutor.java:110)
at org.gradle.configuration.project.LifecycleProjectEvaluator.evaluate(LifecycleProjectEvaluator.java:50)
here are the details of my project gradle file:
buildscript {
repositories {
jcenter()
maven { url 'https://maven.fabric.io/public' }
mavenCentral()
google()
}
//kotlin version
ext.kotlin_version = '1.2.41'
ext.kotlin_ktx_version = '0.3'
dependencies {
classpath 'com.android.tools.build:gradle:3.1.2'
classpath 'com.google.gms:google-services:3.3.0'
classpath 'io.fabric.tools:gradle:1.25.3'
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
}
}
allprojects {
repositories {
jcenter()
mavenCentral()
maven { url "http://dl.bintray.com/pt-midtrans/maven" }
maven { url "https://jitpack.io" }
google()
}
project.ext {
minimumSdkVersion = 16
supportlib_version = '27.1.1'
room_version = '1.0.0'
espresso_version = '3.0.1'
archLifecycleVersion = '1.1.1'
dagger = '2.15'
}
}
subprojects {
//todo change this to loop once
project.configurations.all {
resolutionStrategy.eachDependency { details ->
if (details.requested.group == 'com.android.support'
&& !details.requested.name.contains('multidex')) {
details.useVersion "$supportlib_version" //force all versions of support library to be the same. i tried commending out this entire block but that is not the issue
}
}
}
task clean(type: Delete) {
delete rootProject.buildDir
}
and the app gradle file:
buildscript {
repositories {
maven { url 'https://maven.fabric.io/public' }
google()
}
}
apply plugin: 'com.android.application'
apply plugin: 'io.fabric'
apply plugin: 'kotlin-android'
apply plugin: 'kotlin-kapt'
apply plugin: 'kotlin-android-extensions'
repositories {
maven { url 'https://maven.fabric.io/public' }
}
android {
compileSdkVersion 27
//buildToolsVersion '27.0.3'
defaultConfig {
minSdkVersion project.ext.minimumSdkVersion
//check top level build.gradle file for attributes -
targetSdkVersion 27
applicationId "com.mobile.mypackage"
versionCode 1
versionName "3" //whatever
testInstrumentationRunner "com.mobile.mypackage.base.MyTestRunner"
multiDexEnabled true
}
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
}
flavorDimensions 'tier'
buildTypes {
release {
debuggable false //for troubleshooting, should set to false in production build
minifyEnabled true
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro', 'proguard-fresco.pro', 'proguard-gson.pro', 'proguard-midtrans.pro'
}
debugMini {
//this is a proguarded version of debug build, turn off - InstaRun to use
initWith debug
minifyEnabled true
useProguard true
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro', 'proguard-fresco.pro', 'proguard-gson.pro', 'proguard-midtrans.pro'
matchingFallbacks = ['debug']
}
}
dexOptions {
//for out of memory gc overhead error
javaMaxHeapSize "6g"
}
lintOptions {
abortOnError false
}
androidExtensions {
experimental = true
}
testOptions {
//this seems to be absolutely nothing in build tools 25.0.3. after upgrading gradle will check again
animationsDisabled = true
execution 'ANDROID_TEST_ORCHESTRATOR'
}
productFlavors {
def STRING = "String"
def BOOLEAN = "boolean"
def TRUE = "true"
def FALSE = "false"
def BASE_ENDPOINT = "BASE_ENDPOINT"
staging {
dimension 'tier'
buildConfigField STRING, BASE_ENDPOINT, '"https://api.myendpoint.com"'
versionNameSuffix '-STAGING'
applicationIdSuffix 'staging'
}
labs {
dimension 'tier'
ext.alwaysUpdateBuildId = false
buildConfigField STRING, BASE_ENDPOINT, '"https://api.myendpoint.com"'
versionNameSuffix '-LABs'
applicationIdSuffix 'labs'
}
prod {
dimension 'tier'
buildConfigField STRING, BASE_ENDPOINT, '"https://api.myendpoint.com"'
}
}
}
kapt {
useBuildCache = false //toggle this to see if it will help
}
dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])
implementation("com.android.support:appcompat-v7:$supportlib_version") {
force = true
}
implementation 'com.android.support.constraint:constraint-layout:1.1.0'
implementation "com.android.support:support-annotations:$supportlib_version"
implementation("com.android.support:design:$supportlib_version") {
force = true
}
implementation 'com.android.support:multidex:1.0.3'
//firebase
implementation("com.google.firebase:firebase-core:15.0.2") {
force = true
}
implementation("com.google.firebase:firebase-auth:15.1.0") {
force = true
}
implementation("com.google.firebase:firebase-config:15.0.2") {
force = true
}
implementation("com.google.android.gms:play-services-auth:15.0.0") {
force = true
}
implementation("com.google.firebase:firebase-messaging:15.0.2") {
force = true
}
//rxjava
implementation 'io.reactivex.rxjava2:rxjava:2.1.6'
implementation 'io.reactivex.rxjava2:rxandroid:2.0.1'
implementation 'com.jakewharton.rxbinding2:rxbinding:2.0.0'
//square
//testAnnotationProcessor "com.google.dagger:dagger-compiler:$dagger"
implementation "com.google.dagger:dagger:$dagger"
//annotationProcessor "com.google.dagger:dagger-compiler:$dagger"
kapt "com.google.dagger:dagger-compiler:$dagger"
implementation 'com.github.ajalt:timberkt:1.3.0'
implementation 'com.jakewharton:butterknife:8.8.1'
// annotationProcessor 'com.jakewharton:butterknife-compiler:8.8.1'
kapt 'com.jakewharton:butterknife-compiler:8.8.1'
implementation 'com.squareup.okhttp3:logging-interceptor:3.9.1'
implementation 'com.squareup.retrofit2:adapter-rxjava2:2.3.0'
implementation "com.squareup.retrofit2:retrofit:2.3.0"
implementation 'com.squareup.picasso:picasso:2.5.2'
implementation "com.squareup.retrofit2:converter-gson:2.3.0"
androidTestImplementation 'com.squareup.rx.idler:rx2-idler:0.9.0' //for espresso
implementation 'com.hannesdorfmann.mosby:viewstate:2.0.1'
//------Architecture Components ------------
//room db
implementation "android.arch.persistence.room:runtime:$room_version"
//annotationProcessor "android.arch.persistence.room:compiler:$room_version"
implementation "android.arch.lifecycle:common-java8:1.1.1"
kapt "android.arch.persistence.room:compiler:$room_version"
implementation "android.arch.persistence.room:rxjava2:$room_version"
// Lifecycles only (no ViewModel or LiveData)
implementation "android.arch.lifecycle:runtime:$archLifecycleVersion"
//annotationProcessor "android.arch.lifecycle:compiler:$archLifecycleVersion"
kapt "android.arch.lifecycle:compiler:$archLifecycleVersion"
implementation "android.arch.lifecycle:extensions:$archLifecycleVersion"
//------END Architecture Components ------------
//event Bus
implementation 'org.greenrobot:eventbus:3.0.0'
//FB
implementation 'com.facebook.android:facebook-android-sdk:4.32.0'
//implementation 'com.facebook.android:facebook-applinks:[4,5)'
implementation 'com.facebook.fresco:fresco:1.3.0'
implementation 'com.facebook.stetho:stetho:1.5.0'
implementation 'com.facebook.stetho:stetho-okhttp3:1.5.0'
//testing
androidTestImplementation 'com.android.support.test.uiautomator:uiautomator-v18:2.1.3'
testImplementation 'org.mockito:mockito-core:2.15.0'
androidTestImplementation 'org.mockito:mockito-android:2.8.9'
androidTestImplementation 'com.github.fabioCollini:DaggerMock:0.8.4'
implementation 'com.squareup.okhttp3:mockwebserver:3.8.0'
testImplementation 'junit:junit:4.12'
androidTestImplementation 'com.android.support.test:runner:1.0.2'
androidTestImplementation 'com.android.support.test:rules:1.0.2'
// Espresso dependencies
androidTestImplementation "com.android.support.test.espresso:espresso-core:$espresso_version"
androidTestImplementation "com.android.support.test.espresso:espresso-contrib:$espresso_version"
androidTestImplementation "com.android.support.test.espresso:espresso-intents:$espresso_version"
// androidTestImplementation 'com.android.support.test.espresso:espresso-accessibility:3.0.1'
androidTestImplementation "com.android.support.test.espresso:espresso-web:$espresso_version"
androidTestImplementation "com.android.support.test.espresso.idling:idling-concurrent:$espresso_version"
androidTestImplementation "com.android.support.test.espresso:espresso-idling-resource:$espresso_version"
//UI dependencies
implementation 'com.andreabaccega:android-edittext-validator:1.3.4'
implementation 'uk.co.chrisjenx:calligraphy:2.3.0'
implementation "com.imgix:imgix-java:1.1.10"
implementation 'com.github.markomilos:paginate:0.5.1'
implementation 'com.sprylab.android.texturevideoview:texturevideoview:1.2.1'
implementation 'com.balysv:material-ripple:1.0.2'
implementation 'com.github.d-max:spots-dialog:0.7#aar' //loading screen
implementation 'com.jaredrummler:material-spinner:1.1.0'//drop down list
implementation 'com.github.ganfra:material-spinner:1.1.1'//drop down list
implementation 'com.bartoszlipinski:recyclerviewheader2:2.0.1'
//implementation 'com.github.takusemba:multisnaprecyclerview:1.1.1' //snap
implementation 'com.crystal:crystalrangeseekbar:1.1.1'
implementation 'com.github.faruktoptas:FancyShowCaseView:1.0.0'
//data structures
implementation 'com.scalified:tree:0.2.4'
//parcelable
implementation 'org.parceler:parceler-api:1.1.9'
//annotationProcessor 'org.parceler:parceler:1.1.9'
kapt 'org.parceler:parceler:1.1.9'
//payment gateways
//implementation 'co.omise:omise-android:2.3.+'
implementation 'co.omise:omise-android:2.6.4'
implementation 'com.braintreepayments.api:braintree:1.+'
debugImplementation 'com.midtrans:uikit:1.17.0-SANDBOX'
debugMiniImplementation 'com.midtrans:uikit:1.17.0-SANDBOX'
releaseImplementation 'com.midtrans:uikit:1.17.0'
//fresh chat
implementation 'com.github.freshdesk:freshchat-android:1.3.1'
implementation'com.crashlytics.sdk.android:crashlytics:2.9.2'
//one signal
implementation 'com.onesignal:OneSignal:[3.7.1, 3.99.99]'
//retrofit pretty logs
implementation('com.github.ihsanbal:LoggingInterceptor:2.0.2') {
exclude group: 'org.json', module: 'json'
}
//barcode scanner
implementation 'com.journeyapps:zxing-android-embedded:3.5.0'
//masking text
implementation 'com.redmadrobot:inputmask:2.3.0'
// Analytics
implementation "com.google.android.gms:play-services-analytics:15.0.2"
implementation 'com.appsflyer:af-android-sdk:4+#aar'
implementation 'com.android.installreferrer:installreferrer:1.0'
//runtime permissions
implementation 'com.karumi:dexter:4.2.0'
//chrome custom tabs
implementation 'saschpe.android:customtabs:1.0.9'
//searching - https://github.com/algolia/algoliasearch-client-android/releases
implementation 'com.algolia:algoliasearch-android:3.21.11'
//credit card scanner
implementation 'io.card:android-sdk:5.5.1'
//firebase test orchestrator
androidTestImplementation 'com.android.support.test:runner:1.0.2'
androidTestUtil 'com.android.support.test:orchestrator:1.0.2'
//kotlin
implementation "org.jetbrains.kotlin:kotlin-stdlib-jre7:$kotlin_version"
implementation "org.jetbrains.kotlin:kotlin-reflect:$kotlin_version"
//kotlin ktx
implementation "androidx.core:core-ktx:$kotlin_ktx_version"
}
apply plugin: 'com.google.gms.google-services' //add to bottom of file
if i downgrade to 3.2.1 i get the following build error:
5 [ERROR] [com.android.build.gradle.internal.transforms.DesugarTransform] Exception in thread "main" java.lang.IllegalArgumentException
at com.google.common.base.Preconditions.checkArgument(Preconditions.java:108)
at com.google.devtools.build.android.desugar.DefaultMethodClassFixer$DefaultMethodFinder.visit(DefaultMethodClassFixer.java:483)
at org.objectweb.asm.ClassReader.accept(ClassReader.java:621)
at org.objectweb.asm.ClassReader.accept(ClassReader.java:500)
at com.google.devtools.build.android.desugar.DefaultMethodClassFixer.defaultMethodsDefined(DefaultMethodClassFixer.java:331)
at com.google.devtools.build.android.desugar.DefaultMethodClassFixer.visitEnd(DefaultMethodClassFixer.java:91)
at org.objectweb.asm.ClassVisitor.visitEnd(ClassVisitor.java:339)
at com.google.devtools.build.android.desugar.InterfaceDesugaring.visitEnd(InterfaceDesugaring.java:112)
at org.objectweb.asm.ClassReader.accept(ClassReader.java:702)
at org.objectweb.asm.ClassReader.accept(ClassReader.java:500)
at com.google.devtools.build.android.desugar.Desugar.desugarClassesInInput(Desugar.java:477)
at com.google.devtools.build.android.desugar.Desugar.desugarOneInput(Desugar.java:361)
at com.google.devtools.build.android.desugar.Desugar.desugar(Desugar.java:314)
at com.google.devtools.build.android.desugar.Desugar.main(Desugar.java:711)
UPDATE:
AFTER downgrading to google services 3.2.1 i now face the following error while build the gradle project:
14:37:49.269 [ERROR] [com.android.build.gradle.internal.transforms.DesugarTransform] Exception in thread "main" java.lang.IllegalArgumentException
at com.google.common.base.Preconditions.checkArgument(Preconditions.java:108)
at com.google.devtools.build.android.desugar.DefaultMethodClassFixer$DefaultMethodFinder.visit(DefaultMethodClassFixer.java:483)
at org.objectweb.asm.ClassReader.accept(ClassReader.java:621)
at org.objectweb.asm.ClassReader.accept(ClassReader.java:500)
at com.google.devtools.build.android.desugar.DefaultMethodClassFixer.defaultMethodsDefined(DefaultMethodClassFixer.java:331)
at com.google.devtools.build.android.desugar.DefaultMethodClassFixer.visitEnd(DefaultMethodClassFixer.java:91)
at org.objectweb.asm.ClassVisitor.visitEnd(ClassVisitor.java:339)
at com.google.devtools.build.android.desugar.InterfaceDesugaring.visitEnd(InterfaceDesugaring.java:112)
at org.objectweb.asm.ClassReader.accept(ClassReader.java:702)
at org.objectweb.asm.ClassReader.accept(ClassReader.java:500)
at com.google.devtools.build.android.desugar.Desugar.desugarClassesInInput(Desugar.java:477)
at com.google.devtools.build.android.desugar.Desugar.desugarOneInput(Desugar.java:361)
at com.google.devtools.build.android.desugar.Desugar.desugar(Desugar.java:314)
at com.google.devtools.build.android.desugar.Desugar.main(Desugar.java:711)
UPDATE: It seems when disable oneSignal Sdk the deSugar error disappears on 3.2.0 . so i speculate that this has to do something with firebase versioning. but there is still an issue using 3.3.0. i will contact oneSignal seperately.
I have no idea how to fix this. i am using 4.6 and also tried 4.4 of gradle wrapper (just in case).
use classpath 'com.google.gms:google-services:3.2.0'