I am learning RxJava. For that i followed droidcon talk video on RxJava. The instructor has given repo link for the project he was using. I cloned the repo when i try to build project in my machine. I get this error
Error:Unable to delete old javaCompile action, maybe the class name
has changed? Please submit a bug report with what version of gradle
you are using.
Here is gradle.build file
buildscript {
repositories {
mavenCentral()
}
dependencies {
classpath 'me.tatarka:gradle-retrolambda:2.5.0'
}
}
repositories {
mavenCentral()
maven { url "https://github.com/alter-ego/advanced-android-logger/raw/develop/releases/" }
}
apply plugin: 'retrolambda'
apply plugin: 'com.android.application'
android {
compileSdkVersion 23
buildToolsVersion "25.0.0"
defaultConfig {
applicationId "com.packtpub.apps.rxjava_essentials"
minSdkVersion 16
targetSdkVersion 22
versionCode 1
versionName "1.0"
jackOptions {
enabled true
}
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
}
lintOptions {
disable 'InvalidPackage'
abortOnError false
}
packagingOptions {
exclude 'META-INF/services/javax.annotation.processing.Processor'
}
}
dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
compile 'com.android.support:support-v4:23.1.1'
compile "com.android.support:appcompat-v7:23.1.1"
compile 'com.android.support:recyclerview-v7:23.1.1'
compile 'com.android.support:cardview-v7:23.1.1'
compile 'com.jakewharton.timber:timber:4.1.0'
compile 'org.projectlombok:lombok:1.14.8'
compile 'com.jakewharton:butterknife:6.0.0'
compile 'io.reactivex:rxandroid:1.1.0'
compile 'io.reactivex:rxjava:1.1.0'
compile 'io.reactivex:rxjava-joins:0.22.0'
compile 'com.google.guava:guava:18.0'
compile 'com.google.code.gson:gson:2.4'
compile 'com.github.lzyzsd:circleprogress:1.1.0#aar'
compile 'com.github.rey5137:material:1.0.0'
compile 'com.squareup.retrofit:retrofit:1.9.0'
compile 'com.squareup.okhttp:okhttp-urlconnection:2.0.0'
compile 'com.squareup.okhttp:okhttp:2.0.0'
compile 'com.nostra13.universalimageloader:universal-image-loader:1.9.3'
}
Any idea how can i fix this issue?
The problem comes from RetroLambda plugin (see line 108 in this link).
I assume upgrading plugin version would resolve your issue:
classpath 'me.tatarka:gradle-retrolambda:3.6.1'
Try this one on app/build.gradle
Reference on github
buildscript {
repositories {
mavenCentral()
}
dependencies {
classpath 'me.tatarka:gradle-retrolambda:3.4.0'
}
}
repositories {
mavenCentral()
maven { url "https://github.com/alter-ego/advanced-android-logger/raw/develop/releases/" }
}
apply plugin: 'com.android.application'
apply plugin 'me.tatarka:gradle-retrolambda:3.4.0'
android {
compileSdkVersion 23
buildToolsVersion "23.0.2"
defaultConfig {
applicationId "com.packtpub.apps.rxjava_essentials"
minSdkVersion 16
targetSdkVersion 22
versionCode 1
versionName "1.0"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
}
lintOptions {
disable 'InvalidPackage'
abortOnError false
}
packagingOptions {
exclude 'META-INF/services/javax.annotation.processing.Processor'
}
}
dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
compile 'com.android.support:support-v4:23.1.1'
compile "com.android.support:appcompat-v7:23.1.1"
compile 'com.android.support:recyclerview-v7:23.1.1'
compile 'com.android.support:cardview-v7:23.1.1'
compile 'com.jakewharton.timber:timber:4.1.0'
compile 'org.projectlombok:lombok:1.14.8'
compile 'com.jakewharton:butterknife:6.0.0'
compile 'io.reactivex:rxandroid:1.1.0'
compile 'io.reactivex:rxjava:1.1.0'
compile 'io.reactivex:rxjava-joins:0.22.0'
compile 'com.google.guava:guava:18.0'
compile 'com.google.code.gson:gson:2.4'
compile 'com.github.lzyzsd:circleprogress:1.1.0#aar'
compile 'com.github.rey5137:material:1.0.0'
compile 'com.squareup.retrofit:retrofit:1.9.0'
compile 'com.squareup.okhttp:okhttp-urlconnection:2.0.0'
compile 'com.squareup.okhttp:okhttp:2.0.0'
compile 'com.nostra13.universalimageloader:universal-image-loader:1.9.3'
}
Related
I keep getting this error every time I build my gradle.
Here's my app.gradle:
apply plugin: 'com.android.application'
android {
compileSdkVersion 25
buildToolsVersion "24.0.3"
defaultConfig {
applicationId "com.devteam.abire.abire"
minSdkVersion 19
targetSdkVersion 25
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:2.2.2', {
exclude group: 'com.android.support', module: 'support-annotations'
})
compile 'de.hdodenhof:circleimageview:2.0.0'
compile 'com.android.support:cardview-v7:25.1.0'
compile 'com.android.support:design:25.1.0'
compile 'com.android.support:appcompat-v7:25.1.0'
compile 'com.google.android.gms:play-services:10.0.1'
testCompile 'junit:junit:4.12'
}
heres my project gradle:
buildscript {
repositories {
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:2.2.3'
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
}
}
allprojects {
repositories {
jcenter()
}
}
task clean(type: Delete) {
delete rootProject.buildDir
}
I've been getting this error for the past three projects I have made. It is very annoying. Thanks in advance!
This is my gradle.build on app given below it shows error:
Error:(38, 0) Plugin with id 'com.google.gms.google-services' not found.
Is there any answer?
apply plugin: 'com.android.application'
android {
compileSdkVersion 23
buildToolsVersion "23.0.0"
defaultConfig {
applicationId "com.example.admin.youfame"
minSdkVersion 16
targetSdkVersion 23
versionCode 1
versionName "1.0"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard- rules.pro'
}
}
}
repositories {
mavenCentral()
}
dependencies {
compile fileTree(include: ['*.jar'], dir: 'libs')
testCompile 'junit:junit:4.12'
compile 'com.android.support:appcompat-v7:23.4.0'
compile 'com.android.support:design:23.4.0'
compile 'com.android.support:support-v4:23.4.0'
compile 'com.android.support:cardview-v7:23.0.0'
compile 'com.android.support:recyclerview-v7:23.0.0'
compile 'com.google.apis:google-api-services-youtube:v3- rev152-1.21.0'
compile 'com.android.volley:volley:1.0.0'
compile 'com.facebook.android:facebook-android-sdk:4.+'
compile 'com.google.firebase:firebase-ads:10.0.1'
compile 'com.google.android.gms:play-services-ads:10.0.1'
}
apply plugin: 'com.google.gms.google-services'
Add in your top-level build.gradle the google play services plugin:
buildscript {
repositories {
jcenter()
}
dependencies {
//...
classpath 'com.google.gms:google-services:3.0.0'
}
}
Then you have to add in your module the google-services.json file
root
|--module
|----google-services.json
You need to delete the code apply plugin:
com.google.gms.google-services
and it works.
I have used searchview in my project with dependency compile 'com.lapism:searchview:3.0.2' in build.gradle file. But while I'm trying run the application I'm getting an error
Error: package com.lapism.searchview.view does not exist
Error:
cannot find symbol class SearchView
Error:Execution failed for task
':app:compileDebugJavaWithJavac'.
My current android version is 2.1
My Build.gradle File:
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'
android {
compileSdkVersion 23
buildToolsVersion "23.0.2"
defaultConfig {
multiDexEnabled true
applicationId "pingo.betnek.mobigrab"
minSdkVersion 16
targetSdkVersion 15
versionCode 2
versionName "1.1"
}
dexOptions
{
incremental true
javaMaxHeapSize "4g"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'),'proguard-rules.pro'
}
}
}
repositories {
jcenter()
mavenCentral()
maven {
url "https://jitpack.io"
}
maven { url 'https://maven.fabric.io/public' }
}
dependencies
{
provided fileTree(dir: 'libs', include: ['*.jar'])
testCompile 'junit:junit:4.12'
compile files('libs/activation.jar')
compile files('libs/additionnal.jar')
compile files('libs/mail.jar')
compile 'com.android.support:appcompat-v7:23.1.1'
compile 'com.android.support:design:23.1.1'
compile 'io.realm:realm-android:0.87.2'
compile 'com.google.android.gms:play-services:8.4.0'
compile 'com.lapism:searchview:3.0.2'
compile 'com.googlecode.libphonenumber:libphonenumber:7.2.7'
compile 'com.android.support:multidex:1.0.1'
compile('com.crashlytics.sdk.android:crashlytics:2.5.5#aar')
{
transitive = true;
}
}
Show us your code usage..
In any case, change com.lapism.searchview.view.SearchView to com.lapism.searchview.SearchView, or just remove the imports and let Android Studio re-import them with the correct namings.
It has been refactored since 2.3 or whatever version..
hi i'm newbie with Android studio, after updating from android studio 1.4 to 2.1, I am getting the following build error when I try and sync my project:
Gradle sync failed: Gradle DSL method not found: 'classpath()'
and Here is the build.gradle:
apply plugin:'com.android.application'
android {
compileSdkVersion 23
buildToolsVersion "23.0.3"
useLibrary 'org.apache.http.legacy'
defaultConfig {
applicationId "android.arisa.---------"
minSdkVersion 11
targetSdkVersion 23
versionCode 1
versionName "1.0"
//multiDexEnabled true
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
}
dependencies {
classpath 'com.android.tools.build:gradle:2.1.0'
compile fileTree(include: ['*.jar'], dir: 'libs')
testCompile 'junit:junit:4.12'
compile('cn.trinea.android.view.autoscrollviewpager:android-auto-scroll-view-pager:1.1.2') {
exclude module: 'support-v4'
}
compile('com.afollestad.material-dialogs:core:0.8.1.0#aar') {
transitive = true
}
compile('com.afollestad.material-dialogs:commons:0.8.1.0#aar') {
transitive = true
}
compile 'com.android.support:design:23.0.1'
compile 'com.android.support:appcompat-v7:23.0.1'
compile 'com.android.support:support-v4:23.0.1'
compile 'com.google.android.gms:play-services-maps:7.8.0'
compile 'com.google.android.gms:play-services-location:7.8.0'
//compile 'com.android.support:multidex'
//compile 'com.mcxiaoke.volley:library-aar:1.0.0'
//compile 'com.mcxiaoke.volley:library:1.+'
compile files('/Users/Bmaster/AndroidStudioProjects/KalahroodFinal/.idea/libraries/jsoup-1.8.3.jar')
compile files('/Users/Bmaster/AndroidStudioProjects/KalahroodFinal/jsoup-1.8.3.jar')
compile files('/Users/Bmaster/AndroidStudioProjects/KalahroodFinal/libraries/jsoup-1.8.3.jar')
compile 'com.google.android.gms:play-services:8.3.0'
}
repositories {
jcenter()
}
//repositories {
// maven { url "https://jitpack.io" }
//}
and the gradle-wrapper.properties is:
#Sat Apr 30 11:59:41 2016
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-2.10-all.zip
#distributionUrl=https\://services.gradle.org/distributions/gradle-2.12-all.zip
How can i correct this?(please help me)
edit: After editing grade, my android gradle is:
apply plugin: 'com.android.application'
android {
compileSdkVersion 23
buildToolsVersion "23.0.3"
defaultConfig {
applicationId "android.arisa.kalahroodfinal"
minSdkVersion 10
targetSdkVersion 23
versionCode 1
versionName "1.0"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
}
buildscript {
repositories {
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:2.1.0'
}
}
allprojects {
repositories {
jcenter()
}
}
dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
testCompile 'junit:junit:4.12'
compile 'com.android.support:appcompat-v7:23.2.1'
compile('cn.trinea.android.view.autoscrollviewpager:android-auto-scroll-view-pager:1.1.2') {
exclude module: 'support-v4'
}
compile('com.afollestad.material-dialogs:core:0.8.1.0#aar') {
transitive = true
}
compile('com.afollestad.material-dialogs:commons:0.8.1.0#aar') {
transitive = true
}
compile 'com.android.support:design:23.0.1'
compile 'com.android.support:support-v4:23.0.1'
compile 'com.google.android.gms:play-services-maps:7.8.0'
compile 'com.google.android.gms:play-services-location:7.8.0'
compile files('/Users/Bmaster/AndroidStudioProjects/KalahroodFinal/.idea/libraries/jsoup-1.8.3.jar')
compile files('/Users/Bmaster/AndroidStudioProjects/KalahroodFinal/jsoup-1.8.3.jar')
compile files('/Users/Bmaster/AndroidStudioProjects/KalahroodFinal/libraries/jsoup-1.8.3.jar')
compile 'com.google.android.gms:play-services:8.3.0'
}
but i have new error:
Error:(43, 13) Failed to resolve: com.afollestad.material-dialogs:commons:0.8.1.0
Error:(40, 13) Failed to resolve: com.afollestad.material-dialogs:core:0.8.1.0
Try to remove the classpath 'com.android.tools.build:gradle:2.1.0' string.
I also would recommend you to create new project in Android studio 2.1 and compare the gradle files generated by IDE with yours.
You are using
classpath 'com.android.tools.build:gradle:2.1.0'
in the wrong block.
More it in the top-level build.gradle file (in the root of your 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.1.0'
}
}
To solve the issue with the library material dialog you have to add the repository from which download the dependencies:
In your top-level build.gradle file add the jitpack repo:
allprojects {
repositories {
...
maven { url "https://jitpack.io" }
}
}
It is very simple and the problem might be fundimental
i want to use GoogleSignInOptions, GoogleSignInResult, and Auth to implement google+ signin.
i am following the guides here are the gradle builds:
project build:
// Top-level build file where you can add configuration options common to all sub-projects/modules.
buildscript {
repositories {
jcenter()
mavenCentral()
}
dependencies {
classpath 'com.android.tools.build:gradle:1.3.0'
classpath 'com.google.gms:google-services:1.3.0-beta1'
}
}
allprojects {
repositories {
jcenter()
maven { url "http://jzaccone.github.io/SlidingMenu-aar" }
}
}
app build:
apply plugin: 'com.android.application'
android {
compileSdkVersion 23
buildToolsVersion "23.0.1"
defaultConfig {
applicationId "com.ili.BDigital"
minSdkVersion 14
targetSdkVersion 23
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.txt'
}
}
}
dependencies {
compile project(':eventBrowser')
}
library (extra module) build:
apply plugin: 'com.android.library'
apply plugin: 'com.google.gms.google-services'
android {
compileSdkVersion 23
buildToolsVersion "23.0.1"
defaultConfig {
minSdkVersion 14
targetSdkVersion 23
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.txt'
}
}
}
dependencies {
compile 'com.google.android.gms:play-services:8.4.0'
compile 'com.squareup.okhttp3:okhttp:3.1.2'
compile 'com.android.support:support-v4:23.1.1'
compile 'com.android.support:appcompat-v7:23.1.1'
compile 'com.android.support:design:23.1.1'
compile 'com.google.code.gson:gson:2.3'
compile 'com.etsy.android.grid:library:1.0.5'
compile 'com.jeremyfeinstein.slidingmenu:library:1.3#aar'
compile 'com.jakewharton:butterknife:4.0.1'
compile 'com.pubnub:pubnub:3.7.5'
compile 'com.nineoldandroids:library:2.4.0'
compile 'com.wefika:horizontal-picker:1.1.0'
compile 'com.facebook.android:facebook-android-sdk:4.5.0'
compile files('libs/com.haarman.listviewanimations-2.5.2.jar')
compile files('libs/google-play-services.jar')
compile files('libs/htmlcleaner-2.8.jar')
compile files('libs/socialauth-4.9.jar')
compile files('libs/socialauth-android-3.2.jar')
}
/*
compile 'com.pubnub:pubnub-android-debug:3.7.+'
compile 'javax.inject:javax.inject:1#jar'
compile 'com.squareup.dagger:dagger-compiler:1.1.0'
compile 'com.jakewharton:butterknife:4.0.1'
compile 'com.squareup.dagger:dagger:1.1.0'
compile 'com.github.pedrovgs:renderers:1.0.9'
compile 'com.google.gms:google-services:2.0.0-rc1'
*/
I've been stuck on this for a day and it's driving me insane
UPDATE: I removed "compile files('libs/google-play-services.jar')" and now even R is giving me "cannot resolve symbol"
Try to add this line in the bottom of your build.gradle file (which you import your dependency)
apply plugin: 'com.google.gms.google-services'