janoodleFTW / timy-messenger

Timy - open source mobile app for groups to communicate and organize themselves. Built with flutter.
Apache License 2.0
2.08k stars 464 forks source link

Android: Fix app compatibility with "master channel" #20

Open miquelbeltran opened 5 years ago

miquelbeltran commented 5 years ago

UPDATE

Due to the dependency with the aqwert/flutter_platform_widgets#90 issue, we cannot currently support master. I will update the README.md accordingly.


Currently the app won't build with the Flutter master channel, but it still works with stable or beta.

Flutter Doctor:

Doctor summary (to see all details, run flutter doctor -v):
[✓] Flutter (Channel master, v1.10.6-pre.19, on Mac OS X 10.15 19A583, locale
    en-DE)

[✓] Android toolchain - develop for Android devices (Android SDK version 29.0.2)
[✓] Xcode - develop for iOS and macOS (Xcode 11.1)
[✓] Chrome - develop for the web
[✓] Android Studio (version 3.5)
[✓] IntelliJ IDEA Ultimate Edition (version 2019.2.1)
[✓] Connected device (3 available)

• No issues found!

Error logs

/Users/miquel/dev/projects/timy-messenger/android/app/src/debug/AndroidManifest.xml:22:18-91 Error:
    Attribute application@appComponentFactory value=(android.support.v4.app.CoreComponentFactory) from [com.android.support:support-compat:28.0.0] AndroidManifest.xml:22:18-91
    is also present at [androidx.core:core:1.0.2] AndroidManifest.xml:22:18-86 value=(androidx.core.app.CoreComponentFactory).
    Suggestion: add 'tools:replace="android:appComponentFactory"' to <application> element at AndroidManifest.xml:9:5-36:19 to override.

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':app:processDebugManifest'.
> Manifest merger failed : Attribute application@appComponentFactory value=(android.support.v4.app.CoreComponentFactory) from [com.android.support:support-compat:28.0.0] AndroidManifest.xml:22:18-91
    is also present at [androidx.core:core:1.0.2] AndroidManifest.xml:22:18-86 value=(androidx.core.app.CoreComponentFactory).
    Suggestion: add 'tools:replace="android:appComponentFactory"' to <application> element at AndroidManifest.xml:9:5-36:19 to override.

* 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 16s
AndroidX incompatibilities may have caused this build to fail. See https://goo.gl/CP92wY.
Finished with error: Gradle task assembleDebug failed with exit code 1

TODO:

sduduzog commented 5 years ago

I'll give this one a shot

sduduzog commented 5 years ago

Here's a current dilema. I'me having issues when I try to use channel master and building the app

Compiler message:
/C:/src/flutter/.pub-cache/hosted/pub.dartlang.org/flutter_platform_widgets-0.20.2/lib/src/platform_scaffold.dart:229:38: Error: The getter 'fullObstruction' isn't defined for the class 'ObstructingPreferredSizeWidget'.
 - 'ObstructingPreferredSizeWidget' is from 'package:flutter/src/cupertino/page_scaffold.dart' ('/C:/src/flutter/packages/flutter/lib/src/cupertino/page_scaffold.dart').
Try correcting the name to the name of an existing getter, or defining a getter or field named 'fullObstruction'.
      final obstruct = navigationBar.fullObstruction == null ||
                                     ^^^^^^^^^^^^^^^
/C:/src/flutter/.pub-cache/hosted/pub.dartlang.org/flutter_platform_widgets-0.20.2/lib/src/platform_scaffold.dart:230:25: Error: The getter 'fullObstruction' isn't defined for the class 'ObstructingPreferredSizeWidget'.
 - 'ObstructingPreferredSizeWidget' is from 'package:flutter/src/cupertino/page_scaffold.dart' ('/C:/src/flutter/packages/flutter/lib/src/cupertino/page_scaffold.dart').
Try correcting the name to the name of an existing getter, or defining a getter or field named 'fullObstruction'.
          navigationBar.fullObstruction;
                        ^^^^^^^^^^^^^^^
Exception: Errors during snapshot creation: null
#0      KernelSnapshot.build (package:flutter_tools/src/build_system/targets/dart.dart:226:7)
<asynchronous suspension>
#1      _BuildInstance._invokeInternal (package:flutter_tools/src/build_system/build_system.dart:526:25)
<asynchronous suspension>
#2      _BuildInstance.invokeTarget.<anonymous closure> (package:flutter_tools/src/build_system/build_system.dart:481:35)
#3      new Future.sync (dart:async/future.dart:224:31)
#4      AsyncMemoizer.runOnce (package:async/src/async_memoizer.dart:43:45)
#5      _BuildInstance.invokeTarget (package:flutter_tools/src/build_system/build_system.dart:481:21)

and my flutter doctor output

Doctor summary (to see all details, run flutter doctor -v):
[√] Flutter (Channel master, v1.10.15-pre.93, on Microsoft Windows [Version 10.0.18362.418], locale en-ZA)

[√] Android toolchain - develop for Android devices (Android SDK version 29.0.2)
[√] Android Studio (version 3.5)
[√] VS Code (version 1.39.1)
[√] Connected device (1 available)

• No issues found!

Although these issues are different, I noticed I'm hafing them now because my flutter installation is a bit ahead in terms of versions than yours. I was however able to reproduce the android errors some other time while on the stable channel for which I'll attempt to use.

sduduzog commented 5 years ago

While continuing on my quest I ran into this https://github.com/YoussefKababe/pinch_zoom_image/pull/11

miquelbeltran commented 5 years ago

Due to the dependency with the https://github.com/aqwert/flutter_platform_widgets/issues/90 issue, we cannot currently support master. I will update the README.md accordingly.