-
-
Notifications
You must be signed in to change notification settings - Fork 2.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[bug] cargo tauri android dev -> cannot locate symbol __extenddftf2 #7413
Comments
The same problem happened when I used crate |
yeah think I'll try removing the server code altogether and see if it works then. |
Ok I commented out the server dependent parts from the code, recompiled and it starts up without crashing. So that should rule out something weird in my setup that prevents any tauri android app from working. End of the build log from this run (cargo tauri android dev)::
For reference, this is the "Finished dev" bit from the build including my server (with sqlite statically linked and etc).
And here is the same part without the server linked in. Identical list of libs. But perhaps there is another dependency that is not reported here.
|
Running with @meowtec 's idea, I put rusqlite in as a dependency (but 'bundled' so should statically link) and got the error again. diff vs the version that doesn't crash. tldr added rusqlte and called a couple of its functions
pretty much same crash with this minimal rusqlite dependency
|
So in rusqlites libsqlite3-sys/build.rs there's an env variable, CARGO_CFG_TARGET_OS which can be set to "android". So that's promising. But doing a cargo clean and then a build like this:
Still has the same crash behavior. |
FWIW, a rusqlite maintainer on their discord says rusqlite is in firefox for android, and works there. And that CARGO_CFG_TARGET_OS should be set automatically by cargo. |
Digging in a bit more;
And this symbol is part of libgcc. So presumably there's a libgcc binary on android that contains this function? Does android need to be told somehow that libgcc is needed for libapp_lib.so? |
After doing a bit of reading today, I found out this problem supposedly occurs on x86-64, but not x86. Fired up an x86 android vm and voila, it runs and doesn't crash immediately like before. Hopefully the same will be true of arm targets. This comment, when translated from the chinese, indicates success with clang compilation. Its maybe possible an update in the android NDK would fix things, or reverting to an earlier version that still has libgcc in it would help. There's this mozilla issue. They had a similar approach to our friend above, linking libclang_rt.builtins-x86_64-android for the x86-64 target. |
Coming back to this to report success with arm builds too, at least it works with my oneplus 6. |
Waiting a solution for x86_64 ABI😫 |
It works for me |
I'll close this one since it's not under our control, it's a rusqlite thing. See |
But how can we use shared libraries in Android when static linking is not possible? Update: I needed to create absolute symlinks instead of relative. ':app:mergeArm64DebugJniLibFolders'.
> Cannot invoke "com.android.ide.common.resources.DataFile.getItems()" because "dataFile" is null |
Describe the bug
The error:
`cargo tauri android dev` succeeds (with a lot of rust warnings, sorry):
On the android VM, the app appears and immediately disappears again. But I don't get any crash messages.
Then, if I find the app in the android menu and start it, I get this
And in the console:
my repo at the point where this error occurred.
Reproduction
Expected behavior
successful start, or at least no crash
Platform and versions
Stack trace
The text was updated successfully, but these errors were encountered: