【发布时间】:2015-02-28 09:36:42
【问题描述】:
我正在尝试在 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"
}
settings.gradle:
include ':app'
local.properties:
sdk.dir=C\:\\Users\\KJA\\AppData\\Local\\Android\\sdk
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 configure your build environment visit
# http://www.gradle.org/docs/current/userguide/build_environment.html
# Specifies the JVM arguments used for the daemon process.
# The setting is particularly useful for tweaking memory settings.
# Default value: -Xmx10248m -XX:MaxPermSize=256m
# org.gradle.jvmargs=-Xmx2048m -XX:MaxPermSize=512m -XX:+HeapDumpOnOutOfMemoryError -Dfile.encoding=UTF-8
# When configured, Gradle will run in incubating parallel mode.
# This option should only be used with decoupled projects. More details, visit
# http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects
# org.gradle.parallel=true
【问题讨论】:
-
我猜你刚刚开始这个项目。为什么不 File -> New Project 让它为你设置 Gradle。另外,将你的 gradle 插件升级到 1.0。
-
这是一个来自网上的项目,我导入了它
-
请看我的回答。您只需要升级项目。
标签: android android-gradle-plugin dsl