skip to Main Content

(when i try to run the project )error is Build file ‘C:UsersjupunDesktoptrid-7codecanyon-22842942-trid-city-guide-android-native-with-admin-panel-firebaseTrid-Android-PackageAndroid codeTrid-CityGuide_v7appbuild.gradle’ line: 1

A problem occurred evaluating project ‘:app’.

Failed to apply plugin ‘com.android.internal.application’.
ANDROID_SDK_HOME is set to the root of your SDK: C:UsersjupunAppDataLocalAndroidSdk
ANDROID_SDK_HOME was meant to be the parent path of the preference folder expected by the Android tools.
It is now deprecated.

  • Try:
    Run with –stacktrace option to get the stack trace. Run with –info or –debug option to get more log output. Run with –scan to get full insights.

gradle.build

 apply plugin: 'com.android.application'
apply plugin: 'com.google.firebase.crashlytics'
apply plugin: 'realm-android'
buildscript {
    repositories {
        jcenter()
        google()
    }

    dependencies {

        classpath 'com.android.tools.build:gradle:7.0.1'
        //        classpath 'io.fabric.tools:gradle:1.+'
//        classpath "io.realm:realm-gradle-plugin:4.2.0"
        classpath "io.realm:realm-gradle-plugin:5.11.0"
        classpath 'com.google.gms:google-services:4.3.3'
        classpath 'com.google.firebase:firebase-crashlytics-gradle:2.3.0'


    }
}

repositories {
    mavenCentral()
    jcenter()
    google()
    maven { url 'https://maven.fabric.io/public' }
    maven {
        url "https://oss.sonatype.org/content/repositories/snapshots"
    }
}


android {
    compileSdkVersion 28
    buildToolsVersion '31.0.0'
    defaultConfig {
      applicationId    "com.tripeka.travel"   // "com.bpackingapp.vietnam.travel"// "com.traveeva.android"//"com.rwandadestinations.android"
        //  "com.traveeva.android"// "com.rhodes.guide" "com.rwandadestinations.android"
        // com.bpackingapp.vietnam.travel
        minSdkVersion 21
        targetSdkVersion 28
        versionCode 21
        versionName "1.14"
        multiDexEnabled true
        resValue "string", "google_maps_key", (project.findProperty("GOOGLE_MAPS_API_KEY") ?: "")
    }
    dexOptions {
        jumboMode = true
        javaMaxHeapSize "4g" //specify the heap size for the dex process
    }
    buildTypes {
        release {
            minifyEnabled false
            shrinkResources false
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
            proguardFiles getDefaultProguardFile('proguard-android.txt')

            splits {
                abi {
                    enable true
                    reset()
                    include 'x86', 'x86_64', 'armeabi', 'armeabi-v7a', 'mips', 'mips64', 'arm64-v8a'
                    universalApk false
                }
            }

        }
    }

    packagingOptions {
//        exclude "lib/arm64-v8a/librealm-jni.so"
//        exclude "lib/armeabi/librealm-jni.so"
//        exclude "lib/mips/librealm-jni.so"
//        exclude "lib/x86_64/librealm-jni.so"
//        exclude "lib/x86/librealm-jni.so"
    }

    lintOptions {
        checkReleaseBuilds false
        abortOnError false
    }

    configurations.all {
        resolutionStrategy.force 'com.google.code.findbugs:jsr305:1.3.9'
    }
}

dependencies {
    implementation fileTree(dir: 'libs', include: ['*.jar'])
    implementation 'com.google.firebase:firebase-crashlytics:17.2.1'
    implementation 'com.google.firebase:firebase-analytics:17.5.0'
    androidTestImplementation('androidx.test.espresso:espresso-core:3.1.0', {
        exclude group: 'com.android.support', module: 'support-annotations'
    })

//    List view animation


    // Slider Image

    //    compile 'com.firebase:firebase-client-android:2.0.3+'

//    compile('com.facebook.android:facebook-android-sdk:4.23.0')

    //noinspection GradleCompatible
    implementation 'androidx.appcompat:appcompat:1.0.0'
//
    implementation 'com.google.android.material:material:1.0.0'
    implementation 'com.nhaarman.listviewanimations:lib-core:3.1.0@aar'
//
    implementation 'com.nhaarman.listviewanimations:lib-manipulation:3.1.0@aar'
//
    implementation 'com.nhaarman.listviewanimations:lib-core-slh:3.1.0@aar'
//
    implementation 'com.google.android.gms:play-services:11.6.2'
    implementation 'androidx.multidex:multidex:2.0.0'
    implementation 'com.google.firebase:firebase-core:11.6.2'
    implementation 'com.squareup.picasso:picasso:2.5.2'
    implementation 'com.nineoldandroids:library:2.4.0'
    implementation 'com.daimajia.slider:library:1.1.5@aar'
    implementation 'com.google.firebase:firebase-auth:11.6.2'
    implementation 'com.facebook.android:facebook-android-sdk:4.23.+'
    implementation 'com.nostra13.universalimageloader:universal-image-loader:1.9.4'
    implementation 'pl.charmas.android:android-reactive-location:0.10@aar'
    implementation 'com.google.android.gms:play-services-location:11.6.2'
    implementation 'com.google.android.gms:play-services-places:11.6.2'
    implementation 'io.reactivex:rxjava:1.2.0'
    implementation 'com.github.zurche:open-weather-map-android-wrapper:v0.1'
    implementation 'androidx.constraintlayout:constraintlayout:1.1.3'
//    compile 'io.realm:realm-android:4.2.0'
    implementation 'com.timehop.stickyheadersrecyclerview:library:[0.4.3]@aar'
    implementation 'org.florescu.android.rangeseekbar:rangeseekbar-library:0.3.0'
    implementation 'de.hdodenhof:circleimageview:2.1.0'
    testImplementation 'junit:junit:4.12'

    implementation 'org.solovyev.android.views:linear-layout-manager:0.5@aar'
    implementation 'com.google.maps.android:android-maps-utils:0.5+'


    implementation 'com.google.android.gms:play-services-ads:11.6.2'

}
// ADD THIS AT THE BOTTOM
apply plugin: 'com.google.gms.google-services'

2

Answers


  1. Try: Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.
    

    This error mostly occurs when you updated any library in gradle.build
    Try to rollback any latest library you updated.

    Login or Signup to reply.
  2. In my case it was different I had to change to something like that:

    export ANDROID_HOME=/home/$USER/Android
    export ANDROID_SDK_ROOT=$ANDROID_HOME/Sdk
    

    And android sdk is located in: /home/$USER/Android/Sdk

    OS: Ubuntu 20.04

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search