Build.gradle(:app): < /p>
Code: Select all
plugins {
id 'com.android.application'
id 'org.jetbrains.kotlin.android'
}
android {
namespace 'com.example.guardian'
compileSdk 33
defaultConfig {
applicationId "com.example.guardian"
minSdk 24
targetSdk 33
versionCode 1
versionName "1.0"
testInstrumentationRunner "androidx.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
}
kotlinOptions {
jvmTarget = '1.8'
}
}
dependencies {
implementation 'com.google.code.gson:gson:2.10.1'
implementation 'androidx.core:core-ktx:1.8.0'
implementation 'androidx.appcompat:appcompat:1.6.1'
implementation 'com.google.android.material:material:1.5.0'
implementation 'androidx.constraintlayout:constraintlayout:2.1.4'
testImplementation 'junit:junit:4.13.2'
androidTestImplementation 'androidx.test.ext:junit:1.1.5'
androidTestImplementation 'androidx.test.espresso:espresso-core:3.5.1'
}
< /code>
settings.gradle: < /p>
pluginManagement {
repositories {
google()
mavenCentral()
gradlePluginPortal()
}
}
dependencyResolutionManagement {
repositoriesMode.set(RepositoriesMode.FAIL_ON_PROJECT_REPOS)
repositories {
google()
mavenCentral()
}
}
rootProject.name = "Guardian"
include ':app'
< /code>
Wenn ich das Projekt erstelle, stehe ich diesem Fehler vor: < /p>
Execution failed for task ':app:processDebugResources'.
> Could not isolate parameters com.android.build.gradle.internal.dependency.AarResourcesCompilerTransform$Parameters_Decorated@1731b3c5 of artifact transform AarResourcesCompilerTransform
> Could not isolate value com.android.build.gradle.internal.dependency.AarResourcesCompilerTransform$Parameters_Decorated@1731b3c5 of type AarResourcesCompilerTransform.Parameters
> Could not resolve all files for configuration ':app:detachedConfiguration2'.
> Failed to transform aapt2-8.0.2-9289358-windows.jar (com.android.tools.build:aapt2:8.0.2-9289358) to match attributes {artifactType=_internal-android-aapt2-binary, org.gradle.libraryelements=jar, org.gradle.status=release, org.gradle.usage=java-runtime}.
> Could not find aapt2-8.0.2-9289358-windows.jar (com.android.tools.build:aapt2:8.0.2-9289358).
Searched in the following locations:
https://dl.google.com/dl/android/maven2/com/android/tools/build/aapt2/8.0.2-9289358/aapt2-8.0.2-9289358-windows.jar
Possible solution:
- Declare repository providing the artifact, see the documentation at https://docs.gradle.org/current/userguide/declaring_repositories.html
< /code>
Bevor ich die Methoden erläuterte, die das [url=viewtopic.php?t=20324]Problem[/url] nicht gelöst haben, sollte ich sagen, dass ich den betreffenden Link öffnen kann (dl.google). bedeutet [b] Ich habe keine Probleme, mit Googles Server zu verbinden. [/b]. "-no-version-vektoren"}
[*] Herunterladen der entsprechenden Datei (aAPT2-8.0.2-9289358-windows.jar) und platziert in die ~/.gradle/caches/modules-2/files-2.1/com.android.tools.build/aapt2/ Verzeichnis. DistributionURL = https \: //services.gradle.org/distributions/gradle -7.6.1-Bin.zip
[*] Reinigen des Projekts und Wiederaufbauung des Projekts und Wiederaufbau. />changing targetSdk and compileSdk version
[*]adding the relevant file (aapt2-8.0.2-9289358-windows.jar) to libs directory and implement that locally inside dependencies / build.gradle : implementation Dateien ('libs/aapt2-8.0.2-9289358-windows.jar')