Skip to content
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] Tauri 2 on Android: "This app was build for an older version of Android" #10712

Closed
louis993546 opened this issue Aug 21, 2024 · 1 comment
Assignees
Labels
platform: Android status: needs triage This issue needs to triage, applied to new issues type: bug

Comments

@louis993546
Copy link

Describe the bug

Installation of a fresh Tauri 2 template app, triggers this pop-up on modern Android devices:

Screenshot of an Android app, in which it has a pop-up titled 'tauri-app', and description of 'This app was build for an older version of Android. It might not work properly and doesn't include the latest security and privacy protections. Check for an update, or contact the app's developer.'

Reproduction

  1. Create a new Tauri 2 project
  2. ${package manager} run tauri android dev

Expected behavior

There should not be an "older version of Android" popup

Full tauri info output

[✔] Environment
    - OS: Mac OS 14.6.1 X64
    ✔ Xcode Command Line Tools: installed
    ✔ rustc: 1.80.1 (3f5fd8dd4 2024-08-06)
    ✔ cargo: 1.80.1 (376290515 2024-07-16)
    ✔ rustup: 1.27.1 (54dd3d00f 2024-04-24)
    ✔ Rust toolchain: stable-aarch64-apple-darwin (default)
    - node: 20.9.0
    - yarn: 1.22.19
    - npm: 10.1.0
    - bun: 1.1.25

[-] Packages
    - tauri [RUST]: 2.0.0-rc.5
    - tauri-build [RUST]: 2.0.0-rc.5
    - wry [RUST]: 0.42.0
    - tao [RUST]: 0.29.0
    - @tauri-apps/api [NPM]: 2.0.0-rc.2
    - @tauri-apps/cli [NPM]: 2.0.0-rc.6

[-] App
    - build-type: bundle
    - CSP: unset
    - frontendDist: ../dist
    - devUrl: http://localhost:1420/
    - framework: SolidJS
    - bundler: Vite

[-] iOS
    - Developer Teams: (redacted)

Stack trace

No response

Additional context

Looks like #10558 accidentally removed targetSdk for the Android Application.

See the 2nd part of this answer: https://stackoverflow.com/a/75280536

There should still be targetSdk = 34 in the Android block
Screenshot 2024-08-21 at 13 44 28

@ishaan26
Copy link
Contributor

ishaan26 commented Aug 21, 2024

As mentioned, adding targetSdk = 34 to src-tauri/gen/android/app/build.gradle.kts -> android { defaultConfig { ... } } fixes the issue for me.

@lucasfernog lucasfernog self-assigned this Aug 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
platform: Android status: needs triage This issue needs to triage, applied to new issues type: bug
Projects
Status: Done
Development

No branches or pull requests

4 participants