dstark5 / Openlib

An Open source app to download and read books from shadow library (Anna’s Archive)
GNU General Public License v3.0
1.06k stars 56 forks source link

can't build, flutter build apk fails #82

Open UnifiedDZ opened 6 months ago

UnifiedDZ commented 6 months ago

hey flutter noob here, great app! I wanna try adding a few options like file conversion but when trying to compile the app I'm getting this on the terminal Im using a fork of VSCode on windows 10

PS C:\Users\Aziz\3D Objects\Openlib> flutter doctor Doctor summary (to see all details, run flutter doctor -v): [√] Flutter (Channel stable, 3.16.5, on Microsoft Windows [Version 10.0.19044.3803], locale en-US) [√] Windows Version (Installed version of Windows is version 10 or higher) [√] Android toolchain - develop for Android devices (Android SDK version 34.0.0) [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. [X] Visual Studio - develop Windows apps X Visual Studio not installed; this is necessary to develop Windows apps.
Download at https://visualstudio.microsoft.com/downloads/. Please install the "Desktop development with C++" workload, including all of its default components [√] Android Studio (version 2023.2) [√] VS Code (version 1.87.1) [√] Connected device (2 available) [√] Network resources

! Doctor found issues in 2 categories. PS C:\Users\Aziz\3D Objects\Openlib> flutter build apk

FAILURE: Build failed with an exception.

BUILD FAILED in 1s Running Gradle task 'assembleRelease'... 2,629ms Gradle task assembleRelease failed with exit code 1

dstark5 commented 4 months ago

Make sure you have these field in android/app/application.properties

flutter.versionName=1.0.6 flutter.versionCode=9 flutter.minSdkVersion=21 flutter.targetSdkVersion=30 flutter.compileSdkVersion=30

mastof commented 4 months ago

I have the same problem, but in the code there is no file ' android/app/application.properties' I tried to create the file but the error persists

PS C:\Users\Mastof> flutter doctor
Doctor summary (to see all details, run flutter doctor -v):
[√] Flutter (Channel stable, 3.19.6, on Microsoft Windows [versÆo 10.0.22631.3447], locale pt-BR)
[√] Windows Version (Installed version of Windows is version 10 or higher)
[√] Android toolchain - develop for Android devices (Android SDK version 34.0.0)
[√] Chrome - develop for the web
[X] Visual Studio - develop Windows apps
    X Visual Studio not installed; this is necessary to develop Windows apps.
      Download at https://visualstudio.microsoft.com/downloads/.
      Please install the "Desktop development with C++" workload, including all of its default components
[√] Android Studio (version 2023.2)
[√] VS Code (version 1.89.1)
[√] Connected device (3 available)
[√] Network resources
PS C:\Users\Mastof\Desktop\Openlib-1.0.6-beta> flutter build apk

You are applying Flutter's app_plugin_loader Gradle plugin imperatively using the apply script method, which is deprecated and will be removed in a future release. Migrate to applying Gradle plugins with the declarative plugins block: https://flutter.dev/go/flutter-gradle-plugin-apply

You are applying Flutter's main Gradle plugin imperatively using the apply script method, which is deprecated and will be removed in a future release. Migrate to applying Gradle plugins with the declarative plugins block: https://flutter.dev/go/flutter-gradle-plugin-apply

FAILURE: Build failed with an exception.

* Where:
Build file 'C:\Users\Mastof\Desktop\Openlib-1.0.6-beta\android\app\build.gradle' line: 59

* What went wrong:
A problem occurred evaluating project ':app'.
> Cannot invoke method toInteger() on null object

* 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 998ms
Running Gradle task 'assembleRelease'...                         1.693ms
Gradle task assembleRelease failed with exit code 1
Tactile-Taco commented 4 months ago

I am having the same issue

Lennjor commented 1 month ago

Same here, anybody have a solution by now?