exponea / exponea-flutter-sdk

MIT License
7 stars 9 forks source link

[Android] Problem with build #24

Closed shtreb closed 3 months ago

shtreb commented 3 months ago

Hi! I have problem with building android app:

e: file:///C:/Users/shtre/StudioProjects/novakid-mobile/android/app/src/main/kotlin/com/novakid/student/services/ExponeaFirebaseMessageService.kt:5:20 Unresolved reference: ExponeaPlugin
e: file:///C:/Users/shtre/StudioProjects/novakid-mobile/android/app/src/main/kotlin/com/novakid/student/services/ExponeaFirebaseMessageService.kt:17:9 Unresolved reference: ExponeaPlugin
e: file:///C:/Users/shtre/StudioProjects/novakid-mobile/android/app/src/main/kotlin/com/novakid/student/services/ExponeaFirebaseMessageService.kt:22:9 Unresolved reference: ExponeaPlugin

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':app:compileQaDebugKotlin'.
> A failure occurred while executing org.jetbrains.kotlin.compilerRunner.GradleCompilerRunnerWithWorkers$GradleKotlinCompilerWorkAction
   > Compilation error. See log for more details

Problem with old gradle version. Example doesn't work too. And you using old plugin for deeplink. I created fork. Can you look at my solution, may be it help to update project

https://github.com/shtreb/exponea-flutter-sdk

shtreb commented 3 months ago

So, print doctor -v

[√] Flutter (Channel stable, 3.22.2, on Microsoft Windows [Version 10.0.22631.3880], locale ru-RU)
    • Flutter version 3.22.2 on channel stable at C:\flutter
    • Upstream repository https://github.com/flutter/flutter.git
    • Framework revision 761747bfc5 (9 weeks ago), 2024-06-05 22:15:13 +0200
    • Engine revision edd8546116
    • Dart version 3.4.3
    • DevTools version 2.34.3

[√] Windows Version (Installed version of Windows is version 10 or higher)

[√] Android toolchain - develop for Android devices (Android SDK version 34.0.0)
    • Android SDK at C:\Users\shtre\AppData\Local\Android\sdk
    • Platform android-34, build-tools 34.0.0
    • Java binary at: C:\Program Files\Android\Android Studio\jbr\bin\java
    • Java version OpenJDK Runtime Environment (build 17.0.10+0--11609105)
    • All Android licenses accepted.

[√] Chrome - develop for the web
    • Chrome at C:\Program Files\Google\Chrome\Application\chrome.exe

[√] Visual Studio - develop Windows apps (Visual Studio Community 2022 17.9.2)
    • Visual Studio at C:\Program Files\Microsoft Visual Studio\2022\Community
    • Visual Studio Community 2022 version 17.9.34622.214
    • Windows 10 SDK version 10.0.22621.0

[√] Android Studio (version 2024.1)
    • Android Studio at C:\Program Files\Android\Android Studio
    • Flutter plugin can be installed from:
       https://plugins.jetbrains.com/plugin/9212-flutter
    • Dart plugin can be installed from:
       https://plugins.jetbrains.com/plugin/6351-dart
    • Java version OpenJDK Runtime Environment (build 17.0.10+0--11609105)

[√] VS Code (version 1.89.1)
    • VS Code at C:\Users\shtre\AppData\Local\Programs\Microsoft VS Code
    • Flutter extension version 3.88.0

[√] Connected device (4 available)
    • Pixel 6a (mobile) • 26131JEGR08578 • android-arm64  • Android 14 (API 34)
    • Windows (desktop) • windows        • windows-x64    • Microsoft Windows [Version 10.0.22631.3880]
    • Chrome (web)      • chrome         • web-javascript • Google Chrome 127.0.6533.89
    • Edge (web)        • edge           • web-javascript • Microsoft Edge 127.0.2651.86

[√] Network resources
    • All expected network resources are available.
roland-misica commented 3 months ago

Hi @shtreb, thanks for reaching out. regarding your problem, it looks to me more like missing import of ExponeaPlugin inside your code, try adding import com.exponea.ExponeaPlugin at the beginning of your ExponeaFirebaseMessageService.kt.

We are aware of the old versions of dependencies inside SDK as well Example app and have plans to upgrade them soon.

Regards

shtreb commented 3 months ago

@roland-misica unfortunately, I added import to native project. But I have good news, after update to 1.7.0 build working very well.