도와 줄 프로젝트를 받았지만 작동하지 못하고 저에게 준 사람은 저처럼 난처한 사람입니다. Google은 Android Studio 2.1.2를 사용하여 Google Glass 용 Android 소프트웨어를 제작하기 위해 노력하고 있습니다. 또한 SDK와 같은 것을 설정했습니다.Google Glass, Gradle DSL 방법을 찾을 수 없음 : 'android()'
buildscript {
repositories {
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:2.1.2'
}
}
allprojects {
repositories {
jcenter()
}
}
android {
compileSdkVersion 'Google Inc.:Glass Development Kit Preview:19'
buildToolsVersion '23.0.1'
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_7
targetCompatibility JavaVersion.VERSION_1_7
}
}
dependencies {
}
이것이 기본 build.gradle 파일입니다. 그런 다음, app-folder에서 중요하다면이 파일이 있습니다. 또한 build.gradle.
apply plugin: 'com.android.application'
repositories {
jcenter()
}
android {
compileSdkVersion 'Google Inc.:Glass Development Kit Preview:19'
buildToolsVersion '23.0.1'
final def config = defaultConfig {
unimportant stuff
}
config
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_7
targetCompatibility JavaVersion.VERSION_1_7
}
buildTypes {
release {
things
}
}
dexOptions {
hopefully unimportant
}
productFlavors {
}
}
dependencies {
a considerable amount
}
이제 "Gradle DSL method not found : android()"문제가 발생합니다. 그것에 대해 묻는 여기에 더 많은 질문이 있습니다. 그래서 대답하는 사람들의 조언에 따라, 나는 톱 그레고리에서 안드로이드와 의존성을 삭제하려고 시도했다. 나는 다음과 같은 오류로 끝났다. "SDK '를 설치하지 못했습니다'모듈 '응용 프로그램': 플랫폼 'Google Inc. : 유리 개발 키트 미리보기 : 19'을 찾을 수 없습니다." 이것은 다른 모든 것들에도 불구하고 이것이 설정됩니다.
이제 코드를 얻은 사람들처럼 코드가 분명히 작동합니다. 제 무언가가 잘못되었습니다. 나는 인터넷의 선량한 사람들에게 무엇이 잘못 될지를 묻고있다.
"Gradle DSL method not found : 'hasPlugin()'명령문을 만듭니다." – PlatinumSkink
'plugins.hasPlugin (...) '으로 변경되었습니다. –
흠. 이제 오류 : Module 'app': 플랫폼 'Google Inc. : Glass Development Kit Preview : 19'을 찾을 수 없습니다. "라는 메시지가 나에게 별개의 문제처럼 들립니다. 그러나 그것은 안드로이드가 컴파일 한 것들 중 하나였습니다. 또한 루트 프로젝트에서 안드로이드와 의존성을 삭제했을 때와 같은 문제입니다. ... 어, 이건 문제가있어. 이것은 hasPlugin if 문을 전달하지 않는다고 가정합니다. 어떻게 수정해야합니까? 그냥 "apply plugin : com.android.application '"을 포함 시키면 이전에 시도했을 때 작동하지 않았습니다. – PlatinumSkink