找回密码
 加入最MC
搜索
热搜: 活动 交友 discuz
查看: 684|回复: 3

关于附属mod发布问题

[复制链接]
发表于 2016-1-17 07:37:31 | 显示全部楼层 |阅读模式
悬赏20MC币未解决
这是一个非常坑爹的问题
我做的是附属Mod但是我在dependencies里加
compile fileTree(dir: 'libs', include: ['*.jar'])
就没法gradlew build
Mod已经做好了到底该如何导出成jar
(eclipse的导出没用)

 楼主| 发表于 2016-1-17 07:45:34 | 显示全部楼层
本帖最后由 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')
回复

使用道具 举报

 楼主| 发表于 2016-1-17 10:18:27 | 显示全部楼层
你们不用回答我了
我自己一个全部解决了
回复

使用道具 举报

 楼主| 发表于 2016-1-17 10:22:04 | 显示全部楼层
为了别人遇到同样的错误我吧解决方法弄出来:
添加依赖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

本版积分规则

Archiver|手机版|小黑屋|最MC论坛 ( 粤ICP备12035413号 )

GMT+8, 2026-12-1 06:07 , Processed in 0.109056 second(s), 20 queries .

Powered by Discuz! X5.0

© 2001-2026 Discuz! Team.

快速回复 返回顶部 返回列表