0

Look my Error Image

Why im getting error like this in my build gradle ??

org/gradle/api/plugins/JavaBasePlugin

build:sync

FAILURE: Build failed with an exception.

* Where:
Build file 'D:\workspace\New\mrcos-mobile-appv3\MrcosClient\build.gradle' line: 1

* What went wrong:
A problem occurred evaluating project ':MrcosClient'.
> org/gradle/api/plugins/JavaBasePlugin

* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.

CONFIGURE FAILED

Total time: 0.401 secs
Cause: org/gradle/api/plugins/JavaBasePlugin

in the line of:

  • Where: Build file 'D:\workspace\New\mrcos-mobile-appv3\MrcosClient\build.gradle' line: 1

    apply plugin: 'com.android.library'//this is the line 1 that gets error
    apply plugin: 'com.neenbedankt.android-apt'
    android {
        compileSdkVersion 25
        buildToolsVersion '25.0.0'
    
        defaultConfig {
             minSdkVersion 15
            targetSdkVersion 25
            versionCode 1
            versionName "1.0"
            ndk {
                moduleName "mrcosclientndk"
    //            abiFilters "armeabi", "armeabi-v7a", "x86", "mips"
    
            }
        }
        buildTypes {
    
            release {
                minifyEnabled false
                proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
    
            }
    
        }
    
    
        sourceSets {
            main {
                jniLibs.srcDirs =['libs']
                jni.srcDirs = []
            }
        }
    
        packagingOptions {
            exclude 'META-INF/LICENSE'
            exclude 'META-INF/NOTICE'
            exclude 'META-INF/services/javax.annotation.processing.Processor'
            exclude "lib/arm64/libstlport_shared.so"
        }
    
        dexOptions {
            javaMaxHeapSize "4g"
        }
    }
    
    
    dependencies {
        compile fileTree(include: ['*.jar'], dir: 'libs')
        testCompile 'junit:junit:4.12'
        compile 'com.android.support:appcompat-v7:25.3.1'
        compile 'com.android.support:design:25.3.1'
    

    }

Kage Ryu
  • 11
  • 6

1 Answers1

0

Actually the problem is the IDE of Android Studio was corrupted. You must uninstall Android Studio Completely

To Completely Remove Android Studio from Windows:

Step 1: Run the Android Studio uninstaller

The first step is to run the uninstaller. Open the Control Panel and under Programs, select Uninstall a Program. After that, click on "Android Studio" and press Uninstall. If you have multiple versions, uninstall them as well.

Step 2: Remove the Android Studio files

To delete any remains of Android Studio setting files, in File Explorer, go to your user folder (%USERPROFILE%), and delete .android, .AndroidStudio and any analogous directories with versions on the end, i.e. .AndroidStudio1.2, as well as .gradle and .m2 if they exist.

Then go to %APPDATA% and delete the JetBrains directory.

Finally, go to C:\Program Files and delete the Android directory.

Step 3: Remove SDK

To delete any remains of the SDK, go to %LOCALAPPDATA% and delete the Android directory.

Step 4: Delete Android Studio projects

Android Studio creates projects in a folder %USERPROFILE%\AndroidStudioProjects, which you may want to delete.

this link solved my problem.

Kage Ryu
  • 11
  • 6