Android UI Fix

This commit is contained in:
2026-01-22 14:57:42 +01:00
parent 0334c5979d
commit 0946465c50
5 changed files with 288 additions and 355 deletions

View File

@@ -5,3 +5,4 @@
# Generated by Tauri
# will have schema files for capabilities auto-completion
/gen/schemas
/gen/android/

View File

@@ -14,23 +14,31 @@ val tauriProperties = Properties().apply {
}
android {
compileSdk = 36
compileSdk = 35 // Empfohlen: 35 (Android 15), da 36 noch im Preview-Status sein könnte
namespace = "malxte.de"
defaultConfig {
manifestPlaceholders["usesCleartextTraffic"] = "false"
applicationId = "malxte.de"
minSdk = 24
targetSdk = 36
// WICHTIG: Korrektur für dein Gerät (vorher 21)
minSdk = 24
targetSdk = 35
versionCode = tauriProperties.getProperty("tauri.android.versionCode", "1").toInt()
versionName = tauriProperties.getProperty("tauri.android.versionName", "1.0")
testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner"
}
buildTypes {
getByName("debug") {
manifestPlaceholders["usesCleartextTraffic"] = "true"
isDebuggable = true
isJniDebuggable = true
isMinifyEnabled = false
packaging { jniLibs.keepDebugSymbols.add("*/arm64-v8a/*.so")
packaging {
jniLibs.keepDebugSymbols.add("*/arm64-v8a/*.so")
jniLibs.keepDebugSymbols.add("*/armeabi-v7a/*.so")
jniLibs.keepDebugSymbols.add("*/x86/*.so")
jniLibs.keepDebugSymbols.add("*/x86_64/*.so")
@@ -45,26 +53,36 @@ android {
)
}
}
kotlinOptions {
jvmTarget = "1.8"
compileOptions {
sourceCompatibility = JavaVersion.VERSION_17
targetCompatibility = JavaVersion.VERSION_17
}
kotlinOptions {
jvmTarget = "17" // Angepasst auf Java 17 passend zu Gradle 8.14
}
buildFeatures {
buildConfig = true
}
}
rust {
// Pfad zu deinem src-tauri Verzeichnis (wo die Cargo.toml liegt)
rootDirRel = "../../../"
}
dependencies {
implementation("androidx.webkit:webkit:1.14.0")
implementation("androidx.appcompat:appcompat:1.7.1")
implementation("androidx.activity:activity-ktx:1.10.1")
implementation("androidx.webkit:webkit:1.12.0")
implementation("androidx.appcompat:appcompat:1.7.0")
implementation("androidx.activity:activity-ktx:1.9.3")
implementation("com.google.android.material:material:1.12.0")
testImplementation("junit:junit:4.13.2")
androidTestImplementation("androidx.test.ext:junit:1.1.4")
androidTestImplementation("androidx.test.espresso:espresso-core:3.5.0")
androidTestImplementation("androidx.test.ext:junit:1.2.1")
androidTestImplementation("androidx.test.espresso:espresso-core:3.6.1")
}
// Dies bindet die Tauri-Logik für Android ein (generierte Files)
apply(from = "tauri.build.gradle.kts")

View File

@@ -4,7 +4,9 @@ buildscript {
mavenCentral()
}
dependencies {
classpath("com.android.tools.build:gradle:8.11.0")
// Hier wird das Android-Plugin definiert
classpath("com.android.tools.build:gradle:8.2.1")
// Hier wird das Kotlin-Plugin definiert
classpath("org.jetbrains.kotlin:kotlin-gradle-plugin:1.9.25")
}
}
@@ -17,6 +19,5 @@ allprojects {
}
tasks.register("clean").configure {
delete("build")
}
delete(layout.buildDirectory)
}

View File

@@ -21,23 +21,7 @@ open class BuildTask : DefaultTask() {
runTauriCli(executable)
} catch (e: Exception) {
if (Os.isFamily(Os.FAMILY_WINDOWS)) {
// Try different Windows-specific extensions
val fallbacks = listOf(
"$executable.exe",
"$executable.cmd",
"$executable.bat",
)
var lastException: Exception = e
for (fallback in fallbacks) {
try {
runTauriCli(fallback)
return
} catch (fallbackException: Exception) {
lastException = fallbackException
}
}
throw lastException
runTauriCli("$executable.cmd")
} else {
throw e;
}