내 Android 스튜디오 프로젝트에서 등급 동기화를 시도하고 있는데 제목에이 오류가 계속 표시됩니다. 내 build.gradle 파일은
// Top-level build file where you can add configuration options common to all sub-projects/modules.
buildscript {
repositories {
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:2.2.1'
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
}
}
allprojects {
repositories {
jcenter()
}
}
task clean(type: Delete) {
delete rootProject.buildDir
}
android {
compileSdkVersion 24
buildToolsVersion '24.0.0'
}
dependencies {
}
내 오류 메시지는
Gradle sync failed: Could not find method android() for arguments [build_aiwlctiq29euo9devcma4v4r7$_run_closure3@22efc0bc] on root project 'MyRadio
온라인에서 여러 솔루션을 시도했지만 아무것도 작동하지 않는 것 같습니다. 이것은 무엇을 의미합니까? 어떤 도움을 주시면 감사하겠습니다.
잘못된 build.gradle 파일을 사용하고 있습니다.
최상위 파일에서 Android 블록을 정의 할 수 없습니다.
이 부분을 module / build.Gradle 파일로 옮기십시오.
android {
compileSdkVersion 17
buildToolsVersion '23.0.0'
}
dependencies {
compile files('app/libs/junit-4.12-JavaDoc.jar')
}
apply plugin: 'maven'
이 기사는 인터넷에서 수집됩니다. 재 인쇄 할 때 출처를 알려주십시오.
침해가 발생한 경우 연락 주시기 바랍니다[email protected] 삭제
몇 마디 만하겠습니다