Open StormLight14 opened 1 year ago
Could you show the contents of src-tauri\gen\android\buildSrc\src\main\java\com\tauri\tauri_app_mobile\kotlin\BuildTask.kt
Yep, sorry for the late reply!
import java.io.File
import org.apache.tools.ant.taskdefs.condition.Os
import org.gradle.api.DefaultTask
import org.gradle.api.GradleException
import org.gradle.api.logging.LogLevel
import org.gradle.api.tasks.Input
import org.gradle.api.tasks.TaskAction
open class BuildTask : DefaultTask() {
@Input
var rootDirRel: String? = null
@Input
var target: String? = null
@Input
var release: Boolean? = null
@TaskAction
fun assemble() {
val executable = """/home/storm/.cargo/bin/cargo-tauri""";
try {
runTauriCli(executable)
} catch (e: Exception) {
if (Os.isFamily(Os.FAMILY_WINDOWS)) {
runTauriCli("$executable.cmd")
} else {
throw e;
}
}
}
fun runTauriCli(executable: String) {
val rootDirRel = rootDirRel ?: throw GradleException("rootDirRel cannot be null")
val target = target ?: throw GradleException("target cannot be null")
val release = release ?: throw GradleException("release cannot be null")
val args = listOf("tauri", "/home/storm/Documents/Rust_Projects/base64-converter/android", "init", "android-studio-script");
project.exec {
workingDir(File(project.projectDir, rootDirRel))
executable(executable)
args(args)
if (project.logger.isEnabled(LogLevel.DEBUG)) {
args("-vv")
} else if (project.logger.isEnabled(LogLevel.INFO)) {
args("-v")
}
if (release) {
args("--release")
}
args(listOf("--target", target))
}.assertNormalExitValue()
}
}
that's really weird, could you try removing src-tauri/gen
and run cargo android init
again and see if it is fixed? Otherwise, I will need some steps to reproduce
Before that, I have one suspicion of what it could be. I had an issue where the file x86_64-linux-android-ranlib
couldn't be found, and when i asked elsewhere someone said llvm-ranlib
which was in the path ~/Android/Sdk/ndk/25.0.8775105/toolchains/llvm/prebuilt/linux-x86_64/bin/
is the same thing and just to rename it to be the name of the file, and I don't know if this is actually true. Renaming it did make the error a lot smaller though.
I'd recommend creating a new project using create-tauri-app
and see if the issue persists, if it does, let me know the steps you made
Describe the bug
I run
cargo tauri android dev
, and get this errorI saw the shared lib stuff and after locating the files it says it requires, this directory has them:
/home/storm/Android/Sdk/ndk/25.2.9519653/toolchains/llvm/prebuilt/linux-x86_64/sysroot/usr/lib/x86_64-linux-android/33/
I tried some stuff but it never changed, im not sure if it's an error at all or if something else is the issue since it just says "Info"Reproduction
No response
Expected behavior
No errors, app opens in emulator.
Platform and versions
Stack trace
No response
Additional context
idk if I did this correctly, i just got told to put this in issues so sorry if it's wrong