Android Studio: Gradle build fails — Execution failed for task ':compileDebugAidl'

前端 未结 10 1927
孤街浪徒
孤街浪徒 2021-02-06 22:18

After changes to source and building with gradle in Android Studio (I/O preview) AI - 130.677228 the build fails with the following error:

Gradle: 
FAILURE: Buil         


        
相关标签:
10条回答
  • 2021-02-06 23:06

    I solved this issue by setting buildToolsVersion in my build.gradle file to match the latest version of the Android SDK Build-tools in the SDK manager.

    Showing Build-tools version 22.0.1 is installed

    In my case, I have the Android SDK Build-tools version 22.0.1 installed, so I set buildToolsVersion accordingly:

    apply plugin: 'com.android.application'
    
    android {
        compileSdkVersion 22
        buildToolsVersion "22.0.1"
    ...
    

    After making that change, my app builds uneventfully.

    0 讨论(0)
  • 2021-02-06 23:07

    The missing AIDL something is google android studio problem to not update major gradle dependencies class path.

    Fix: - open project gradle file (no app, project !) - replace: classpath 'com.android.tools.build:gradle:1.0.1' or whatever with classpath 'com.android.tools.build:gradle:1.3.1'

    If you can not compile a time before, compilable project, the google cat & dog are not sleeping and theire making changes, updates, therefore you have to wake up and made changes where they forget to. And gradle is quite unstable project and buggy.

    0 讨论(0)
  • 2021-02-06 23:12

    Like to register my problem and solution here since it is almost relevent to the issue posted that if someone stumbles across the error could overcome it quickly.

    I faced a similar issue with Failed to execute the task: compileDebugaidl aidl/debug/.. Access is denied ...

    I overcame the issue by deleting the build directory and rebuilding it again[I'm using the Gradle 0.14.4]

    0 讨论(0)
  • 2021-02-06 23:13

    Add the code below into your build.gradle file. This works for me.

    dependencies {
    
    compile fileTree(dir: 'libs', include: '*.jar')
    
    }
    
    0 讨论(0)
提交回复
热议问题