Packr不工作 [英] Packr not working

查看:222
本文介绍了Packr不工作的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想导出我的LibGDX游戏,但是当我尝试使用此配置运行packr:

I want to export my LibGDX game, but when I try to run packr with this config:

{
"platform": "windows",
"jdk": "openjdk-1.7.0-u45-unofficial-icedtea-2.4.3-windows-i586-image.zip",
"executable": "LibGDX",
"appjar": "LibGDX5.jar",
"mainclass": "cz/vilix/main/Desktop",
"vmargs": [
   "-Xmx1G"
],
"resources": [

],
"minimizejre": "soft",
"outdir": "out"
}

我在控制台中得到这个输出:

I get this output in the console:

但是一切似乎都到位了:

But everything seems to be in place:

我在'out'目录中得到以下输出(显然,运行42KB exe文件不起作用):

And I get the following output in the 'out' directory (obviously, running the 42KB exe file doesn't work):

这是conte nt的.jar文件:

This is the content of the .jar file:

我认为由于没有指定res文件夹可能无法正常工作,但我不知道要解决它。

I think it might not be working due to not specifying res folder, but I don't know to fix it.

我尝试创建一个新的xml文件pom.xml,其中包含以下内容:

I've tried creating a new xml file pom.xml, which contains this:

<dependency>
    <groupId>com.badlogicgames.packr</groupId>
    <artifactlId>packr</artifactlId>
    <version>1.1</version>
</dependency>

将config.json更改为包含以下内容:

changed the config.json to contain this:

"resources": [
    "pom.xml"
],

除了包含pom.xml文件外,输出文件夹看起来一样。而且现在我得到这个错误:

The output folder looks the same, except there is the pom.xml file included. And also now I get this error:

推荐答案

有很多问题..

slf4j库将来自pom.xml中的Maven依赖关系

The slf4j library would come from the Maven dependecy from the pom.xml

pom.xml将如图所示

The pom.xml would look like

<dependency>
  <groupId>com.badlogicgames.packr</groupId>
  <artifactlId>packr</artifactlId>
  <version>1.1</version>
</dependency>

如果您查看Packr自述文件,您会注意到,在调用JAR时,您可以指定pom.xml或设置为配置

If you look at the Packr Readme you notice that you specificy the pom.xml either when calling the JAR or set as a config

java -jar packr.jar .... -resources pom.xml ...

或config.json

or in config.json

{

  ...
  ...

  "resources": ["pom.xml"],

  ...
}

阅读自述文件,并按照它解决问题< a href =https://github.com/libgdx/packr =nofollow> https://github.com/libgdx/packr

Read the readme and follow it to fix the issues https://github.com/libgdx/packr

这篇关于Packr不工作的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