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

Compilation fails #1

Closed
ghost opened this issue Sep 12, 2021 · 5 comments
Closed

Compilation fails #1

ghost opened this issue Sep 12, 2021 · 5 comments

Comments

@ghost
Copy link

ghost commented Sep 12, 2021

The code in master branch does not compile:

fctor @ DESKTOP-G2K2TFQ in ~\Desktop\src\pgs\flutter\musicPlayer 
$ flutter run -d RZ8R80JWNBA
Downloading android-arm-profile/windows-x64 tools...             1,387ms
Downloading android-arm-release/windows-x64 tools...               874ms
Downloading android-arm64-profile/windows-x64 tools...             944ms
Downloading android-arm64-release/windows-x64 tools...             730ms
Downloading android-x64-profile/windows-x64 tools...               885ms
Downloading android-x64-release/windows-x64 tools...               896ms
Because mockito >=4.1.2 <=5.0.0-nullsafety.7 depends on test_api ^0.2.19-nullsafety and every version of flutter_test from sdk depends on test_api 0.3.0, mockito >=4.1.2 <=5.0.0-nullsafety.7 is incompatible with flutter_test from sd
k.
So, because musicPlayer depends on both flutter_test any from sdk and mockito ^4.1.3, version solving failed.
Running "flutter pub get" in musicPlayer...
pub get failed (1; So, because musicPlayer depends on both flutter_test any from sdk and mockito ^4.1.3, version
solving failed.)

fctor @ DESKTOP-G2K2TFQ in ~\Desktop\src\pgs\flutter\musicPlayer  C:1
$ flutter doctor
Doctor summary (to see all details, run flutter doctor -v):
[√] Flutter (Channel stable, 2.2.3, on Microsoft Windows [Version 10.0.19043.1165], locale en-US)
[√] Android toolchain - develop for Android devices (Android SDK version 30.0.3)
[√] Chrome - develop for the web
[√] Visual Studio - develop for Windows (Visual Studio Community 2019 16.11.1)
[!] Android Studio (not installed)
[√] IntelliJ IDEA Ultimate Edition (version 2021.2)
[√] VS Code (version 1.60.0)
[√] Connected device (4 available)

! Doctor found issues in 1 category.

fctor @ DESKTOP-G2K2TFQ in ~\Desktop\src\pgs\flutter\musicPlayer 
$
@o-ifeanyi
Copy link
Owner

You can pull the changes and try again now

@ghost
Copy link
Author

ghost commented Sep 15, 2021

I'm getting a compilation error now. I'm on flutter 2.5.0:

$ flutter build apk
The plugins `audiotagger, flutter_media_notification` use a deprecated version of the Android embedding.
To avoid unexpected runtime failures, or future build failures, try to see if these plugins support the Android V2
embedding. Otherwise, consider removing them since a future release of Flutter will remove these deprecated APIs.
If you are plugin author, take a look at the docs for migrating the plugin to the V2 embedding:
https://flutter.dev/go/android-plugin-migration.

Building without sound null safety
For more information see https://dart.dev/null-safety/unsound-null-safety

C:\Users\fctor\Desktop\flutter\.pub-cache\hosted\pub.dartlang.org\permission_handler-5.0.1+1\android\src\main\java\
com\baseflow\permissionhandler\PermissionHandlerPlugin.java:14: warning: [deprecation] Registrar in PluginRegistry
has been deprecated
import io.flutter.plugin.common.PluginRegistry.Registrar;
                                              ^
