相关疑难解决方法(0)

未找到Android Studio Gradle DSL方法:'android()' - 错误(17,0)

我试图在Android Studio中运行我的项目,但错误如下所示:

在此输入图像描述

我已经跟踪了许多消息来源,只是为了让它运行并在这里结束,但不知道还能做什么.

如何配置此项目以运行?

的build.gradle:

    // Top-level build file where you can add configuration options common to all sub-projects/modules.
    buildscript {
        repositories {
            mavenCentral()
        }
        dependencies {
            classpath 'com.android.tools.build:gradle:0.9.+'
        }
    }

    allprojects {
        repositories {
            mavenCentral()
        }
    }

    android {
        compileSdkVersion 19
        buildToolsVersion "19.1" 
    }
Run Code Online (Sandbox Code Playgroud)

settings.gradle:

include ':app'
Run Code Online (Sandbox Code Playgroud)

local.properties:

sdk.dir=C\:\\Users\\KJA\\AppData\\Local\\Android\\sdk
Run Code Online (Sandbox Code Playgroud)

gradle.propertes:

# IDE (e.g. Android Studio) users:
# Settings specified in this file will override any Gradle settings
# configured through the IDE.

# For more details on how to …
Run Code Online (Sandbox Code Playgroud)

dsl android android-gradle-plugin

80
推荐指数
5
解决办法
14万
查看次数

aidl缺少android工作室

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 = …
Run Code Online (Sandbox Code Playgroud)

android compilation aidl

42
推荐指数
4
解决办法
6万
查看次数

清洁空白Android应用程序无法构建 - "未能找到构建工具修订版23.0.0 rc1"

Android新手,尝试构建一个干净的"空白应用"Android项目.

我得到以下错误,这是令人困惑的,因为我使用SDK管理器安装了第24版,不知道为什么它寻找第23版.它没有给我任何类型的行号,但任何建议?谢谢.

Configuration on demand is an incubating feature.
:app:preBuild UP-TO-DATE
:app:preDebugBuild UP-TO-DATE
:app:checkDebugManifest
:app:preReleaseBuild UP-TO-DATE
:app:prepareComAndroidSupportAppcompatV72220Library UP-TO-DATE
:app:prepareComAndroidSupportSupportV42220Library UP-TO-DATE
:app:prepareDebugDependencies
:app:compileDebugAidl FAILED

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':app:compileDebugAidl'.
> aidl is missing

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

BUILD FAILED

Total time: 2.243 secs
Executing tasks: [:app:assembleDebug]

Configuration on demand is an incubating feature. …
Run Code Online (Sandbox Code Playgroud)

android build-tools android-sdk-tools

8
推荐指数
1
解决办法
3万
查看次数

错误:找不到Build Tools修订版23.0.0 rc2 - Android Studio

我一直在使用Android Studio在我的MacBook pro中开发我的项目.我将我的项目存储在GitHub仓库中.但现在我正在使用Windows笔记本电脑,所以我克隆了我的项目并尝试在Android Studio中运行,我收到以下错误:

Error:failed to find Build Tools revision 23.0.0 rc2
Install Build Tools 23.0.0 rc2 and sync project
Run Code Online (Sandbox Code Playgroud)

我点击了

Install Build Tools 23.0.0 rc2 and sync project” but I’m getting another error:
Loading SDK information...
Run Code Online (Sandbox Code Playgroud)

忽略未知的包过滤器'build-tools-23.0.0-preview'警告:包过滤器删除了所有包.没有什么可以安装的.请考虑在没有包过滤器的情况下再次尝试更新.

安装失败.请检查您的网络连接,然后重试.您可以继续创建项目,但如果没有缺少的组件,它将无法正确编译.(我已经检查了我的网络连接,我使用有线连接连接到互联网).

当我在Macbook中克隆我的项目时,一切正常,所以我不确定为什么它不适用于Windows.

这是截图:在此输入图像描述

android android-studio

4
推荐指数
2
解决办法
1万
查看次数