#Tauri Mobile not compiling

11 messages · Page 1 of 1 (latest)

mellow galleon
#

Hi everyone!

The doc about Android/iOS is really confusing and I've tried to follow this one: https://next--tauri.netlify.app/next/guides/getting-started/setup/next-js

This is the project I was able to create: https://github.com/g123k/tauri-mobile-test
It works well on desktop, but on Android it fails with:

error: failed to run custom build command for `wry v0.23.4`

Caused by:
  process didn't exit successfully: `/Users/g123k/Documents/tauri-app/my-app/src-tauri/target/debug/build/wry-5927ce4265faac1c/build-script-build` (exit status: 101)
  --- stdout
  cargo:rerun-if-env-changed=WRY_ANDROID_REVERSED_DOMAIN
  cargo:rerun-if-env-changed=WRY_ANDROID_APP_NAME_SNAKE_CASE
  cargo:rerun-if-env-changed=WRY_ANDROID_KOTLIN_FILES_OUT_DIR

  --- stderr
  thread 'main' panicked at '`WRY_ANDROID_REVERSED_DOMAIN` is not set, which is needed to generate the kotlin files for android.', /Users/g123k/.cargo/registry/src/github.com-1ecc6299db9ec823/wry-0.23.4/build.rs:19:9
  note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
warning: build failed, waiting for other jobs to finish...
       Error `Failed to run `cargo build`: Command "cargo build --package app --manifest-path /Users/g123k/Documents/tauri-app/my-app/src-tauri/Cargo.toml --target aarch64-linux-android --color always" didn't complete successfully, exiting with code 101.
#

Here is my tauri info:

➜ cargo tauri info

[✔] Environment
    - OS: Mac OS 13.3.0 X64
    ✔ Xcode Command Line Tools: installed
    ✔ rustc: 1.68.2 (9eb3afe9e 2023-03-27)
    ✔ Cargo: 1.68.2 (6feb7c9cf 2023-03-26)
    ✔ rustup: 1.25.2 (17db695f1 2023-02-01)
    ✔ Rust toolchain: stable-aarch64-apple-darwin (environment override by RUSTUP_TOOLCHAIN)
    - node: 19.9.0
    - npm: 9.6.3

[-] Packages
    - tauri [RUST]: 1.2.4
    - tauri-build [RUST]: 1.2.1
    - wry [RUST]: 0.23.4
    - tao [RUST]: 0.15.8
    - @tauri-apps/api [NPM]: 1.2.0
    - @tauri-apps/cli [NPM]: 2.0.0-alpha.8

[-] App
    - build-type: bundle
    - CSP: unset
    - distDir: ../out
    - devPath: http://localhost:3000/
    - framework: React (Next.js)
    - bundler: Webpack
rigid dove
#

you’re only using the 2.0 cli

#

you also need to update the dependencies in cargo.toml

mellow galleon
#

I've updated the dependencies, but I'm not really sure to understand your point about the 2.0 CLI. Is-there a new release? But cli.rs "v2.0.0-alpha.8" is the latest one, isn't-it?

#

Here is my tauri info now:

[✔] Environment
    - OS: Mac OS 13.3.0 X64
    ✔ Xcode Command Line Tools: installed
    ✔ rustc: 1.68.2 (9eb3afe9e 2023-03-27)
    ✔ Cargo: 1.68.2 (6feb7c9cf 2023-03-26)
    ✔ rustup: 1.25.2 (17db695f1 2023-02-01)
    ✔ Rust toolchain: stable-aarch64-apple-darwin (environment override by RUSTUP_TOOLCHAIN)
    - node: 19.9.0
    - npm: 9.6.3

[-] Packages
    - tauri [RUST]: 2.0.0-alpha.0 (no lockfile)
    - tauri-build [RUST]: no manifest (no lockfile)
    - wry [RUST]: no manifest (no lockfile)
    - tao [RUST]: no manifest (no lockfile)
    - @tauri-apps/api [NPM]: 2.0.0-alpha.2
    - @tauri-apps/cli [NPM]: 2.0.0-alpha.8

[-] App
    - build-type: bundle
    - CSP: unset
    - distDir: ../out
    - devPath: http://localhost:3000/
    - framework: React (Next.js)
    - bundler: Webpack

And now it fails with

       Error Library artifact not found at /Users/g123k/Documents/tauri-app/my-app/src-tauri/target/aarch64-linux-android/debug/libapp.so. Make sure your Cargo.toml file has a [lib] block with `crate-type = ["staticlib", "cdylib", "rlib"]`

And it I add it I have a new error :/

scenic oxide
#

the repo is for SolidJS - but works with any front-end framework. Just follow the instructions for installing.

#

oh note:

Have you run this?

rustup target add aarch64-linux-android armv7-linux-androideabi i686-linux-android x86_64-linux-android
#

Also - NextJS is a little finnicky -we recommend Nuxt or Preact or React. NextJS has a lot of SSR things that need to be handled properly,

rigid dove