Closed mirnpnh closed 6 years ago
@Innomalist Thanks for the details. Can you also share your root and :common
project's build.gradle
files as well? We will need these two files to reproduce the issue.
Hi, @jkasten2 Thanks for the response, here they are, Root build.gradle:
// Top-level build file where you can add configuration options common to all sub-projects/modules.
buildscript {
repositories {
maven { url "https://maven.google.com" }
jcenter()
maven { url 'https://maven.fabric.io/public' }
google()
}
dependencies {
classpath 'com.android.tools.build:gradle:3.2.1'
classpath 'io.fabric.tools:gradle:1.26.1'
classpath 'com.google.gms:google-services:4.1.0'
}
}
allprojects {
repositories {
maven { url "https://maven.google.com" }
jcenter()
maven { url "https://jitpack.io" }
maven { url 'https://maven.fabric.io/public' }
}
}
project.ext {
supportVersion = '27.1.1'
}
task clean(type: Delete) {
delete rootProject.buildDir
}
And common build.gradle:
apply plugin: 'com.android.library'
android {
compileSdkVersion 27
buildToolsVersion '28.0.3'
defaultConfig {
minSdkVersion 16
targetSdkVersion 27
multiDexEnabled true
versionCode 1
versionName "1.0.0"
vectorDrawables.useSupportLibrary = true
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
dataBinding {
enabled true
}
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
}
}
dependencies {
api('io.socket:socket.io-client:1.0.0') {
exclude group: 'org.json', module: 'json'
}
api 'com.google.maps.android:android-maps-utils:0.5'
api 'com.android.databinding:library:3.2.1'
api 'com.android.databinding:adapters:3.2.1'
api "com.google.firebase:firebase-core:16.0.4"
api "com.google.firebase:firebase-auth:16.0.5"
api "com.google.android.gms:play-services-maps:16.0.0"
api "com.google.android.gms:play-services-location:16.0.0"
api 'com.firebaseui:firebase-ui:3.3.1'
api "com.android.support:design:$supportVersion"
api "com.android.support:support-v4:$supportVersion"
api "com.android.support:cardview-v7:$supportVersion"
api "com.android.support:appcompat-v7:$supportVersion"
api "com.android.support:preference-v7:$supportVersion"
api "com.android.support:preference-v14:$supportVersion"
api "com.android.support:support-vector-drawable:$supportVersion"
api 'com.github.medyo:android-about-page:1.2.1'
api 'org.greenrobot:eventbus:3.0.0'
api 'com.google.code.gson:gson:2.8.2'
api 'com.android.support.constraint:constraint-layout:1.1.3'
api 'de.psdev.licensesdialog:licensesdialog:1.8.3'
api('com.weiwangcn.betterspinner:library-material:1.1.0') {
exclude group: 'com.android.support', module: 'appcompat-v7'
}
api 'com.github.tylersuehr7:empty-state-recyclerview:1.0.4'
api 'com.github.yalantis:ucrop:2.2.1'
api 'com.github.esafirm.android-image-picker:imagepicker:1.12.0'
api 'de.hdodenhof:circleimageview:2.2.0'
api 'com.github.bumptech.glide:glide:4.6.1'
api 'com.ramotion.foldingcell:folding-cell:1.2.1'
api 'se.emilsjolander:stickylistheaders:2.7.0'
api 'com.github.kizitonwose.colorpreference:support:1.0.3'
api 'com.tapadoo.android:alerter:2.0.4'
api 'gun0912.ted:tedpermission:2.0.3'
api 'com.afollestad.material-dialogs:core:0.9.6.0'
api 'com.andkulikov:transitionseverywhere:1.7.8'
api('com.stripe:stripe-android:1.0.4@aar') {
transitive = true
}
api 'com.github.MAXDeliveryNG:slideview:1.1.0'
api 'com.github.sharish:CreditCardView:v1.0.4'
api "com.google.android.gms:play-services-wallet:16.0.1"
api 'com.android.support:multidex:1.0.3'
annotationProcessor 'org.greenrobot:eventbus-annotation-processor:3.0.1'
}
@Innomalist It is odd that google-services.json
is being searched for in null
directories, however this still happens for me after I reproduced the issue with your config and removed OneSignal.
Can you make sure you have your google-services.json
in your app folder?
Note that the google-services.json
file is used by apply plugin: 'com.google.gms.google-services'
. This isn't required for OneSignal but since you are using firebase auth you may still need this.
I recommend removing OneSignal temporally from your project and find and fix the issue you are having with google-services.json
not being found. If the issue does only happen after adding OneSignal can you share a project here reproducing the issue?
@jkasten2 Well at first i suspected it might be for another reason but as soon as i remove few lines of onesignal at beginning of my project's build.gradle the first sync after that throws the error but the next one is fine, As soon as i put onesignal lines back gradle sync fails. I have made a project to reproduce it but weird that i doesn't do that on new project with same build.gradles!! will try again and as soon as i could manage to reproduce the error on a new project i will upload it here.
@Innomalist Thanks for trying to repo on a new project. It might be related to something being cached. I recommend trying to run the following.
./gradlew build --refresh-dependencies
If that does not help you can clear the gradle cache for your whole system.
rm -rf $HOME/.gradle/caches/
Hi again, I have done that too and still problem persists, But the good thing is i could manage to reproduce issue on a clean project. I have attached project here, In driver's build.gradle if you remove the first line it syncs fine if you have it back it doesn't. Thanks again for your consideration this is really important to me to have this working sooner and i am working on a solution at the same time too to figure out what is wrong exactly. OneSignal.zip
@Innomalist Thanks for the project, I am able to reproduce sync issue now! It's very odd though as running ./gradlew assembleDebug
works just fine from the terminal. As well as ./gradlew :driver:dependencies
.
Unfortunately Android Studio does not give a very helpful error when syncing, just getting the following;
"Resolving this BuildableArtifact can only done during task execution."
Also it isn't clear what gradle tasks Android Studio runs so I am not able to run it from the terminal to get more details.
I wasn't able to find the root cause of what is happening but I found by reordering the applies in your driver/build.gradle
fixes the issue.
apply plugin: 'com.android.application'
apply plugin: 'com.onesignal.androidsdk.onesignal-gradle-plugin'
We have normally recommended putting apply OneSignal first as this is required for older 2.x AGP projects but since your are using 3.2.1 this is fine to switch around.
Thanks it's working now with your suggestion, I didn't try that because as you said i remember on old versions if it was after AGP it didn't compiled but now as you said it's working this way too. Thanks again
I ejecuted the comands of jkasten2 and after uninstaledl and reinstalled OneSignal plugin and works. Thanks
During sign an error saying "Resolving this BuildableArtifact can only done during task execution." is throwed. i am using firebase services with v15.0.0 and support library v27.1.0
Project Setup
Full Error
Dependency Tree
Run
./gradlew app:dependencies