You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
dx build --platform android compiles but does not bundle.
59.314s INFO Bundling app...
59.323s ERROR err=Other(Failed to write main executable
Caused by:
0: I/O Error: No such file or directory (os error 2)
1: No such file or directory (os error 2))
59.326s ERROR err=Other(Failed to write main executable
Caused by:
0: I/O Error: No such file or directory (os error 2)
1: No such file or directory (os error 2))
use dioxus::prelude::*;fnminimal() -> Element{rsx!{"hello world"}}fnmain(){
dioxus::launch(minimal);}
shell.nix:
{# pkgs ? import <nixpkgs> { },}:
letpkgs=import(fetchTarball("channel:nixpkgs-unstable")){};overrides=(builtins.fromTOML(builtins.readFile./rust-toolchain.toml));buildToolsVersion="30.0.3";androidComposition=pkgs.androidenv.composeAndroidPackages{cmdLineToolsVersion="8.0";toolsVersion="26.1.1";platformToolsVersion="35.0.2";buildToolsVersions=[buildToolsVersion];includeEmulator=true;emulatorVersion="35.4.6";platformVersions=["28""29""30"];includeSources=false;includeSystemImages=false;systemImageTypes=["google_apis_playstore"];abiVersions=["armeabi-v7a""arm64-v8a"];cmakeVersions=["3.10.2"];includeNDK=true;ndkVersions=["22.0.7026061"];useGoogleAPIs=false;useGoogleTVAddOns=false;includeExtras=["extras;google;gcm"];};ANDROID_HOME="${androidComposition.androidsdk}/libexec/android-sdk";inpkgs.callPackage({atkmm,cairo,gcc,gdk-pixbuf,glib,gtk3,mkShell,openssl,pango,pkg-config,rustup,rustPlatform,stdenv,webkitgtk_4_1,# for javascriptcoregtk-rs-sysxdotool,# for libxdo}:
mkShell{strictDeps=true;nativeBuildInputs=[gccopensslpkg-configrustuprustPlatform.bindgenHook];buildInputs=[atkmmcairogdk-pixbufglibgtk3pangowebkitgtk_4_1xdotool];GDK_BACKEND="x11";# NVIDIA might disagree otherwise.PKG_CONFIG_PATH="${pkgs.openssl.dev}/lib/pkgconfig";RUSTC_VERSION=overrides.toolchain.channel;WEBKIT_DISABLE_DMABUF_RENDERER=1;# Again NVIDIA things.ANDROID_HOME=ANDROID_HOME;ANDROID_NDK_ROOT="${ANDROID_HOME}/ndk-bundle";NDK_HOME="${ANDROID_HOME}/ndk/22.0.7026061";# Use the same buildToolsVersion hereGRADLE_OPTS="-Dorg.gradle.project.android.aapt2FromMavenOverride=${ANDROID_HOME}/build-tools/${buildToolsVersion}/aapt2";# https://github.com/rust-lang/rust-bindgen#environment-variablesshellHook='' export PATH="''${CARGO_HOME:-~/.cargo}/bin":"$PATH" export PATH="''${RUSTUP_HOME:-~/.rustup}/toolchains/$RUSTC_VERSION-${stdenv.hostPlatform.rust.rustcTarget}/bin":"$PATH" '';}){}
Note here that I did not set JAVA_HOME. I'm not sure what to set it to and I do not know whether that is the source of my trouble.
This shell.nix has seen various iterations. One where I use https://tadfisher.github.io/android-nixpkgs instead of pkgs.androidenv and one where I tried to just use android-studio, but could not get dioxus to recognize the project (but that might just be a me-problem).
Problem
dx build --platform android
compiles but does not bundle.Steps To Reproduce
Cargo.toml:
src/main.rs:
shell.nix:
Note here that I did not set
JAVA_HOME
. I'm not sure what to set it to and I do not know whether that is the source of my trouble.This
shell.nix
has seen various iterations. One where I use https://tadfisher.github.io/android-nixpkgs instead ofpkgs.androidenv
and one where I tried to just use android-studio, but could not get dioxus to recognize the project (but that might just be a me-problem).Finally, the commands I then run is
Expected behavior
No failure, but a bundled
.apk
(I think, I've never gotten it to bundle)Environment:
Questionnaire
I'm interested in fixing this myself but don't know where to start.
The text was updated successfully, but these errors were encountered: