surfstudio / flutter-push-notification

Made by Surf 🏄
Apache License 2.0
26 stars 5 forks source link

[BUG] Andorid build error #27

Open vasilich6107 opened 1 year ago

vasilich6107 commented 1 year ago

Could not resolve ru.surfstudio.android:push:0.4.0. Required by: project :app > project :push_notification

vasilich6107 commented 1 year ago
Execution failed for task ':app:mergeDebugAssets'.
> Could not resolve all files for configuration ':app:debugRuntimeClasspath'.
   > Could not find ru.surfstudio.android:push:0.4.0.
     Searched in the following locations:
       - https://dl.google.com/dl/android/maven2/ru/surfstudio/android/push/0.4.0/push-0.4.0.pom
       - https://repo.maven.apache.org/maven2/ru/surfstudio/android/push/0.4.0/push-0.4.0.pom
       - https://jitpack.io/ru/surfstudio/android/push/0.4.0/push-0.4.0.pom
       - https://storage.googleapis.com/download.flutter.io/ru/surfstudio/android/push/0.4.0/push-0.4.0.pom
     Required by:
         project :app > project :push_notification
   > Could not find ru.surfstudio.android:activity-holder:0.4.0.
     Searched in the following locations:
       - https://dl.google.com/dl/android/maven2/ru/surfstudio/android/activity-holder/0.4.0/activity-holder-0.4.0.pom
       - https://repo.maven.apache.org/maven2/ru/surfstudio/android/activity-holder/0.4.0/activity-holder-0.4.0.pom
       - https://jitpack.io/ru/surfstudio/android/activity-holder/0.4.0/activity-holder-0.4.0.pom
       - https://storage.googleapis.com/download.flutter.io/ru/surfstudio/android/activity-holder/0.4.0/activity-holder-0.4.0.pom
     Required by:
         project :app > project :push_notification
vasilich6107 commented 1 year ago

@SurfStudioLLC the jcenter is down Could you help with fixing this?

vasilich6107 commented 1 year ago

@MbIXjkee @KristinaZoteva @internetova @zhukeev @tinted-knight @VVPAK

vasilich6107 commented 1 year ago

Adding maven { url 'https://artifactory.surfstudio.ru/artifactory/libs-release-local' } fixes the issue

MbIXjkee commented 1 year ago

@vasilich6107 Hi! Sorry, but I'm not able to fix this, because I don't work more in the organization. You can write to the team in the telegram by the link in the readme file.

vasilich6107 commented 1 year ago

Any news?

mark-kascheev commented 1 year ago

Hello, @vasilich6107! Sorry for not responding, I think we fixed the problem. Thanks for the help!

B0yma commented 1 year ago
  defaultConfig {
        // TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html).
        applicationId "com.example.push_demo"
        minSdkVersion 19
        targetSdkVersion 28
        versionCode flutterVersionCode.toInteger()
        versionName flutterVersionName
        testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
        multiDexEnabled true
    }

in your example targetSdkVersion = 28 if we change to 31 or above app crashes with error:

   E/AndroidRuntime( 8723): Strongly consider using FLAG_IMMUTABLE, only use FLAG_MUTABLE if some functionality depends on the PendingIntent being mutable, e.g. if it needs to be used with inline replies or bubbles.
E/AndroidRuntime( 8723):    at android.app.PendingIntent.checkFlags(PendingIntent.java:375)
E/AndroidRuntime( 8723):    at android.app.PendingIntent.getBroadcastAsUser(PendingIntent.java:645)
E/AndroidRuntime( 8723):    at android.app.PendingIntent.getBroadcast(PendingIntent.java:632)
E/AndroidRuntime( 8723):    at ru.surfstudio.android.notification.ui.notification.strategies.PushHandleStrategy.preparePendingIntent(PushHandleStrategy.kt:237)
E/AndroidRuntime( 8723):    at ru.surfstudio.android.notification.ui.notification.strategies.PushHandleStrategy.handle(PushHandleStrategy.kt:161)
E/AndroidRuntime( 8723):    at pushnotification.push_notification.handler.PushHandler.handleMessage(PushHandler.kt:20)
E/AndroidRuntime( 8723):    at pushnotification.push_notification.PushNotificationPlugin.handleNotification$lambda-0(PushNotificationPlugin.kt:128)
E/AndroidRuntime( 8723):    at pushnotification.push_notification.PushNotificationPlugin.$r8$lambda$RGpar5Gn70ioPnKOFsbr8ZdTorM(Unknown Source:0)
E/AndroidRuntime( 8723):    at pushnotification.push_notification.PushNotificationPlugin$$ExternalSyntheticLambda0.run(Unknown Source:6)
E/AndroidRuntime( 8723):    at android.os.AsyncTask$SerialExecutor$1.run(AsyncTask.java:305)
E/AndroidRuntime( 8723):    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1167)
E/AndroidRuntime( 8723):    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:641)
E/AndroidRuntime( 8723):    at java.lang.Thread.run(Thread.java:920)

how to fix?

vasilich6107 commented 1 year ago

Half a year has gone Could you fix the issue

tinted-knight commented 1 year ago

Hi @vasilich6107. Do you still face your original issue or the one @B0yma mentioned above?

vasilich6107 commented 1 year ago

Hi @tinted-knight As far as there were no fixes - the issues are still there

I can confirm that staring from api 31 it throws the error about flags

tinted-knight commented 1 year ago

Thanks @vasilich6107 . While it's still a build-time issue, the new one seems to have another reason (Android API requirements). It would be great if you or @B0yma could create a new issue - it helps to divide specific problems.