Coder Social home page Coder Social logo

Comments (3)

HookedBehemoth avatar HookedBehemoth commented on September 21, 2024

Using jdk 17 makes it work with the slint master branch. From the repository I get a different error about the copyright sign not being ASCII.

error: failed to run custom build command for `i-slint-backend-android-activity v1.5.1`

Caused by:
  process didn't exit successfully: `/home/behemoth/source/timetracker/target/debug/build/i-slint-backend-android-activity-2b756c32d0ff7e66/build-script-build` (exit status: 101)
  --- stdout
  cargo:rerun-if-env-changed=ANDROID_HOME
  cargo:rerun-if-env-changed=JAVA_HOME

  --- stderr
  thread 'main' panicked at /home/behemoth/.cargo/registry/src/index.crates.io-6f17d22bba15001f/i-slint-backend-android-activity-1.5.1/build.rs:59:9:
  Java compilation failed: java/SlintAndroidJavaHelper.java:1: error: unmappable character (0xC2) for encoding US-ASCII
  // Copyright ?? SixtyFPS GmbH <[email protected]>
               ^
  java/SlintAndroidJavaHelper.java:1: error: unmappable character (0xA9) for encoding US-ASCII
  // Copyright ?? SixtyFPS GmbH <[email protected]>

from slint.

ogoffart avatar ogoffart commented on September 21, 2024

Thanks for reporting an issue.

The ASCII thing was fixed in 2b7834e

Regarding the first issue, it looks like the d8 script, which is part of the android sdk fails for some reason. But i'm not really understanding why.
You're saying that downgrading Java SDK helps? Maybe there is an incompatibility with D8 and the new JDK? Or perhpas Slint's build script is not invoking the d8 script properly?

from slint.

ogoffart avatar ogoffart commented on September 21, 2024

(Was also reported in #5029 with similar error:

  Dex conversion failed: Error in /home/bronson/Projects/bike-aid/bike-aid-app/target/aarch64-linux-android/debug/build/i-slint-backend-android-activity-5584ba82a1156d20/out/java/dev/slint/android-activity/SlintInputView$1.class:
  java.lang.NullPointerException: Cannot invoke "String.length()" because "<parameter1>" is null
  Compilation failed with an internal error.
  Exception in thread "main" java.lang.RuntimeException: com.android.tools.r8.CompilationFailedException: Compilation failed to complete, origin: /home/bronson/Projects/bike-aid/bike-aid-app/target/aarch64-linux-android/debug/build/i-slint-backend-android-activity-5584ba82a1156d20/out/java/dev/slint/android-activity/SlintInputView$1.class
  ...

Looks like there is some incompatibility with the android SDK and the java JDK 21.
Googling this error show other result, but none of these link have any solutions:

I'm not sure what we should do here.
Maybe we can find out what version of the android SDK and JDK are incompatibles and detect that in the build script. Or perhaps there is a better way to invoke D8 that doesn't have this error.

from slint.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.