欢迎您访问365答案网,请分享给你的朋友!
生活常识 学习资料

近期错误,JitPack编译出错

时间:2023-07-08
1、布局引用失效

导入的R包为库的,与xml位置包名不相同

2、gson转换失败

onclick之前adapter初始化列表中进行转换loop报错
在使用前先转换分别存储再使用

3、jitPack错误-> 添加id ‘maven-publish’

Gradle ‘publishToMavenLocal’ task not found、Please add the ‘maven-publish’ or ‘maven’ plugin.

4、jitPack错误-> id ‘kotlin-android-extensions’ 改为buildFeatures {viewBinding true }

The ‘kotlin-android-extensions’ Gradle plugin is deprecated.

5、jitPack错误-> ERROR: No build artifacts found;Expected artifacts in: $HOME/.m2/repository/XX/YY/unspecified

尝试implementation "org.jetbrains.kotlin:kotlin-stdlib:1.5.20"后gradle下android花括号内添加

afterevaluate { publishing { def versionName = "1.0" publications { // Creates a Maven publication called "release". release(MavenPublication) { // Applies the component for the release build variant. from components.release // You can then customize attributes of the publication as shown below. groupId = 'com.XX.XX' artifactId = 'library' version = versionName } } } }

6、jitPack改到过年终于通过了!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

Copyright © 2016-2020 www.365daan.com All Rights Reserved. 365答案网 版权所有 备案号:

部分内容来自互联网,版权归原作者所有,如有冒犯请联系我们,我们将在三个工作时内妥善处理。