use*_*278 42 android compilation aidl
Environment:
Mac OS 10.10.3
Android studio:1.2.11
grandle:2.2.1
Run Code Online (Sandbox Code Playgroud)
日志:
Information:Gradle tasks [:generateDebugSources, :generateDebugTestSources]
:preBuild
:preDebugBuild
:checkDebugManifest
:prepareDebugDependencies
:compileDebugAidl FAILED
Error:Execution failed for task ':compileDebugAidl'.
> aidl is missing
Run Code Online (Sandbox Code Playgroud)
// 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')
}
Run Code Online (Sandbox Code Playgroud)
在此之前,我已经在我的Mac上编译了android资源4.4,并修改了OS系统中的一些文件,我认为原因是这样,但是我忘记了哪个文件,有人遇到过这个问题呢
Jor*_*ego 70
在我的情况下,我使用Android Studio 1.2.1.1下载了Android M和Android 5.1.1的第22版,但是当我尝试执行Hello World时,同样的错误显示我
因此,解决方案是在应用程序中右键单击,如下图所示,然后选择"打开模块设置".....

那你有2个选择.我用最后一个版本改变了两个版本.
将SDK版本编译为API 21 Lollipop

和构建工具版本到21.1.2

最后清理项目并构建
更新这里是我的build.gradle与比较的build.gradle.
apply plugin: 'com.android.application'
android {
compileSdkVersion 21
buildToolsVersion '21.1.2'
defaultConfig {
applicationId "com.android.bmi"
minSdkVersion 15
targetSdkVersion 22
versionCode 1
versionName "1.0"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
}
dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
compile 'com.android.support:appcompat-v7:22.2.0'
}
Run Code Online (Sandbox Code Playgroud)
更新
要获取Android Studio 1.3,请按照以下步骤操作
然后你会有类似的东西将你的Android Studio更新为1.3,你可以测试Android M

Ser*_*rea 15
对于那些你仍然得到"aidl is missing"的错误:
对我来说,设置构建工具版本根本不是解决方案.
在您的顶级build.gradle文件中,尝试设置:
classpath 'com.android.tools.build:gradle:1.3.0'
classpath 'com.google.gms:google-services:1.3.1'
然后使用buildToolsVersion '23.0.1'.
它对我来说很完美.我希望它能帮助别人.
在Jorge的帖子截图之后,你要做的就是确保你没有选择Build Tools Version 23.0.0 rc1.我还没有在IDE或者谷歌的bug追踪器上完全调查过那个版本,但我所要做的就是选择以前的工具版本,并且在完成干净的构建后它运行得很好.我尝试了各种SDK min版本.
我正在运行OSX 10.10.3,在Oracle JDK 1.8.0_45-b14上运行Android Studio 1.2.1.1
更新解决方案 此问题在本质上与任务执行失败相同 ':app:compileDebugAidl':缺少aidl.请阅读我的帖子,了解正确的解决方案,并参考解决方案的起源.
| 归档时间: |
|
| 查看次数: |
58597 次 |
| 最近记录: |