I run my project I get this error:Gradle project sync failed.Basic functionality will not work properly
LOGCAT:
This is my gradle-wrapper.properties
#Tue Sep 05 19:53:08 CEST 2017
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-3.3-all.zip
This is build.gradle(project):
buildscript {
repositories {
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:2.3.3'
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
}
}
allprojects {
repositories {
jcenter()
}
}
This is build.gradle(Module app):
apply plugin: 'com.android.application'
android {
compileSdkVersion 23
buildToolsVersion '25.0.3'
defaultConfig {
applicationId "info.androidhive.materialtabs"
minSdkVersion 15
targetSdkVersion 23
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:23.3.0'
compile 'com.android.support:design:23.3.0'
compile 'com.android.support:support-v4:23.3.0'
compile files('libs/tinydb-0.0.9.jar')
compile files('libs/droidText.0.2.jar')
compile files('libs/gson-2.2.2.jar')
compile files('libs/jipsi.jar')
// compile 'com.android.support:appcompat-v7:23.1.1'
// compile 'com.android.support:design:23.1.1'
compile 'com.mcxiaoke.volley:library-aar:1.0.0'
compile 'net.gotev:uploadservice:2.1'
compile files('libs/jipsi_055b734e299151494aa487f8b477464882efb509.jar')
//compile 'com.android.support:design:23.3.0'
}
Project structure-> Project:
You are using the Data Binding Library.
To use it, add in your module/build.gradle in the android block:
dataBinding {
enabled = true
}
More info here.
Related
I am developing an Android application and I am using 'Firebase-Messaging' library in my application. Now I need to 'proguard' and unfortunatly, 'Firebase' generated errors. I searched for solution and then I change the 'buildToolVersion' version 25.0.0 into 26.0.2. When I changed the versions I got the below error. I tried lot of solutions from internet including the 'Firebase Github' itself, but no good. I am using 'Firebase-Messaging 12.0.1' and below is the error I get.
Error:Execution failed for task ':app:processDebugManifest'.
> Manifest merger failed : Attribute meta-data#android.support.VERSION#value value=(26.0.2) from [com.android.support:design:26.0.2] AndroidManifest.xml:28:13-35
is also present at [com.android.support:support-v4:26.1.0] AndroidManifest.xml:28:13-35 value=(26.1.0).
Suggestion: add 'tools:replace="android:value"' to <meta-data> element at AndroidManifest.xml:26:9-28:38 to override.
build.gradle(Project)
// Top-level build file where you can add configuration options common to all sub-projects/modules.
buildscript {
repositories {
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:2.2.3'
classpath 'com.google.gms:google-services:3.2.1'
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
}
}
allprojects {
repositories {
jcenter()
mavenCentral()
maven { url 'https://maven.google.com' }
}
}
task clean(type: Delete) {
delete rootProject.buildDir
}
build.gradle(Module)
apply plugin: 'com.android.application'
android {
compileSdkVersion 26
buildToolsVersion "26.0.2"
defaultConfig {
applicationId "com.sample.firebase"
minSdkVersion 18
targetSdkVersion 26
versionCode 1
versionName "1.0"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
}
buildTypes {
release {
minifyEnabled true
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
}
dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
androidTestCompile('com.android.support.test.espresso:espresso-core:2.2.2', {
exclude group: 'com.android.support', module: 'support-annotations'
})
compile 'com.android.support:design:26.0.2'
compile 'com.android.support:appcompat-v7:26.0.0'
compile 'com.jakewharton:butterknife:5.1.1'
compile 'com.squareup.picasso:picasso:2.5.2'
compile 'de.hdodenhof:circleimageview:2.2.0'
compile 'me.angrybyte.goose:goose:1.8.0'
compile 'com.flaviofaria:kenburnsview:1.0.7'
compile 'com.google.firebase:firebase-messaging:12.0.1'
compile 'com.google.firebase:firebase-core:12.0.1'
compile 'com.jpardogo.googleprogressbar:library:1.2.0'
testCompile 'junit:junit:4.12'
}
apply plugin: 'com.google.gms.google-services'
You need to change this line of code:
compile 'com.android.support:appcompat-v7:26.0.0'
with
compile 'com.android.support:appcompat-v7:26.0.2'
All dependencies must be the same version.
i'm having an issue with my code when i try to run the app these errors shows up but i really don't know how to solve this all the dependencies Update tried to clean rebuild and validate chache but nothing happened here is the gradle file and the project gradle of the app any help is appreciated
buildscript {
repositories {
jcenter()
google()
}
dependencies {
classpath 'com.android.tools.build:gradle:3.0.1'
classpath 'com.google.gms:google-services:3.2.0'
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
}
}
allprojects {
repositories {
jcenter()
maven {
url 'https://jitpack.io'
}
maven {
url 'https://maven.google.com'
}
}
}
task clean(type: Delete) {
delete rootProject.buildDir
}
apply plugin: 'com.android.application'
android {
compileSdkVersion 27
buildToolsVersion "27.0.3"
defaultConfig {
applicationId "com.amiapp.videodownloader"
minSdkVersion 15
targetSdkVersion 27
versionCode 1
versionName "1.0"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
}
dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
androidTestCompile('com.android.support.test.espresso:espresso-core:3.0.1', {
exclude group: 'com.android.support', module: 'support-annotations'
})
compile files('libs/glide-3.6.0.jar')
compile 'com.android.support:appcompat-v7:27.0.2'
compile 'com.android.support.constraint:constraint-layout:1.0.2'
compile 'com.android.support:design:27.0.2'
compile 'com.google.android.gms:play-services-ads:11.8.0'
compile 'com.google.firebase:firebase-core:11.8.0'
compile 'com.google.firebase:firebase-messaging:11.8.0'
compile 'com.google.firebase:firebase-crash:11.8.0'
compile 'com.android.support:cardview-v7:27.0.2'
compile 'com.android.support:recyclerview-v7:27.0.2'
compile 'com.github.turhanoz:reactivedirectorychooser:2.0.1'
compile 'com.timqi.sectorprogressview:library:2.0.1'
compile 'com.geniusforapp.fancydialog:FancyDialog:0.1.0'
testCompile 'junit:junit:4.12'
}
apply plugin: 'com.google.gms.google-services'
Error:(10, 32) error: cannot find symbol class TransportMediator
Error:(98, 31) error: cannot find symbol variable TransportMediator
TransportMediator can be found in the v4 Support Library.
Include 'compile com.android.support:support-v4:27.0.2' in your module-level build.gradle file.
Why isn't my project running when I click on "run"?
I get this panel:
BUILD.GRADLE:
apply plugin: 'com.android.application'
android {
compileSdkVersion 23
buildToolsVersion '25.0.3'
defaultConfig {
applicationId "info.androidhive.materialtabs"
minSdkVersion 15
targetSdkVersion 23
versionCode 1
versionName "1.0"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
dataBinding{
enabled = true
}
}
dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
compile 'com.android.support:appcompat-v7:23.3.0'
compile 'com.android.support:design:23.3.0'
compile 'com.android.support:support-v4:23.3.0'
compile files('libs/tinydb-0.0.9.jar')
compile files('libs/droidText.0.2.jar')
compile files('libs/gson-2.2.2.jar')
compile files('libs/jipsi.jar')
// compile 'com.android.support:appcompat-v7:23.1.1'
// compile 'com.android.support:design:23.1.1'
compile 'com.mcxiaoke.volley:library-aar:1.0.0'
compile 'net.gotev:uploadservice:2.1'
compile files('libs/jipsi_055b734e299151494aa487f8b477464882efb509.jar')
//compile 'com.android.support:design:23.3.0'
}
AND
LOGCAT
Make sure that in your project level build.gradle jcenter () is added like this
allprojects { repositories { mavenCentral() jcenter() }}
Also check this
Gradle couldn't find com.android.databinding:dataBinder:1.0-rc0
This will be of help to you.
I am importing a project from an old repo getting ready to publish to live. After I imported the app and have run Sync project with Gradle files. I get the following errors after I try to run the app on a device.
Error:(38, 18) error: cannot find symbol class Stripe
followed by several
Error:(6, 28) error: package com.stripe.exception does not exist
Here is my build.gradle
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' }
}
android {
compileSdkVersion 25
buildToolsVersion '25.0.2'
defaultConfig {
applicationId 'com.business.us.app'
minSdkVersion 16
targetSdkVersion 23
versionCode 3
versionName "1.0"
multiDexEnabled true
}
signingConfigs {
signingConfigVtraining {
keyAlias 'Alias'
keyPassword 'thepassword'
storeFile file('../keystore/keystore.jks')
storePassword 'storepassword'
}
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
repositories {
mavenCentral()
}
productFlavors {
}
}
dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
testCompile 'junit:junit:4.12'
compile 'com.android.support:appcompat-v7:23.4.0'
compile 'com.alihafizji.creditcardedittext:library:+#aar'
compile 'com.android.support:multidex:1.0.0'
compile 'com.loopj.android:android-async-http:1.4.9'
compile 'cz.msebera.android:httpclient:4.4.1.1'
compile 'com.squareup.picasso:picasso:2.5.2'
compile 'com.nineoldandroids:library:2.4.0'
compile 'com.jeremyfeinstein.slidingmenu:library:1.3#aar'
compile 'com.google.android.gms:play-services-location:10.0.1'
compile 'com.sromku:simple-fb:4.1.1'
compile 'com.github.paolorotolo:appintro:4.0.0'
compile 'com.jakewharton:butterknife:7.0.1'
compile 'com.android.support:support-v4:23.4.0'
compile 'com.android.support:cardview-v7:23.4.0'
compile 'com.android.support:design:23.+'
compile 'net.danlew:android.joda:2.9.4.1'
compile 'com.auron:permission-manage:1.1.4'
compile 'com.github.markomilos:paginate:0.5.1'
compile 'com.google.android.gms:play-services-ads:10.0.1'
compile 'com.wang.avi:library:2.1.3'
compile 'com.kofigyan.stateprogressbar:stateprogressbar:0.0.1'
compile 'de.hdodenhof:circleimageview:2.1.0'
compile 'com.stripe:stripe-android:+'
compile project(':dateTimePicker')
compile('com.crashlytics.sdk.android:crashlytics:2.6.5#aar') {
transitive = true;
}
}
Any thoughts would be helpfull, Thank you!
I am trying to use JUnit in my android app. I have this build.gradle/app configuration:
apply plugin: 'com.android.application'
apply plugin: 'com.neenbedankt.android-apt'
android {
compileSdkVersion 23
buildToolsVersion "23.0.2"
defaultConfig {
applicationId "com.myproject.tv"
minSdkVersion 21
targetSdkVersion 23
versionCode 1
versionName "1.0"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
}
repositories { jcenter() }
apt {
arguments {
androidManifestFile variant.outputs[0].processResources.manifestFile
resourcePackageName android.defaultConfig.applicationId
}
}
dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
testCompile 'junit:junit:4.12' //added
compile 'com.squareup.retrofit:retrofit:1.9.0'
compile 'com.android.support:recyclerview-v7:23.2.0'
compile 'com.android.support:leanback-v17:23.2.0'
compile 'com.android.support:appcompat-v7:23.2.0'
compile 'com.github.bumptech.glide:glide:3.4.+'
compile 'com.squareup.okhttp:okhttp:2.5.0'
compile 'com.squareup.okhttp:okhttp-urlconnection:2.5.0'
compile 'com.android.support:support-v4:23.2.0'
compile 'com.android.support:design:23.2.0'
compile 'com.danikula:videocache:2.3.3'
compile 'org.androidannotations:androidannotations-api:3.3.2'
apt 'org.androidannotations:androidannotations:3.3.2'
compile 'com.google.dagger:dagger:2.0.2'
apt 'com.google.dagger:dagger-compiler:2.0.2'
provided 'org.glassfish:javax.annotation:10.0-b28'
}
When I run the application:
Error:(28, 0) Cannot get property 'processResources' on null object
Open File
The line 28 is:
26 apt {
27 arguments {
28 androidManifestFile variant.outputs[0].processResources.manifestFile
29 resourcePackageName android.defaultConfig.applicationId
30 }
31}
How do I fix this problem in my gradle ???
Try this. It worked for me.
<pre><code>
apt {
arguments {
androidManifestFile variant.outputs[0]?.processResources?.manifestFile
resourcePackageName android.defaultConfig.applicationId
}
}
</code></pre>
I met the same problem
Delete testCompile 'junit:junit:4.12' //added
then sync you will fix