Ich habe gerade Android Studio installiert und aktualisiert die SDK. Ich habe ein neues Projekt erstellt, aber es scheint nicht zu kompilieren. Es gibt ein Problem mit gradle sync:Android Studio Startproblem auf Windows
Error:(29, 0) Could not find method android() for arguments [[email protected]] on root project 'MyApplication' of type org.gradle.api.Project.
Das ist mein Manifest-Datei:
<?xml version="1.0" encoding="utf-8"?>
<application
android:allowBackup="true"
android:icon="@mipmap/ic_launcher"
android:label="@string/app_name"
android:supportsRtl="true"
android:theme="@style/AppTheme" >
<activity android:name=".MainActivity" >
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
</application>
Einige unnütze Worte, weil zu viel Code
Dies ist die build.gradle Datei:
buildscript {
repositories {
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:2.2.3'
}
}
allprojects {
repositories {
jcenter()
}
}
task clean(type: Delete) {
delete rootProject.buildDir
}
subprojects {
ext {
compileSdkVersion = 22
buildToolsVersion = '25.0.1'
}
}
android{
compileSdkVersion 22
buildToolsVersion '25.0.1'
dexOptions {
incremental true
}
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_6
targetCompatibility JavaVersion.VERSION_1_6
}
}
dependencies {
compile files('app/libs/junit-4.12-JavaDoc.jar')
}
Bitte fügen Sie Ihre build.gradle Dateiinhalt. –