plugin Fabric Android Studio not found import com.crashlytics & io.fabric - android

On my new project i would like to integrate Crashlytics from Fabric.io
I've already installed Fabric on others projects without issue, one project with the tutorial here : https://fabric.io/kits/android/crashlytics/install
And on the other project, I've using the plugin Fabric integrated into Android Studio (picture)
here's the problem :
import android.app.Application;
import com.crashlytics.android.Crashlytics;
import io.fabric.sdk.android.Fabric;
public class UILApplication extends Application {
#Override
public void onCreate() {
super.onCreate();
Fabric.with(this, new Crashlytics()); // Fabric not found
}
}
Error:(6, 31) error: package com.crashlytics.android does not exist
Error:(7, 29) error: package io.fabric.sdk.android does not exist
Error:(20, 31) error: cannot find symbol class Crashlytics
Error:(20, 9) error: cannot find symbol variable Fabric
Note: Some input files use or override a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
:app:compileDebugJavaWithJavac FAILED
Error:Execution failed for task ':app:compileDebugJavaWithJavac'.
> Compilation failed; see the compiler error output for details.
my build.gradle (Project) :
task wrapper(type: Wrapper) {
gradleVersion = '2.12'
}
build.gradle (Module:app) :
buildscript {
repositories {
mavenCentral()
maven { url "http://oss.sonatype.org/content/repositories/snapshots/" }
// maven { url 'https://maven.fabric.io/public' } THIS LINE FORGOTTEN
}
dependencies {
classpath 'com.android.tools.build:gradle:2.1.2'
classpath 'com.google.gms:google-services:3.0.0'
//classpath 'io.fabric.tools:gradle:1.+'
}
}
apply plugin: "com.android.application"
//apply plugin: 'io.fabric'
repositories {
mavenCentral()
maven { url "http://oss.sonatype.org/content/repositories/snapshots/" }
// maven { url 'https://maven.fabric.io/public' }
}
android {
compileSdkVersion = 24
buildToolsVersion = "23.0.3"
defaultConfig {
applicationId "agemos.testkalman1"
minSdkVersion 15
targetSdkVersion 24
versionCode 1
versionName "1.0"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
}
dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
compile 'com.android.support:appcompat-v7:24.2.0'
compile 'com.android.support:design:24.2.0'
compile ('com.mapbox.mapboxsdk:mapbox-android-sdk:4.2.0-SNAPSHOT#aar'){
transitive=true
}
// // Crashlytics Fabric io
// compile('com.crashlytics.sdk.android:crashlytics:2.6.3#aar') {
// transitive = true;
// }
}
I've change compileSdkVersion 23 to 24 but nothing has changed, someone had this problem ?
Thanks in advance for your help :)
I've forgot one line
Now it works ! sorry for the inconvenience ^^'

Mike from Fabric here.
It appears that you've commented out all initialization of Fabric in your build.gradle? If you un-comment the lines below, that should work.
classpath 'io.fabric.tools:gradle:1.+'
apply plugin: 'io.fabric'
maven { url 'https://maven.fabric.io/public' }
// Crashlytics Fabric io
compile('com.crashlytics.sdk.android:crashlytics:2.6.3#aar') {
transitive = true;
}
The full build.gradle would have all of the following changes:
buildscript {
repositories {
maven { url 'https://maven.fabric.io/public' }
}
dependencies {
// The Fabric Gradle plugin uses an open ended version to react
// quickly to Android tooling updates
classpath 'io.fabric.tools:gradle:1.+'
}
}
apply plugin: 'io.fabric'
repositories {
maven { url 'https://maven.fabric.io/public' }
}
compile('com.crashlytics.sdk.android:crashlytics:2.6.3#aar') {
transitive = true;
}