C:\Users\fctor\Desktop\flutter\.pub-cache\hosted\pub.dartlang.org\permission_handler-5.0.1+1\android\src\main\java\
com\baseflow\permissionhandler\PermissionHandlerPlugin.java:39: warning: [deprecation] Registrar in PluginRegistry
has been deprecated
    public static void registerWith(Registrar registrar) {
                                    ^
2 warnings
lib/providers/identify_controller.dart:11:8: Error: Error when reading 'lib/services/secrets.dart': The system cann
ot find the file specified.

import 'package:musicPlayer/services/secrets.dart';
       ^
lib/services/lyrics.dart:4:8: Error: Error when reading 'lib/services/secrets.dart': The system cannot find the fil
e specified.

import 'package:musicPlayer/services/secrets.dart';
       ^
lib/services/song_info.dart:3:8: Error: Error when reading 'lib/services/secrets.dart': The system cannot find the
file specified.

import 'package:musicPlayer/services/secrets.dart';
       ^
lib/providers/identify_controller.dart:27:15: Error: The getter 'kHost' isn't defined for the class 'IdentifyContro
ller'.
 - 'IdentifyController' is from 'package:musicPlayer/providers/identify_controller.dart' ('lib/providers/identify_c
ontroller.dart').
Try correcting the name to the name of an existing getter, or defining a getter or field named 'kHost'.
        host: kHost,
              ^^^^^
lib/providers/identify_controller.dart:28:20: Error: The getter 'kAccessKey' isn't defined for the class 'IdentifyC
ontroller'.
 - 'IdentifyController' is from 'package:musicPlayer/providers/identify_controller.dart' ('lib/providers/identify_c
ontroller.dart').
Try correcting the name to the name of an existing getter, or defining a getter or field named 'kAccessKey'.
        accessKey: kAccessKey,
                   ^^^^^^^^^^
lib/providers/identify_controller.dart:29:23: Error: The getter 'kAccessSecret' isn't defined for the class 'Identi
fyController'.
 - 'IdentifyController' is from 'package:musicPlayer/providers/identify_controller.dart' ('lib/providers/identify_c
ontroller.dart').
Try correcting the name to the name of an existing getter, or defining a getter or field named 'kAccessSecret'.
        accessSecret: kAccessSecret,
                      ^^^^^^^^^^^^^
lib/services/lyrics.dart:21:15: Error: Getter not found: 'kTag0'.
            '$kTag0+$kTag1';
              ^^^^^
lib/services/lyrics.dart:21:22: Error: Getter not found: 'kTag1'.
            '$kTag0+$kTag1';
                     ^^^^^
lib/services/lyrics.dart:32:48: Error: Getter not found: 'kLyricsLink0'.
        if (link.attributes['href'].contains('$kLyricsLink0/lyrics')) {
                                               ^^^^^^^^^^^^
lib/services/lyrics.dart:35:48: Error: Getter not found: 'kLyricsLink1'.
        if (link.attributes['href'].contains('$kLyricsLink1/lyrics')) {
                                               ^^^^^^^^^^^^
lib/services/song_info.dart:26:31: Error: Getter not found: 'kApiKey'.
            "x-rapidapi-key": kApiKey,
                              ^^^^^^^
lib/services/song_info.dart:46:31: Error: Getter not found: 'kApiKey'.
            "x-rapidapi-key": kApiKey,
                              ^^^^^^^


FAILURE: Build failed with an exception.

* Where:
Script 'C:\Users\fctor\Desktop\flutter\packages\flutter_tools\gradle\flutter.gradle' line: 1005

* What went wrong:
Execution failed for task ':app:compileFlutterBuildRelease'.
> Process 'command 'C:\Users\fctor\Desktop\flutter\bin\flutter.bat'' finished with non-zero exit value 1

* 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 1m 13s
Running Gradle task 'assembleRelease'...                           74.4s
Gradle task assembleRelease failed with exit code 1

@o-ifeanyi
Copy link
Owner

I wont be able to update packages for now. But I've updated the readme so you can add the missing file and its content. It should run after that.

@felipecastrosales
Copy link

it would be amazing if this project was updated to the latest versions. @o-ifeanyi 😄

@o-ifeanyi
Copy link
Owner

Ahh yes @felipecastrosales
Do you want to have a go at it or should I? 😅

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants