syphon-org / syphon

⚗️ a privacy centric matrix client
https://syphon.org
GNU Affero General Public License v3.0
1.04k stars 72 forks source link

Android build issues #612

Closed EdGeraghty closed 2 years ago

EdGeraghty commented 2 years ago
Launching lib\main.dart on Android SDK built for x86 64 in debug mode...
Running Gradle task 'assembleDebug'...
e: C:\Users\Ed\AppData\Local\Pub\Cache\hosted\pub.dartlang.org\local_image_provider-4.0.1\android\src\main\kotlin\com\csdcorp\local_image_provider\LocalImageProviderPlugin.kt: (75, 8): Class 'LocalImageProviderPlugin' is not abstract and does not implement abstract member public abstract fun onRequestPermissionsResult(p0: Int, p1: Array<(out) String!>, p2: IntArray): Boolean defined in io.flutter.plugin.common.PluginRegistry.RequestPermissionsResultListener
e: C:\Users\Ed\AppData\Local\Pub\Cache\hosted\pub.dartlang.org\local_image_provider-4.0.1\android\src\main\kotlin\com\csdcorp\local_image_provider\LocalImageProviderPlugin.kt: (657, 5): 'onRequestPermissionsResult' overrides nothing
e: C:\Users\Ed\AppData\Local\Pub\Cache\hosted\pub.dartlang.org\local_image_provider-4.0.1\android\src\main\kotlin\com\csdcorp\local_image_provider\LocalImageProviderPlugin.kt: (673, 9): Class 'ChannelResultWrapper' is not abstract and does not implement abstract member public abstract fun error(p0: String, p1: String?, p2: Any?): Unit defined in io.flutter.plugin.common.MethodChannel.Result
e: C:\Users\Ed\AppData\Local\Pub\Cache\hosted\pub.dartlang.org\local_image_provider-4.0.1\android\src\main\kotlin\com\csdcorp\local_image_provider\LocalImageProviderPlugin.kt: (688, 5): 'error' overrides nothing
e: C:\Users\Ed\AppData\Local\Pub\Cache\hosted\pub.dartlang.org\local_image_provider-4.0.1\android\src\main\kotlin\com\csdcorp\local_image_provider\LocalImageProviderPlugin.kt: (691, 30): Type mismatch: inferred type is String? but String was expected

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':local_image_provider:compileDebugKotlin'.
> 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 2m 36s
Exception: Gradle task assembleDebug failed with exit code 1

My environment:

PS D:\Source\syphon> flutter doctor -v
[√] Flutter (Channel master, 2.11.0-0.0.pre.765, on Microsoft Windows [Version 10.0.19044.1526], locale en-GB)
    • Flutter version 2.11.0-0.0.pre.765 at D:\Tools\flutter
    • Upstream repository https://github.com/flutter/flutter.git
    • Framework revision fbf6a58bf1 (25 hours ago), 2022-03-04 07:21:15 -0500
    • Engine revision 14b1f3fbc5
    • Dart version 2.17.0 (build 2.17.0-169.0.dev)
    • DevTools version 2.11.1

[√] Android toolchain - develop for Android devices (Android SDK version 32.1.0-rc1)
    • Android SDK at D:\Tools\Android\
    • Platform android-32, build-tools 32.1.0-rc1
    • Java binary at: E:\Tools\Android Studio\jre\bin\java
    • Java version OpenJDK Runtime Environment (build 11.0.11+9-b60-7590822)
    • All Android licenses accepted.

[X] Chrome - develop for the web (Cannot find Chrome executable at .\Google\Chrome\Application\chrome.exe)
    ! Cannot find Chrome. Try setting CHROME_EXECUTABLE to a Chrome executable.

[√] Visual Studio - develop for Windows (Visual Studio Community 2019 16.11.10)
    • Visual Studio at D:\Tools\VisualStudio
    • Visual Studio Community 2019 version 16.11.32126.315
    • Windows 10 SDK version 10.0.19041.0

[√] Android Studio (version 2021.1)
    • Android Studio at E:\Tools\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 11.0.11+9-b60-7590822)

[√] IntelliJ IDEA Community Edition (version 2021.3)
    • IntelliJ at C:\Program Files\JetBrains\IntelliJ IDEA Community Edition 2021.3.2
    • Flutter plugin version 65.1.4
    • Dart plugin version 213.5744.122

[√] Connected device (3 available)
    • Android SDK built for x86 64 (mobile) • emulator-5554 • android-x64    • Android 12 (API 31) (emulator)
    • Windows (desktop)                     • windows       • windows-x64    • Microsoft Windows [Version 10.0.19044.1526]
    • Edge (web)                            • edge          • web-javascript • Microsoft Edge 97.0.1072.69

[√] HTTP Host Availability
    • All required HTTP hosts are available

! Doctor found issues in 1 category.
ereio commented 2 years ago

We'll be upgrading our Flutter version soon but always use the version found in https://github.com/syphon-org/syphon/blob/dev/.fvm/fvm_config.json or under the drone.yaml (currently 2.8.1)

Only deploy or use flutter versions under their 'stable' releases. Way back when the project started, I used master for desktop builds, but those are under stable builds now too and there's usually a ton of breaking changes every few weeks.

There's plenty of breaking changes between 2.8.1 and the latest stable too that I'll hopefully be getting to today!