clear and Rebuild and Restart Android Studio Its Working
build.gradle project
// Top-level build file where you can add configuration options common to all sub-projects/modules.
buildscript {
repositories {
google()
jcenter()
}
buildscript {
repositories {
jcenter()
mavenCentral()
maven { url 'https://maven.fabric.io/public' }
}
dependencies {
classpath 'io.fabric.tools:gradle:1.+'
}
}
dependencies {
classpath 'com.android.tools.build:gradle:3.0.1'
classpath 'io.fabric.tools:gradle:1.+'
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
}
}
allprojects {
repositories {
google()
jcenter()
}
}
task clean(type: Delete) {
delete rootProject.buildDir
}
build.gradle module
apply plugin: 'com.android.application'
apply plugin: 'io.fabric'
android {
compileSdkVersion 26
defaultConfig {
applicationId "com.holostik.ozoneoverseas"
minSdkVersion 15
targetSdkVersion 26
versionCode 1
versionName "1.0"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
}
android {
defaultConfig {
multiDexEnabled true
}
}
dependencies {
// TODO FCM
// implementation 'com.google.firebase:firebase-messaging:11.0.4'
//compile 'com.google.firebase:firebase-messaging:11.0.4'
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'
})
// compile 'com.android.support:appcompat-v7:26.+'
compile 'com.android.support:appcompat-v7:26.0.1'
compile 'com.android.support.constraint:constraint-layout:1.0.2'
testCompile 'junit:junit:4.12'
compile 'me.dm7.barcodescanner:zxing:1.9.7'
compile 'com.android.support:cardview-v7:26.0.1'
compile 'com.android.support:design:26.0.1'
compile 'com.github.bumptech.glide:glide:3.7.0'
compile 'de.hdodenhof:circleimageview:1.3.0'
compile 'com.android.volley:volley:1.0.0'
// compile 'com.google.android.gms:play-services-location:7.8.0' // TODO Previous working
// compile 'com.google.android.gms:play-services-location:9.0.0'
compile 'com.google.android.gms:play-services-location:11.0.4'
// compile "com.google.android.gms:play-services-gcm:9.2.0"
compile 'com.squareup.retrofit2:retrofit:2.1.0'
compile 'com.squareup.retrofit2:converter-gson:2.1.0'
compile 'com.android.volley:volley:1.0.0'
compile 'com.theartofdev.edmodo:android-image-cropper:2.3.+'
//TODO camera Crop dependency working
// compile files('libs/ksoap2-android-assembly-2.5.7-jar-with-dependencies.jar')
// implementation 'com.google.firebase:firebase-messaging:11.0.4'
// compile 'com.google.android.gms:play-services:11.4.0'
compile 'com.google.android.gms:play-services:11.0.4'
// compile 'com.facebook.android:facebook-android-sdk:4.8.0' // Works here
compile 'com.facebook.android:facebook-android-sdk:4.13.1' // Works here
compile('com.crashlytics.sdk.android:crashlytics:2.9.0#aar') {
transitive = true;
}
compile('com.crashlytics.sdk.android:crashlytics-ndk:2.0.2#aar') {
transitive = true;
}
repositories {
maven { url 'https://maven.fabric.io/public' }
}
}
allprojects {
repositories {
jcenter()
maven {
url "https://maven.google.com"
}
}
}
/*buildscript {
repositories {
maven { url 'https://maven.fabric.io/public' }
}
// ...
dependencies {
// ...
classpath 'com.google.gms:google-services:3.1.1' // google-services plugin
classpath 'io.fabric.tools:gradle:1.+'
}
}
allprojects {
// ...
repositories {
// ...
maven {
url "https://maven.google.com" // Google's Maven repository
}
}
}*/
// TODO FCM
//apply plugin: 'com.google.gms.google-services' // TODO FCM add auto in Bottom When Google Service Add uncomment this
//dependencies {
// implementation fileTree(dir: 'libs', include: ['*.jar'])
// implementation 'com.android.support:appcompat-v7:26.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'
//}
crashlytics {
enableNdk true
androidNdkOut 'src/main/obj'
androidNdkLibsOut 'src/main/libs'
}
manifest.xml
<meta-data
android:name="io.fabric.ApiKey"
android:value="1864e6d3e59158a5206d2d073e7e14c7ad811cbd" />
Splash Activity
#Override
public void onCreate(Bundle savedInstanceState)
{
super.onCreate(savedInstanceState);
Fabric.with(this, new Crashlytics(), new CrashlyticsNdk());
}

