Forum für diejenigen, die für Android programmieren
Anonymous
Gradle Sync -Problem mit Android Studio Meerkat | 2024.3.1
Post
by Anonymous » 10 Apr 2025, 12:48
Gradle inkompatibel. Das
Problem ist nicht erstellt. />
settings.gradle
Code: Select all
pluginManagement {
def flutterSdkPath = {
def properties = new Properties()
file("local.properties").withInputStream { properties.load(it) }
def flutterSdkPath = properties.getProperty("flutter.sdk")
assert flutterSdkPath != null, "flutter.sdk not set in local.properties"
return flutterSdkPath
}()
includeBuild("$flutterSdkPath/packages/flutter_tools/gradle")
repositories {
google()
mavenCentral()
gradlePluginPortal()
}
}
plugins {
// id "dev.flutter.flutter-plugin-loader" version "1.0.0"
id 'com.android.application' version '8.1.4' apply false
id 'com.android.library' version '8.1.4' apply false
id 'org.jetbrains.kotlin.android' version '2.0.21' apply false
id "com.google.gms.google-services" version "4.4.2" apply false
id "com.google.firebase.crashlytics" version "3.0.3" apply false
}
include ":app"
< /code>
Gradle-Wrapper.properties
#Fri Jun 23 08:50:38 CEST 2017
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-8.10.2-all.zip
< /code>
Build.gradle
buildscript {
repositories {
google()
mavenCentral()
}
}
allprojects {
repositories {
google()
mavenCentral()
}
}
rootProject.buildDir = '../build'
subprojects {
project.buildDir = "${rootProject.buildDir}/${project.name}"
}
subprojects {
project.evaluationDependsOn(':app')
}
subprojects {
project.configurations.all {
resolutionStrategy.eachDependency { details ->
if (details.requested.group == 'com.android.support'
&& !details.requested.name.contains('multidex') ) {
details.useVersion "27.1.1"
}
}
}
}
tasks.register("clean", Delete) {
delete rootProject.buildDir
}
app/build.gradle
Code: Select all
plugins {
id "com.android.application"
id "dev.flutter.flutter-gradle-plugin"
id "org.jetbrains.kotlin.android"
id "com.google.gms.google-services"
id "com.google.firebase.crashlytics"
}
def localProperties = new Properties()
def localPropertiesFile = rootProject.file('local.properties')
if (localPropertiesFile.exists()) {
localPropertiesFile.withReader('UTF-8') { reader ->
localProperties.load(reader)
}
}
def flutterVersionCode = localProperties.getProperty('flutter.versionCode')
if (flutterVersionCode == null) {
flutterVersionCode = '1'
}
def flutterVersionName = localProperties.getProperty('flutter.versionName')
if (flutterVersionName == null) {
flutterVersionName = '1.0'
}
def keystoreProperties = new Properties()
def keystorePropertiesFile = rootProject.file('key.properties')
if (keystorePropertiesFile.exists()) {
keystoreProperties.load(new FileInputStream(keystorePropertiesFile))
}
android {
namespace 'com.abc'
compileSdkVersion 35
compileOptions {
sourceCompatibility JavaVersion.VERSION_17
targetCompatibility JavaVersion.VERSION_17
coreLibraryDesugaringEnabled true
}
kotlinOptions {
jvmTarget = "17" // Make sure it's consistent with Java version
}
kotlin {
jvmToolchain(17)
}
sourceSets {
main.java.srcDirs += 'src/main/kotlin'
}
lintOptions {
disable 'InvalidPackage'
}
defaultConfig {
// TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html).
multiDexEnabled true
applicationId "com.abc"
buildToolsVersion = "33.0.1"
minSdkVersion 24
// minSdkVersion 21
targetSdkVersion 35
versionCode flutterVersionCode.toInteger()
versionName flutterVersionName
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
ndk {
abiFilters 'x86', 'x86_64', 'armeabi', 'armeabi-v7a', 'mips', 'mips64', 'arm64-v8a'
}
}
signingConfigs {
release {
keyAlias keystoreProperties['keyAlias']
keyPassword keystoreProperties['keyPassword']
storeFile keystoreProperties['storeFile'] ? file(keystoreProperties['storeFile']) : null
storePassword keystoreProperties['storePassword']
}
}
buildTypes {
release {
signingConfig signingConfigs.release
minifyEnabled true
// isShrinkResources = true
//useProguard true
1744282126
Anonymous
Gradle inkompatibel. Das [url=viewtopic.php?t=20324]Problem[/url] ist nicht erstellt. /> settings.gradle [code]pluginManagement { def flutterSdkPath = { def properties = new Properties() file("local.properties").withInputStream { properties.load(it) } def flutterSdkPath = properties.getProperty("flutter.sdk") assert flutterSdkPath != null, "flutter.sdk not set in local.properties" return flutterSdkPath }() includeBuild("$flutterSdkPath/packages/flutter_tools/gradle") repositories { google() mavenCentral() gradlePluginPortal() } } plugins { // id "dev.flutter.flutter-plugin-loader" version "1.0.0" id 'com.android.application' version '8.1.4' apply false id 'com.android.library' version '8.1.4' apply false id 'org.jetbrains.kotlin.android' version '2.0.21' apply false id "com.google.gms.google-services" version "4.4.2" apply false id "com.google.firebase.crashlytics" version "3.0.3" apply false } include ":app" < /code> Gradle-Wrapper.properties #Fri Jun 23 08:50:38 CEST 2017 distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists distributionUrl=https\://services.gradle.org/distributions/gradle-8.10.2-all.zip < /code> Build.gradle buildscript { repositories { google() mavenCentral() } } allprojects { repositories { google() mavenCentral() } } rootProject.buildDir = '../build' subprojects { project.buildDir = "${rootProject.buildDir}/${project.name}" } subprojects { project.evaluationDependsOn(':app') } subprojects { project.configurations.all { resolutionStrategy.eachDependency { details -> if (details.requested.group == 'com.android.support' && !details.requested.name.contains('multidex') ) { details.useVersion "27.1.1" } } } } tasks.register("clean", Delete) { delete rootProject.buildDir } [/code] app/build.gradle [code]plugins { id "com.android.application" id "dev.flutter.flutter-gradle-plugin" id "org.jetbrains.kotlin.android" id "com.google.gms.google-services" id "com.google.firebase.crashlytics" } def localProperties = new Properties() def localPropertiesFile = rootProject.file('local.properties') if (localPropertiesFile.exists()) { localPropertiesFile.withReader('UTF-8') { reader -> localProperties.load(reader) } } def flutterVersionCode = localProperties.getProperty('flutter.versionCode') if (flutterVersionCode == null) { flutterVersionCode = '1' } def flutterVersionName = localProperties.getProperty('flutter.versionName') if (flutterVersionName == null) { flutterVersionName = '1.0' } def keystoreProperties = new Properties() def keystorePropertiesFile = rootProject.file('key.properties') if (keystorePropertiesFile.exists()) { keystoreProperties.load(new FileInputStream(keystorePropertiesFile)) } android { namespace 'com.abc' compileSdkVersion 35 compileOptions { sourceCompatibility JavaVersion.VERSION_17 targetCompatibility JavaVersion.VERSION_17 coreLibraryDesugaringEnabled true } kotlinOptions { jvmTarget = "17" // Make sure it's consistent with Java version } kotlin { jvmToolchain(17) } sourceSets { main.java.srcDirs += 'src/main/kotlin' } lintOptions { disable 'InvalidPackage' } defaultConfig { // TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html). multiDexEnabled true applicationId "com.abc" buildToolsVersion = "33.0.1" minSdkVersion 24 // minSdkVersion 21 targetSdkVersion 35 versionCode flutterVersionCode.toInteger() versionName flutterVersionName testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner" ndk { abiFilters 'x86', 'x86_64', 'armeabi', 'armeabi-v7a', 'mips', 'mips64', 'arm64-v8a' } } signingConfigs { release { keyAlias keystoreProperties['keyAlias'] keyPassword keystoreProperties['keyPassword'] storeFile keystoreProperties['storeFile'] ? file(keystoreProperties['storeFile']) : null storePassword keystoreProperties['storePassword'] } } buildTypes { release { signingConfig signingConfigs.release minifyEnabled true // isShrinkResources = true //useProguard true
0 Replies
8 Views
Last post by Anonymous
11 Apr 2025, 13:03
0 Replies
12 Views
Last post by Anonymous
11 Apr 2025, 13:03
0 Replies
11 Views
Last post by Guest
08 Feb 2025, 04:58
0 Replies
8 Views
Last post by Guest
11 Jan 2025, 06:30
Gradle Sync -Fehler: Bitte initialisieren
by
Anonymous »
13 Apr 2025, 22:23 » in
Android
Ich versuche, ein benutzerdefiniertes Gradle -Plugin für mein App -Modul in einem Kotlin -Multiplattform -Projekt zu implementieren, aber ich habe diesen Fehler aufgenommen, wenn ich mein...
0 Replies
10 Views
Last post by Anonymous
13 Apr 2025, 22:23