最MC论坛

标题: 关于附属mod发布问题 [打印本页]

作者: Buff_Lemon    时间: 2016-1-17 07:37
标题: 关于附属mod发布问题
这是一个非常坑爹的问题
我做的是附属Mod但是我在dependencies里加
compile fileTree(dir: 'libs', include: ['*.jar'])
就没法gradlew build
Mod已经做好了到底该如何导出成jar
(eclipse的导出没用)

作者: Buff_Lemon    时间: 2016-1-17 07:45
本帖最后由 Buff_Lemon 于 2016-1-17 10:16 编辑

那个错误没了
但是出现了这个错误:
* What went wrong:
A problem occurred evaluating root project 'ForgeSrc'.
> Cannot convert the provided notation to an object of type Dependency: C:\Users\Administrator\Desktop\Mods_\ForgeSrc\build\libs\Baubles-deobf-1.7.10-1.0.1.10.jar.
  The following types/formats are supported:
    - Instances of Dependency.
    - String or CharSequence values, e.g. 'org.gradle:gradle-core:1.0'.
    - Maps, e.g. [group: 'org.gradle', name: 'gradle-core', version: '1.0'].
    - FileCollections, e.g. files('some.jar', 'someOther.jar').
    - Projects, e.g. project(':some:project:path').
    - ClassPathNotation, e.g. gradleApi().

添加代码为:

compile file('build/libs/Baubles-deobf-1.7.10-1.0.1.10.jar')
作者: Buff_Lemon    时间: 2016-1-17 10:18
你们不用回答我了
我自己一个全部解决了
作者: Buff_Lemon    时间: 2016-1-17 10:22
为了别人遇到同样的错误我吧解决方法弄出来:
添加依赖jar
在build.gradle这个文件中的第2个dependencies添加   compile files('jar路径')
比如我的   compile files('build/libs/Baubles-deobf-1.7.10-1.0.1.10.jar')
接着一切正常
参考:http://www.winotmk.com/2015/09/169




欢迎光临 最MC论坛 (http://www.zuimc.com/) Powered by Discuz! X3.2