aidl 缺少 android studio [英] aidl is missing android studio

查看:26
本文介绍了aidl 缺少 android studio的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

Environment:
Mac OS 10.10.3
Android studio:1.2.11
grandle:2.2.1

日志:

Information:Gradle tasks [:generateDebugSources, :generateDebugTestSources]
:preBuild
:preDebugBuild
:checkDebugManifest
:prepareDebugDependencies
:compileDebugAidl FAILED
Error:Execution failed for task ':compileDebugAidl'.
> aidl is missing

 

// Top-level build file where you can add configuration options common to all sub-projects/modules.
import org.gradle.internal.os.OperatingSystem
buildscript {
    repositories {
        jcenter()
    }
    dependencies {
        classpath 'com.android.tools.build:gradle:1.0.0'
    }
}

allprojects {
    repositories {
        jcenter()
    }
}
String SDK_DIR = System.getenv("ANDROID_HOME")
if(SDK_DIR == null) {
    Properties props = new Properties()
    props.load(new FileInputStream(project.rootProject.file("local.properties")))
    SDK_DIR = props.get('sdk.dir');
}


apply plugin: 'com.android.application'

android {
    compileSdkVersion 21
    buildToolsVersion "21.1.1"

    sourceSets {
        main {
            manifest.srcFile 'AndroidManifest.xml'
            java.srcDirs = ['src']
            resources.srcDirs = ['src']
            aidl.srcDirs = ['src']
            renderscript.srcDirs = ['src']
            res.srcDirs = ['res']
            assets.srcDirs = ['assets']
            jniLibs.srcDirs = ['libs']
        }

        // Move the tests to tests/java, tests/res, etc...
        instrumentTest.setRoot('tests')

        // Move the build types to build-types/<type>
        // For instance, build-types/debug/java, build-types/debug/AndroidManifest.xml, ...
        // This moves them out of them default location under src/<type>/... which would
        // conflict with src/ being used by the main source set.
        // Adding new build types or product flavors should be accompanied
        // by a similar customization.
        debug.setRoot('build-types/debug')
        release.setRoot('build-types/release')
    }
    defaultConfig {
        minSdkVersion 14
        targetSdkVersion 21
    }

    buildTypes {
        release {
            proguardFiles 'proguard.cfg'
        }
    }

    lintOptions {
        checkReleaseBuilds false
        // Or, if you prefer, you can continue to check for errors in release builds,
        // but continue the build even when errors are found:
        abortOnError false
    }
}

dependencies {
    compile fileTree(include: '*.jar', dir: 'libs')

    provided files("${SDK_DIR}/platforms/android-17/data/layoutlib.jar")
    //compile files('libs/pass-v1.1.3.jar')
   // compile files('libs/sdk-v1.0.0.jar')
}

在此之前,我在我的Mac上编译了android资源4.4,并修改了OS系统中的一些文件,我认为是这个原因,但我忘记了哪个文件,有人遇到过这个问题

before this, I had compile the android resource 4.4 on my Mac, and modified some files in OS system, I think it is the reason is that, but I've forget which file, Someone encountered this problem yet

推荐答案

我解决了我的问题,将构建工具版本从21.1.2设置为22.0.1,希望可以帮助遇到相同情况的人.

I solve my issue, set the build tools version from 21.1.2 to 22.0.1, hope it can help who meet the same.

这篇关于aidl 缺少 android studio的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