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

使用implementation 'io.github.xmaihh:serialport:2.1' 编译失败 #17

Closed
xmaihh opened this issue Jun 23, 2022 · 2 comments
Closed

使用implementation 'io.github.xmaihh:serialport:2.1' 编译失败 #17

xmaihh opened this issue Jun 23, 2022 · 2 comments

Comments

@xmaihh
Copy link
Owner

xmaihh commented Jun 23, 2022

报错信息:

Execution failed for task ':app:desugarDebugFileDependencies'.
> Could not resolve all files for configuration ':app:debugRuntimeClasspath'.
   > Could not find :unspecified:.
     Required by:
         project :app > io.github.xmaihh:serialport:2.1
@xmaihh
Copy link
Owner Author

xmaihh commented Jun 23, 2022

迁移至MavenCentral的时候,Library 如果没有使用架包就把这句话删掉或者注释掉,实测它会再你的 pom 文件里添加一个叫unspecified的依赖,导致使用你库的人找不到这个依赖从而编译失败。

// implementation fileTree(dir: 'libs', include: ['*.jar'])

查看serialport-2.1.pom果然多了一个叫unspecified的依赖

<dependency>
	<groupId/>
	<artifactId>unspecified</artifactId>
	<version/>
</dependency>

临时解决办法

引入依赖的时候排除unspecified包

    implementation ('io.github.xmaihh:serialport:2.1'){
        exclude module: 'unspecified'
    }

@xmaihh
Copy link
Owner Author

xmaihh commented Jun 23, 2022

使用 implementation 'io.github.xmaihh:serialport:2.1.1' 解决这个问题

@xmaihh xmaihh closed this as completed Jun 23, 2022
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

1 participant