的build.gradle解决不了,因为那symbol.Emulator将无法启动 [英] Build.gradle could not resolve symbol.Emulator won't start because of that
问题描述
摇篮'MyApplication的项目刷新失败:
构建脚本错误,不支持的摇篮DSL方法找到:'signingConfigs()'!
可能的原因可能是:搜索
- 您使用的摇篮版本,其中的方法是不存在
- 您没有申请摇篮插件,它提供了方法
- 或者有一个构建脚本错误
Gradle 'MyApplication' project refresh failed:
Build script error, unsupported Gradle DSL method found: 'signingConfigs()'!
Possible causes could be:
- you are using Gradle version where the method is absent
- you didn't apply Gradle plugin which provides the method
- or there is a mistake in a build script
这是我的事件日志是writing.Please帮助我!我该怎么办
这里是一个code:
This is what my event log is writing.Please help me!!What i should to do Here is a code:
buildscript {
repositories {
mavenCentral()
}
dependencies {
classpath 'com.android.tools.build:gradle:0.7.+'
}
}
allprojects {
repositories {
mavenCentral()
}
}
apply plugin: "android"
android {
compileSdkVersion 19
buildToolsVersion "19.0.0"
}
signingConfigs {
release {
storeFile file('android.keystore')
storePassword "pwd"
keyAlias "alias"
keyPassword "pwd"
}
}
buildTypes {
release {
signingConfig signingConfigs.release
}
}
P.S。我申请code启动后,应用插件:'机器人'。所以,当我用鼠标聚焦到这个code它指出无法解析符号signingConfig
P.S. After i applied code starting from "apply plugin:'android'".So,when i focus with mouse to this code it states"Could not resolve symbol "signingConfig""
推荐答案
错误消息主要体现在缺少......的意思,它在寻找某一地点的Android项目,它不是找到一个。在这种情况下,它是顶级构建文件,这就是你已经张贴在你的问题一:现在有一个应用插件:机器人
语句,它希望看到一个Android项目那里。但是,没有任何项目存在;这是你的应用模块,这是一个目录水平低里面。
The error message "Main manifest missing from..." means that it's looking for an Android project in a given location and it's not finding one. In this case, it's the top-level build file, which is the one you've posted in your question: It now has an apply plugin: "android"
statement, and it's expecting to see an Android project there. But there's no project there; it's inside your application module, which is a directory level lower.
这文件不是一个地方签约信息应该去;它属于您的应用程序模块的构建文件,而不是。恢复顶层构建文件到正常的状态:
This file isn't the one where the signing information should go; it belongs in your app module's build file instead. Restore your top-level build file to its normal state:
// 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.7.+'
}
}
allprojects {
repositories {
mavenCentral()
}
}
和把你的应用程序的的机器人
块内的签约信息的build.gradle 文件:
And put the signing information inside the android
block of your app's build.gradle file:
apply plugin: 'android'
android {
...
signingConfigs {
release {
storeFile file('android.keystore')
storePassword "pwd"
keyAlias "alias"
keyPassword "pwd"
}
}
buildTypes {
release {
signingConfig signingConfigs.release
}
}
}
更重要的是,考虑升级至Android工作室的更高版本。您正在运行一个是很老。
What's more, consider upgrading to a later version of Android Studio. The one you're running is quite old.
这篇关于的build.gradle解决不了,因为那symbol.Emulator将无法启动的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!