Fuse Community

"Cannot find symbol" in GetRootActivity using bolav's HomeScreen

Hello! I’ve been using bolav’s HomeScreen for multiple projects, but now it fails in “uno build android”:

Uno 1.14.0 (build 550) macOS 10.15 x86_64 118f137
Copyright © 2018-present Fuse Open

Configuring 1.52 s
Compiling syntax tree 0.87 s
Generating code and data 4.00 s
Building Android app
/Users/mattitihverainen/Fuse/App.fi/build/Android/Debug/app/src/main/java/com/foreign/HomeScreen.java:29: error: cannot find symbol
android.app.Activity a = fi.company.Appfi.Appfi.GetRootActivity();

symbol: method GetRootActivity()
location: class Appfi
/Users/mattitihverainen/Fuse/App.fi/build/Android/Debug/app/src/main/java/com/foreign/HomeScreen.java:39: error: cannot find symbol
android.app.Activity a = fi.company.Appfi.Appfi.GetRootActivity();

symbol: method GetRootActivity()
location: class Appfi
Note: Some input files use or override a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
2 errors

FAILURE: Build failed with an exception.

  • What went wrong:
    Execution failed for task ‘:app:compileDebugJavaWithJavac’.
    Compilation failed; see the compiler error output for details.

Any ideas how to fix it?

Try to replace this line: https://github.com/bolav/fuse-homescreen/blob/c9cad2653d63c678f185c0af81e473f798333ef4/HomeScreen.uno#L57

using this : android.app.Activity a = com.fuse.Activity.getRootActivity();

1 Like

Thank you! Works great! :+1: