aleksanderwozniak / deer

Minimalist Flutter Todo App, built using BLoC pattern
MIT License
439 stars 105 forks source link

Can not build from source code on Windows 10 #23

Closed KanybekMomukeyev closed 5 years ago

KanybekMomukeyev commented 5 years ago

This kind of error:


* Error running Gradle:
ProcessException: Process "C:\Users\koke\Downloads\deer-master\android\gradlew.bat" exited abnormally:
FAILURE: Build failed with an exception.
* Where:
Build file 'C:\Users\koke\Downloads\deer-master\android\app\build.gradle' line: 52
* What went wrong:
A problem occurred evaluating project ':app'.
> path may not be null or empty string. path='null'
* 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 1s
  Command: C:\Users\koke\Downloads\deer-master\android\gradlew.bat app:properties
Please review your Gradle project setup in the android/ folder.
Exited (sigterm)
KanybekMomukeyev commented 5 years ago

Tested on Mac OS High Sierra 10.13.6, same error issue.

jgroman commented 5 years ago

As a workaround it is possible to perform debug build after commenting out line 52 of \android\app\build.gradle.

KanybekMomukeyev commented 5 years ago

@jgroman Commented 52 line, but have following issue:

Launching lib\main.dart on Android SDK built for x86 in debug mode...
Built build\app\outputs\apk\debug\app-debug.apk.
I/flutter ( 4366): Observatory server failed to start after 1 tries
I/flutter ( 4366): Observatory server failed to start after 2 tries
I/flutter ( 4366): Observatory server failed to start after 3 tries
I/flutter ( 4366): Observatory server failed to start after 4 tries
I/flutter ( 4366): Observatory server failed to start after 5 tries
I/flutter ( 4366): Observatory server failed to start after 6 tries
I/flutter ( 4366): Observatory server failed to start after 7 tries
I/flutter ( 4366): Observatory server failed to start after 8 tries
I/flutter ( 4366): Observatory server failed to start after 9 tries
I/flutter ( 4366): Observatory server failed to start after 10 tries
I/flutter ( 4366): Observatory server failed to start after 11 tries
I/flutter ( 4366): Could not start Observatory HTTP server:
I/flutter ( 4366): SocketException: Failed to create server socket (OS Error: Permission denied, errno = 13), address = 127.0.0.1, port = 0
I/flutter ( 4366): #0      _NativeSocket.bind (dart:io/runtime/binsocket_patch.dart:573:7)
I/flutter ( 4366): <asynchronous suspension>
I/flutter ( 4366): #1      _RawServerSocket.bind (dart:io/runtime/binsocket_patch.dart:1166:26)
I/flutter ( 4366): #2      _ServerSocket.bind (dart:io/runtime/binsocket_patch.dart:1422:29)
I/flutter ( 4366): #3      ServerSocket.bind (dart:io/runtime/binsocket_patch.dart:1413:26)
I/flutter ( 4366): #4      _HttpServer.bind (dart:_http/http_impl.dart:2524:25)
I/flutter ( 4366): #5      HttpServer.bind (dart:_http:364:19)
I/flutter ( 4366): #6      Server.startup.poll (dart:vmservice_io/server.dart:352:36)
I/flutter ( 4366): <asynchronous suspension>
I/flutter ( 4366): #7      Server.startup (dart:vmservice_io/server.dart:364:23)

flutter doctor -v

[√] Flutter (Channel dev, v1.1.2, on Microsoft Windows [Version 10.0.17134.471], locale ru-KG)
    • Flutter version 1.1.2 at C:\src\flutter
    • Framework revision d675bbbd3a (5 days ago), 2018-12-14 10:59:31 -0500
    • Engine revision 101b27da7a
    • Dart version 2.1.0 (build 2.1.0-dev.9.4 f9ebf21297)
jgroman commented 5 years ago

You must also enable Android app INTERNET permission for Flutter debug server by uncommenting line 8 in \android\app\src\main\AndroidManifest.xml (See comment above that line).

aleksanderwozniak commented 5 years ago

@KanybekMomukeyev This error happened because master branch was used for release builds (so it had different signing in gradle file, and removed redundant INTERNET permission in Manifest) - I've added prod branch, which will handle that.

You should now be able to build directly from master branch.

Closing for now, let me know if you run into any issues.