Related

Could not find method maven()

I am getting the following error :
Could not find method maven() for arguments [build_3sdtqstdmsgdnexrxaaxgljji$_run_closure1$_closure4#325a800c] on root project 'Appointments' of type org.gradle.api.Project.
Here's my Project Level Gradle File:
buildscript {
repositories {
google()
jcenter()
maven { url "http://jcenter.bintray.com"}
maven { url "https://maven.fabric.io/public" }
}
dependencies {
classpath 'com.android.tools.build:gradle:3.1.2'
classpath 'com.google.gms:google-services:4.0.0'
classpath 'io.fabric.tools:gradle:1.25.4'
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
}
}
allprojects {
repositories {
google()
jcenter()
}
maven {
url 'https://maven.google.com/'
}
}
task clean(type: Delete) {
delete rootProject.buildDir
}
And here's my app level Gradle File :
apply plugin: 'com.android.application'
android {
compileSdkVersion 26
defaultConfig {
applicationId "com.gtaandteam.android.wellcure"
minSdkVersion 19
targetSdkVersion 26
versionCode 1
versionName "1.0"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
}
repositories {
mavenCentral()
maven {
url "https://s3-ap-southeast-1.amazonaws.com/godel-release/godel/"
}
}
dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])
implementation 'com.android.support:appcompat-v7:26.1.0'
implementation 'ai.devsupport.instamojo:instamojolib:0.1.6'
implementation 'com.android.support.constraint:constraint-layout:1.0.2'
implementation 'com.google.firebase:firebase-database:16.0.1'
implementation 'com.google.firebase:firebase-crash:11.0.4'
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:24.2.0"
implementation 'com.google.firebase:firebase-core:16.0.0'
implementation 'com.google.firebase:firebase-auth:16.0.1'
implementation 'de.hdodenhof:circleimageview:2.2.0'
implementation 'com.crashlytics.sdk.android:crashlytics:2.9.3'
}
apply plugin: 'com.google.gms.google-services'
apply plugin: 'io.fabric'
I have tried all the techniques mentioned in other posts and solution website, but I dont find my same error listed in any of these websites. Hence I am creating this question here.
You're getting this error because your maven shouldn't be a direct child of "allprojects" but a direct child of "repositories".
allprojects {
repositories {
google()
jcenter()
maven {
url 'https://maven.google.com/'
}
}
}

Could not find firebase-messaging.jar - Android Build Error

