Skip to content

A problem occurred evaluating project ':usb_serial'. #69

@TyphoonWu

Description

@TyphoonWu

After merge #57

Build failure, logs:

flutter build apk --release

FAILURE: Build completed with 2 failures.

1: Task failed with an exception.
-----------
* Where:
Build file 'C:\Users\****\AppData\Local\Pub\Cache\hosted\pub.dev\usb_serial-0.5.2\android\build.gradle' line: 7

* What went wrong:
A problem occurred evaluating project ':usb_serial'.
> Could not find method jcenter() for arguments [] on repository container of type org.gradle.api.internal.artifacts.dsl.DefaultRepositoryHandler.    

* 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 from a Build Scan (powered by Develocity).
> Get more help at https://help.gradle.org.
==============================================================================

2: Task failed with an exception.
-----------
* What went wrong:
A problem occurred configuring project ':usb_serial'.
> Failed to notify project evaluation listener.
   > java.lang.NullPointerException (no error message)
   > java.lang.NullPointerException (no error message)

* 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 from a Build Scan (powered by Develocity).
> Get more help at https://help.gradle.org.
==============================================================================

BUILD FAILED in 3s

The fix is to modify C:\Users****\AppData\Local\Pub\Cache\hosted\pub.dev\usb_serial-0.5.2\android\build.gradle
Change:

jcenter()

to:

mavenCentral()

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions