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

[Android] Unresolved reference: FlutterMain #142

Open
kay-schecker opened this issue Jan 7, 2025 · 7 comments
Open

[Android] Unresolved reference: FlutterMain #142

kay-schecker opened this issue Jan 7, 2025 · 7 comments

Comments

@kay-schecker
Copy link

I'm unable to build the android application using the flutter version provided below. FlutterMain is deprecated

Running Gradle task 'assembleDebug'...
e: ~/.pub-cache/hosted/pub.dev/adapty_flutter-3.3.1/android/src/main/kotlin/com/adapty/flutter/AdaptyFlutterPlugin.kt:14:24 Unresolved reference: FlutterMain
e: ~/.pub-cache/hosted/pub.dev/adapty_flutter-3.3.1/android/src/main/kotlin/com/adapty/flutter/AdaptyFlutterPlugin.kt:21:52 Unresolved reference: Registrar
e: ~/.pub-cache/hosted/pub.dev/adapty_flutter-3.3.1/android/src/main/kotlin/com/adapty/flutter/AdaptyFlutterPlugin.kt:76:47 Unresolved reference: getLookupKeyForAsset

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':adapty_flutter:compileDebugKotlin'.
> A failure occurred while executing org.jetbrains.kotlin.compilerRunner.GradleCompilerRunnerWithWorkers$GradleKotlinCompilerWorkAction
   > Compilation error. See log for more 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.
> Get more help at https://help.gradle.org.

BUILD FAILED in 14s
Error: Gradle task assembleDebug failed with exit code 1
Flutter 3.28.0-0.1.pre • channel beta • https://github.com/flutter/flutter.git
Framework • revision 3e493a3e4d (4 weeks ago) • 2024-12-12 05:59:24 +0900
Engine • revision 2ba456fd7f
Tools • Dart 3.7.0 (build 3.7.0-209.1.beta) • DevTools 2.41.0
@kay-schecker kay-schecker changed the title Unresolved reference: FlutterMain [Android] Unresolved reference: FlutterMain Jan 7, 2025
@vladd-g
Copy link
Collaborator

vladd-g commented Jan 7, 2025

Hey @kay-schecker

Please contact our support team via [email protected], they will assist you further

@kay-schecker
Copy link
Author

Hey @kay-schecker

Please contact our support team via [email protected], they will assist you further

I have sent them a message.

@amandwivedi07
Copy link

Hey @kay-schecker are you able to solve this ?

@vladd-g
Copy link
Collaborator

vladd-g commented Jan 14, 2025

Hey @amandwivedi07 @kay-schecker, could you try switching to flutter channel stable?

The fix on the SDK side will be out soon

@amandwivedi07
Copy link

We are using 3.24.3 version of flutter and it is very much stable from last 6 months .
I am getting this error

FAILURE: Build failed with an exception.

  • What went wrong:
    Execution failed for task ':adapty_flutter:generateDebugRFile'.

A failure occurred while executing com.android.build.gradle.internal.res.GenerateLibraryRFileTask$GenerateLibRFileRunnable
/Users/aman/.gradle/caches/transforms-3/f7c62005e93d2c8dca326fd6ddf316a4/transformed/androidx.fragment-r.txt

@vladd-g
Copy link
Collaborator

vladd-g commented Jan 14, 2025

@amandwivedi07 do you have exactly the same error as in the first comment? I couldn't reproduce it on my 3.24.5, but could on 3.28.0-0.1.pre on the beta channel

@amandwivedi07
Copy link

Screenshot 2025-01-14 at 2 59 30 PM I am getting this error

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