I am getting this build error.
Could not find firebase-messaging.jar
(com.google.firebase:firebase-messaging:15.0.2). Searched in the
following locations:
https://jcenter.bintray.com/com/google/firebase/firebase-messaging/15.0.2/firebase-messaging-15.0.2.jar
I have attached the build.gradle code below. Please check. I am not able to get solution for this on stackoverflow
build.gradle
plugins {
id 'com.onesignal.androidsdk.onesignal-gradle-plugin' version '0.8.1'
}
apply plugin: 'com.onesignal.androidsdk.onesignal-gradle-plugin'
apply plugin: 'com.android.application'
android {
compileSdkVersion 26
//buildToolsVersion '27.0.3'
defaultConfig {
applicationId "com.test.android"
minSdkVersion 15
targetSdkVersion 26
versionCode 3
versionName "1.0.2"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
vectorDrawables.useSupportLibrary = true
multiDexEnabled true
manifestPlaceholders = [onesignal_app_id : "65f11821-XXXXXX-4ec4-9e41-XXXXXXXX",
// Project number pulled from dashboard, local value is ignored.
onesignal_google_project_number: "XXXXX"]
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
compileOptions {
targetCompatibility 1.8
sourceCompatibility 1.8
}
}
dependencies {
implementation fileTree(include: ['*.jar'], dir: 'libs')
// applovin
implementation project(':unity-ads')
//unity ads
//compile 'com.google.android.gms:play-services-ads:11.0.4'
implementation 'com.android.support:appcompat-v7:26.1.0'
implementation 'com.android.support:design:26.1.0'
implementation 'com.android.support:support-vector-drawable:26.1.0'
implementation 'com.android.support.constraint:constraint-layout:1.1.1'
implementation 'com.android.support:support-v4:26.1.0'
//implementation 'com.google.android.gms:play-services:11.6.0'
implementation 'com.android.support:multidex:1.0.3'
//compile 'com.github.cooltechworks:ScratchView:v1.1'//not used
implementation 'com.jackpocket:scratchoff:1.1.0'
implementation 'com.adcolony:sdk:3.2.1'
implementation 'com.android.support:support-annotations:27.1.1'
implementation 'com.google.android.gms:play-services-ads:15.0.1'
implementation 'com.android.support:cardview-v7:26.1.0'
implementation 'com.facebook.android:facebook-share:4.33.0'
testImplementation 'junit:junit:4.12'
implementation 'com.ironsource.sdk:mediationsdk:6.7.0.1#jar'
//compile 'com.google.ads.mediation:unity:2.1.1.0' //not used
//implementation 'com.google.firebase:firebase-database:11.6.0'
implementation 'com.github.bumptech.glide:glide:4.1.1'
//implementation 'commons-net:commons-net:3.3'
//get server time
//compile 'com.github.instacart.truetime-android:library-extension-rx:2.0'
//compile 'com.github.instacart.truetime-android:library:2.0' // not used
implementation 'com.google.firebase:firebase-messaging:15.0.2'
//implementation 'com.google.firebase:firebase-auth:11.6.0'
//implementation 'com.google.firebase:firebase-core:11.6.0'
implementation 'com.google.android.gms:play-services-auth:15.0.1'
implementation 'com.squareup.retrofit2:retrofit:2.3.0'
//implementation 'com.onesignal:OneSignal:[3.7.1, 3.9.1]'
implementation 'com.onesignal:OneSignal:[3.9.1, 3.99.99]'
implementation files('libs/applovin-sdk-7.7.0-javadoc.jar')
implementation files('libs/applovin-sdk-7.7.0.jar')
}
apply plugin: 'com.google.gms.google-services'
Project build.gradle
// Top-level build file where you can add configuration options common to all sub-projects/modules.
buildscript {
repositories {
jcenter()
google()
maven {
url "https://maven.google.com"
}
}
dependencies {
classpath 'com.android.tools.build:gradle:3.2.0-alpha17'
classpath 'com.google.gms:google-services:4.0.1'
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
}
}
allprojects {
repositories {
jcenter()
maven { url "https://maven.google.com" }
maven { url "https://jitpack.io" }
maven { url "https://adcolony.bintray.com/AdColony" }
maven { url "https://dl.bintray.com/ironsource-mobile/android-sdk" }
google()
}
}
task clean(type: Delete) {
delete rootProject.buildDir
}
moving google() on top of jcenter() worked for me in the build.gradle file
// Top-level build file where you can add configuration options common to all sub-projects/modules.
buildscript {
repositories {
mavenCentral()
mavenLocal()
google()
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:3.2.0-alpha17'
classpath 'com.google.gms:google-services:4.0.1'
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
}
}
allprojects {
repositories {
google()
jcenter()
//maven { url "https://maven.google.com" }
maven { url "https://jitpack.io" }
maven { url "https://adcolony.bintray.com/AdColony" }
maven { url "https://dl.bintray.com/ironsource-mobile/android-sdk" }
}
}
task clean(type: Delete) {
delete rootProject.buildDir
}

Unable to resolve dependency for ':app#release/compileClasspat': could not resolve com.nineoldandroidlibs:library:2.4.0

Unable to resolve dependency for ':app#release/compileClasspat': could not resolve com.nineoldandroidlibs:library:2.4.0 I am trying to import fancy button and pie chart libraries but i am getting the error mention above. I tried everything but nothing works. Following is my gradle file of project
buildscript {
repositories {
google()
// maven { url "https://maven.google.com"}
maven {
url 'https://maven.google.com'
}
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:3.0.1'
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
}
}
allprojects {
repositories {
maven {
url 'https://maven.google.com'
}
google()
// maven { url "https://maven.google.com"}
//maven { url "https://jitpack.io" }
jcenter()
}
}
task clean(type: Delete) {
delete rootProject.buildDir
}
Following is my Gradle Project file
apply plugin: 'com.android.application'
android {
compileSdkVersion 26
defaultConfig {
applicationId "com.example.hamzanaeem.gasapplication"
minSdkVersion 16
targetSdkVersion 26
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:26.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'
compile 'com.nineoldandroids:library:2.4.0'
compile 'com.github.blackfizz:eazegraph:1.2.2#aar'
compile 'com.github.medyo:fancybuttons:1.8.4'
}
Please help I`ve already tried all of the solution from stackoverflow too.
Thanks

Gradle: Failed to resolve (mavenCentral)

My gradle sync fails because of this error:
I don't know exactly what is wrong with my gradle configuration (It must be something with maven import). Here are the files:
build.gradle (Top level)
buildscript {
repositories {
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:2.2.2'
classpath 'com.google.gms:google-services:3.0.0'
}
}
allprojects {
repositories {
mavenCentral()
maven { url "https://repo.spring.io/release" }
maven { url "https://repo.spring.io/milestone" }
maven { url "https://repo.spring.io/snapshot" }
maven { url 'https://repo.spring.io/libs-milestone' }
flatDir {
dirs 'libs'
}
}
}
build.gradle (app)
apply plugin: 'com.android.application'
android {
compileSdkVersion 25
buildToolsVersion "25.0.2"
defaultConfig {
applicationId "com.confidential.packageid"
minSdkVersion 16
targetSdkVersion 25
versionCode 1
versionName "1.0"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
multiDexEnabled true
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
sourceSets {
main {
res.srcDirs = ['src/main/res', 'src/main/res-img']
}
}
}
repositories {
mavenCentral()
maven { url "https://repo.spring.io/release" }
maven { url "https://repo.spring.io/milestone" }
maven { url "https://repo.spring.io/snapshot" }
maven { url 'https://repo.spring.io/libs-milestone' }
}
dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
compile(name:'sdk-release', ext:'aar')
androidTestCompile('com.android.support.test.espresso:espresso-core:2.2.2', {
exclude group: 'com.android.support', module: 'support-annotations'
})
compile 'com.android.support:appcompat-v7:25.3.1'
compile 'com.android.support:design:25.3.1'
compile 'com.google.firebase:firebase-core:10.2.1'
compile 'com.google.android.gms:play-services:10.2.1'
compile 'com.android.support:support-v4:25.3.1'
...
testCompile 'junit:junit:4.12'
...
compile 'com.noveogroup.android:androidlogger:1.3.6'
compile 'com.github.ybq:Android-SpinKit:1.0.5'
}
apply plugin: 'com.google.gms.google-services'
Which part of my gradle files is wrong?
Well, this exists... https://jcenter.bintray.com/com/noveogroup/android/android-logger/1.3.6/
(You're missing a dash. android-logger)
And maybe follow directions here? https://github.com/ybq/Android-SpinKit#gradle-dependency
For example,
allprojects {
jcenter()
// mavenCentral()
repositories {
maven { url "https://jitpack.io" }
...
}
Remember: jcenter() is a superset of mavenCentral()
Android buildscript repositories: jcenter VS mavencentral
Then, regading other things
// compile 'com.android.support:appcompat-v7:25.3.1' // not needed
compile 'com.android.support:design:25.3.1'
compile 'com.google.firebase:firebase-core:10.2.1' // Should really use 'database' or 'messaging' instead
compile 'com.google.android.gms:play-services:10.2.1' // Should be split
// compile 'com.android.support:support-v4:25.3.1' // not needed
Refer to "Selectively compiling APIs into your executable" https://developers.google.com/android/guides/setup

Android Data binding Error:Could not find com.android.databindig:databinder:1.0.-rc1

I have been trying for hours now to enable data binding in Android. Here is my gradle:
buildscript {
repositories {
mavenCentral()
maven { url 'http://download.crashlytics.com/maven' }
maven { url 'https://oss.sonatype.org/content/repositories/ksoap2-android-releases/' }
}
dependencies {
classpath 'com.crashlytics.tools.gradle:crashlytics-gradle:1.+'
classpath 'com.google.code.ksoap2-android:ksoap2-android:3.1.1'
classpath "com.android.databinding:dataBinder:1.0-rc0"
}
}
allprojects {
repositories {
jcenter()
mavenCentral()
}
}
apply plugin: 'com.android.application'
apply plugin: 'crashlytics'
repositories {
maven { url 'http://download.crashlytics.com/maven' }
maven { url 'https://oss.sonatype.org/content/repositories/ksoap2-android-releases/' }
}
android {
compileSdkVersion 16
buildToolsVersion "20.0.0"
defaultConfig {
applicationId "ts.kiosk.app.checkout"
minSdkVersion 16
targetSdkVersion 16
versionCode 2
versionName "0.0.2.258"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
lintOptions {
abortOnError false
}
sourceSets {
main {
assets.srcDirs = ['src/main/assets', 'src/main/assets/']
}
}
sourceSets {
androidTest.setRoot('src/test')
}
dataBinding {
enabled = true
}
}
dependencies {
compile fileTree(include: ['*.jar'], dir: 'libs')
compile 'com.android.support:support-v4:20.0.0'
compile 'com.crashlytics.android:crashlytics:1.+'
compile 'net.danlew:android.joda:2.7.2'
compile 'com.google.code.ksoap2-android:ksoap2-android:3.1.1'
compile 'com.squareup.retrofit:retrofit:1.6.1'
compile 'com.squareup.okhttp:okhttp-urlconnection:2.0.0'
compile 'com.squareup.okhttp:okhttp:2.0.0'
compile project(':asterixmodule')
compile project(':servicemodule')
compile project(':sdfclient')
// Robolectric
testCompile 'junit:junit:4.12'
testCompile 'org.hamcrest:hamcrest-library:1.3'
testCompile 'org.apache.maven:maven-ant-tasks:2.1.3' // fixes issue on linux/mac
testCompile 'org.robolectric:robolectric:3.0'
}
I keep getting the error:
Error:Could not find com.android.databindig:databinder:1.0.-rc1 .
I have also read similar posts on SO stating that you also have to add:
classpath 'com.android.tools.build:gradle:1.3.0-beta1'
but my gradle is 2.4 so I'm thinking I don't need that and of course if I do add that statement, gradle cannot find that version of gradle (1.3.0)
I upgraded to version 2.0 of Android Studio and the gradle build issue went away
remove
classpath "com.android.databinding:dataBinder:1.0-rc0"
Starting with android gradle plugin 1.5.0, all you need is
android {
dataBinding.enabled = true
}
check your gradle version, i resolved it by upgrading :
previously :
classpath "com.android.tools.build:gradle:1.3.0"
I updated to :
classpath "com.android.tools.build:gradle:2.2.0"
Or 1.5.0 and newer.

Categories

Resources