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

Not working on Flutter 3 #32

Open
ozankelkit opened this issue Jun 29, 2022 · 4 comments
Open

Not working on Flutter 3 #32

ozankelkit opened this issue Jun 29, 2022 · 4 comments

Comments

@ozankelkit
Copy link

When building app
java:152: error: cannot find symbol
String assetLookupKey = FlutterLoader.getInstance().getLookupKeyForAsset(assetPath);

@zjamshidi
Copy link

I'm facing the same problem. I solved it as followings

import io.flutter.FlutterInjector;
...
String assetLookupKey = FlutterInjector.instance().flutterLoader().getLookupKeyForAsset(assetPath);

@Hammad0317
Copy link

C:\src\flutter.pub-cache\hosted\pub.dartlang.org\wallpaper_manager-1.0.10\android\src\main\java\com\mulgundkar\wallpaper_manager\WallpaperManagerPlugin.java:129: error: cannot find symbol
String assetLookupKey = FlutterLoader.getInstance().getLookupKeyForAsset(assetPath);
^
symbol: method getInstance()
location: class FlutterLoader
C:\src\flutter.pub-cache\hosted\pub.dartlang.org\wallpaper_manager-1.0.10\android\src\main\java\com\mulgundkar\wallpaper_manager\WallpaperManagerPlugin.java:152: error: cannot find symbol
String assetLookupKey = FlutterLoader.getInstance().getLookupKeyForAsset(assetPath);
^
symbol: method getInstance()
location: class FlutterLoader
symbol: method getInstance()
location: class FlutterLoader
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 ':wallpaper_manager:compileDebugJavaWithJavac'.

Compilation failed; see the compiler error output for details.

  • Try:

Run with --stacktrace option to get the stack trace.
Run with --info or --debug option to get more log output.
Run with --scan to get full insights.

BUILD FAILED in 1m 12s
Exception: Gradle task assembleDebug failed with exit code 1
Exited (sigterm)

@Hammad0317
Copy link

wallpaper manager package in use
wallpaper_manager: ^1.0.10

Plz reslove this error

@zjamshidi
Copy link

@Hammad0317 I suggested a temporary fix. Please refer to my comment above.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants