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

Gradle 7注解@Input失效导致无法打包 #364

Open
MortalKim opened this issue Jun 12, 2021 · 20 comments
Open

Gradle 7注解@Input失效导致无法打包 #364

MortalKim opened this issue Jun 12, 2021 · 20 comments

Comments

@MortalKim
Copy link

参照Gradle7的文档中的描述,需要替换注解:

Incorrect use of the @Input annotation
This error indicates that a property is annotated with @Input, but that it should be annotated with @InputFile or @InputDirectory instead.

If you use the @Input annotation on a file-based property, Gradle wouldn’t consider the file contents, or the directory contents, as inputs, as you might expect.

To fix this problem, you need to tell Gradle if the file property represents an input file, in which case you should annotate it with @InputFile, or a directory, in which case it should be annotated with @InputDirectory. If what you really wanted to say is that the actual file path is an input, then you should return a String instead which corresponds to the absolute path of the file.

如果打包的话会报如下错误

* What went wrong:
Some problems were found with the configuration of task ':app:assembleReleaseChannels' (type 'ChannelMaker').
  - Type 'com.meituan.android.walle.ChannelMaker' field 'targetProject' without corresponding getter has been annotated with @Input.

    Reason: Annotations on fields are only used if there's a corresponding getter for the field.

    Possible solutions:
      1. Add a getter for field 'targetProject'.
      2. Remove the annotations on 'targetProject'.

    Please refer to https://docs.gradle.org/7.0.2/userguide/validation_problems.html#ignored_annotations_on_field for more details about this problem.
  - Type 'com.meituan.android.walle.ChannelMaker' field 'variant' without corresponding getter has been annotated with @Input.

    Reason: Annotations on fields are only used if there's a corresponding getter for the field.

    Possible solutions:
      1. Add a getter for field 'variant'.
      2. Remove the annotations on 'variant'.

    Please refer to https://docs.gradle.org/7.0.2/userguide/validation_problems.html#ignored_annotations_on_field for more details about this problem.

希望能尽快修复,谢谢

@258188170
Copy link

怎么解决的

@MortalKim
Copy link
Author

怎么解决的

并没有解决,只能回退到6.9了,或者自己fork一个把这几个不兼容的注解改一下,谷歌给了方案,就在错误日志的链接里

@Vigroid
Copy link

Vigroid commented Sep 7, 2021

给他们提了个PR,我本地改动walle后测了下没发现问题。#368

@MortalKim
Copy link
Author

给他们提了个PR,我本地改动walle后测了下没发现问题。#368

非常感谢,哈哈哈这事是我懒了,提了之后没管它。
非常感谢大佬的工作~祝生活愉快

@scsfwgy
Copy link

scsfwgy commented Nov 17, 2021

+1,要兼容gradle7了

@SheepYang1993
Copy link

官方快点升级呀~~~!!!

@nshzzu130
Copy link

啥时候会升级啊

@kongqw
Copy link

kongqw commented Dec 21, 2021

催更

@lcj168
Copy link

lcj168 commented Jan 19, 2022

这个啥时候能适配

@LuoGuoXin
Copy link

催更 都2022年了

@huhuang03
Copy link

给他们提了个PR,我本地改动walle后测了下没发现问题。#368

大佬。有什么办法使用本地吗?

@YouthLee
Copy link

YouthLee commented Mar 8, 2022

日常催更啊,美团大哥快点啊

@czy1121
Copy link

czy1121 commented Mar 22, 2022

2年没更新了,已经不维护了吧

@MortalKim
Copy link
Author

已经转用Google 官方的Flavor了,可以实现walle的分渠道功能,也用不了几行代码

@huhuang03
Copy link

官方的Flavro有个缺点是每打一个渠道包要重新编译。不太好配合使用热更新。

类似walle的插件有腾讯的VasDolly。还在维护中。

@Petterpx
Copy link

Petterpx commented Jun 4, 2022

这个库已经两年没维护了,我fork了一份新的,已适配agp7.x, 详见:https://github.com/Petterpx/walle

@scsfwgy
Copy link

scsfwgy commented Jun 6, 2022

这个库已经两年没维护了,我fork了一份新的,已适配agp7.x, 详见:https://github.com/Petterpx/walle

能否适配一下谷歌商店的aab格式? @Petterpx

@Petterpx
Copy link

Petterpx commented Jun 6, 2022

这个库已经两年没维护了,我fork了一份新的,已适配agp7.x, 详见:https://github.com/Petterpx/walle

能否适配一下谷歌商店的aab格式? @Petterpx

短时间内应该不能,适配7.x比较简单。aab的话,还没有看过walle具体的源码,可以关注一下等等我后续适配。
其他方式上,对于googleplay,我们目前是单独对应了一个分支(有些组件googleplay不允许存在),所以你可以将渠道写死在本地逻辑里即可。 @scsfwgy

@hewh7
Copy link

hewh7 commented Sep 28, 2022

这个库已经两年没维护了,我fork了一份新的,已适配agp7.x, 详见:https://github.com/Petterpx/walle

jitpack库我添加了, 但是根据你的依赖同步不了

@Petterpx
Copy link

这个库已经两年没维护了,我fork了一份新的,已适配agp7.x, 详见:https://github.com/Petterpx/walle

jitpack库我添加了, 但是根据你的依赖同步不了

jitpack 官方出现问题导致,等待即可。

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