Me aparece este error:
Could not find method defaultConfig() for arguments [build_d9ihmwfxbjo807djs03q96gki$_run_closure1@2e2739b0] on root project 'Red Social TravelNet' of type org.gradle.api.Project.
No se como solucionarlo.
He probado a añadir líneas que otros usuarios han puesto en preguntas similares, pero no he conseguido nada, he intentado deshabilitar gradle y tampoco consigo solucionarlo. Esta es mi ultima opción o sino probare a reinstalar todo desde cero.
Este es mi build.gradle(:app)
android {
compileSdkVersion 32
buildToolsVersion "30.0.3"
defaultConfig {
applicationId "com.redsystem.redsocialtravelnet"
minSdkVersion 21
targetSdkVersion 32
versionCode 1
versionName "1.0"
testInstrumentationRunner "android.test.runner.AndroidJUnitRunner"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
}
}
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
}
buildFeatures {
viewBinding true
}
}
dependencies {
implementation fileTree(dir: "libs", include: ["*.jar"])
implementation 'androidx.appcompat:appcompat:1.4.2'
implementation 'androidx.constraintlayout:constraintlayout:2.1.4'
testImplementation 'junit:junit:4.12'
androidTestImplementation 'androidx.test.ext:junit:1.1.3'
androidTestImplementation 'androidx.test.espresso:espresso-core:3.4.0'
implementation 'com.airbnb.android:lottie:3.0.1'
implementation 'com.google.android/material:material:1.1.0'
implementation 'com.google.firebase:firebase-database:20.0.5'
implementation 'com.google.firebase:firebase-auth:21.0.5'
implementation 'com.squareup.picasso:picasso:2.71828'
implementation 'androidx.cardview:cardview:1.0.0'
implementation 'androidx.recyclerview:recyclerview:1.2.1'
implementation 'com.google.firebase:firebase-storage:20.0.1'
}
apply plugin: "com.android.application"
apply plugin: "com.google.gms.google-services"
Y también dejo el build.gradle(RedSocialTravelNet)
// Top-level build file where you can add configuration options common to all sub-projects/modules.
buildscript {
repositories {
google()
mavenCentral()
}
dependencies {
classpath 'com.android.tools.build:gradle:7.2.1'
classpath 'com.google.gms:google-services:4.3.10'
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
}
}
defaultConfig {
minSdkVersion 14
targetSdkVersion 32
multiDexEnabled = true
}
task clean(type: Delete) {
delete rootProject.buildDir
}
Muchas gracias.