<legend id='dPiRh'><style id='dPiRh'><dir id='dPiRh'><q id='dPiRh'></q></dir></style></legend>
  • <i id='dPiRh'><tr id='dPiRh'><dt id='dPiRh'><q id='dPiRh'><span id='dPiRh'><b id='dPiRh'><form id='dPiRh'><ins id='dPiRh'></ins><ul id='dPiRh'></ul><sub id='dPiRh'></sub></form><legend id='dPiRh'></legend><bdo id='dPiRh'><pre id='dPiRh'><center id='dPiRh'></center></pre></bdo></b><th id='dPiRh'></th></span></q></dt></tr></i><div id='dPiRh'><tfoot id='dPiRh'></tfoot><dl id='dPiRh'><fieldset id='dPiRh'></fieldset></dl></div>
  • <tfoot id='dPiRh'></tfoot>

    <small id='dPiRh'></small><noframes id='dPiRh'>

          <bdo id='dPiRh'></bdo><ul id='dPiRh'></ul>

        无法将 gdx-tools 添加到 libgdx gradle 项目

        时间:2023-05-19
      1. <i id='MOePQ'><tr id='MOePQ'><dt id='MOePQ'><q id='MOePQ'><span id='MOePQ'><b id='MOePQ'><form id='MOePQ'><ins id='MOePQ'></ins><ul id='MOePQ'></ul><sub id='MOePQ'></sub></form><legend id='MOePQ'></legend><bdo id='MOePQ'><pre id='MOePQ'><center id='MOePQ'></center></pre></bdo></b><th id='MOePQ'></th></span></q></dt></tr></i><div id='MOePQ'><tfoot id='MOePQ'></tfoot><dl id='MOePQ'><fieldset id='MOePQ'></fieldset></dl></div>
      2. <tfoot id='MOePQ'></tfoot>
          <bdo id='MOePQ'></bdo><ul id='MOePQ'></ul>
                <tbody id='MOePQ'></tbody>

              <small id='MOePQ'></small><noframes id='MOePQ'>

              <legend id='MOePQ'><style id='MOePQ'><dir id='MOePQ'><q id='MOePQ'></q></dir></style></legend>

                  本文介绍了无法将 gdx-tools 添加到 libgdx gradle 项目的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

                  问题描述

                  限时送ChatGPT账号..

                  我是 Gradle 的新手.我正在尝试将 gdx-tools 添加到我的项目中:

                  I'm new in Gradle. I'm trying to add gdx-tools to my project:

                  project(":desktop") {
                      apply plugin: "java"
                  
                  
                      dependencies {
                          compile project(":core")
                          compile "com.badlogicgames.gdx:gdx-backend-lwjgl:$gdxVersion"
                          compile "com.badlogicgames.gdx:gdx-platform:$gdxVersion:natives-desktop"
                          compile "com.badlogicgames.gdx:gdx-box2d-platform:$gdxVersion:natives-desktop"   
                          compile "com.badlogicgames.gdx:gdx-tools:$gdxVersion"
                      }
                  }
                  

                  我打开我的桌面项目,文件夹Gradle Dependecies"并看到gdx-tools-1.0.1.jar".当我尝试打开它时 - 没有显示.

                  I open my Desktop project, folder "Gradle Dependecies" and see "gdx-tools-1.0.1.jar". As I try to open it - nothing shows.

                  所以,当我尝试使用它时(我想尝试将图像打包到图集) - 我无法导入 com.badlogic.gdx.tools...

                  So, when I try to use it ( I want to try pack images to atlas) - I can't import com.badlogic.gdx.tools...

                  我做错了什么?

                  推荐答案

                  我也遇到了同样的问题.所以我把com.badlogicgames.gdx:gdx-tools:1.9.2"放到我的浏览器中,看看它把我带到了哪里.(1.9.2 是我的 gdxVersion)果然没有把我带到一个页面,而是一个搜索结果.我跟着第一个:

                  I had the same problem. So I put "com.badlogicgames.gdx:gdx-tools:1.9.2" into my browser to see where it took me. (1.9.2 being my gdxVersion) Sure enough it did not take me to a page but to a search result. I followed the first one:

                  http://mvnrepository.com/artifact/com.badlogicgames.gdx/gdx-tools/1.5.2

                  其中说有一个新版本 - 1.9.2(嗯,呃 - 这就是我想要达到的.谢天谢地,有一个链接,我关注它.)

                  Which says there is a new version - 1.9.2 (well, duh - that's what I'm trying to reach. Thankfully, there's a link and I follow it.)

                  http://mvnrepository.com/artifact/com.badlogicgames.gdx/gdx-tools/1.9.2

                  现在,在页面的中上部,您会看到一个标签框,中间有代码.选择 Gradle 并复制该代码.

                  Now, in the upper center of the page you'll see a tabbed box with code in the middle. Select Gradle and copy that code.

                  回到你的 Gradle 文件中添加:

                  Back in your Gradle file add:

                  编译(粘贴)

                  或者,在我的特殊情况下:

                  Or, in my particular case:

                  compile 'com.badlogicgames.gdx:gdx-tools:1.9.2'
                  

                  现在点击同步.这行得通,但我担心硬编码 gdxVersion 号码,所以我玩了一下.如果您将 1.9.2 替换为 $gdxVersion 并将单引号 (') 替换为双引号 (") 它应该同步.所以现在我的 Gradle 行如下所示:

                  Now hit sync. This worked but I was worried about hard coding the gdxVersion number so I played around. If you replace the 1.9.2 with $gdxVersion and the single quotes (') with double quotes (") it should sync. So now my Gradle line looks like this:

                  compile "com.badlogicgames.gdx:gdx-tools:$gdxVersion"
                  

                  为什么?这似乎与我首先尝试的版本相同.我不知道.但这些是导致我成功同步的步骤.

                  Why? This seems identical to the version I tried first. I don't know. But these are the steps that led to a successful sync for me.

                  这篇关于无法将 gdx-tools 添加到 libgdx gradle 项目的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持html5模板网!

                  上一篇:库GDX .绘制多行文本 下一篇:java.lang.NoClassDefFoundError (libgdx)

                  相关文章

                  最新文章

                  <small id='83zU8'></small><noframes id='83zU8'>

                  • <bdo id='83zU8'></bdo><ul id='83zU8'></ul>
                • <legend id='83zU8'><style id='83zU8'><dir id='83zU8'><q id='83zU8'></q></dir></style></legend>
                    <i id='83zU8'><tr id='83zU8'><dt id='83zU8'><q id='83zU8'><span id='83zU8'><b id='83zU8'><form id='83zU8'><ins id='83zU8'></ins><ul id='83zU8'></ul><sub id='83zU8'></sub></form><legend id='83zU8'></legend><bdo id='83zU8'><pre id='83zU8'><center id='83zU8'></center></pre></bdo></b><th id='83zU8'></th></span></q></dt></tr></i><div id='83zU8'><tfoot id='83zU8'></tfoot><dl id='83zU8'><fieldset id='83zU8'></fieldset></dl></div>

                      <tfoot id='83zU8'></tfoot>