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: Fix app compatibility with "master channel" #20

Open
miquelbeltran opened this issue Oct 11, 2019 · 4 comments
Open

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

miquelbeltran opened this issue Oct 11, 2019 · 4 comments
Labels
bug Something isn't working Hacktoberfest Good for Hacktoberfest! help wanted Extra attention is needed

Comments

@miquelbeltran
Copy link
Collaborator

miquelbeltran commented Oct 11, 2019

UPDATE

Due to the dependency with the stryder-dev/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:

  • Update Android project to fix issue.
@miquelbeltran miquelbeltran added bug Something isn't working help wanted Extra attention is needed Hacktoberfest Good for Hacktoberfest! labels Oct 11, 2019
@sduduzog
Copy link
Contributor

I'll give this one a shot

@sduduzog
Copy link
Contributor

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
Copy link
Contributor

While continuing on my quest I ran into this YoussefKababe/pinch_zoom_image#11

@miquelbeltran
Copy link
Collaborator Author

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working Hacktoberfest Good for Hacktoberfest! help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

2 participants