[英]Intellij Idea lib folder export
I am using IntelliJ Idea
for the java libgdx
development. 我正在将IntelliJ Idea
用于Java libgdx
开发。 I have 3 android/desktop modules which shares the same libgdx
libraries. 我有3个android / desktop模块,它们共享相同的libgdx
库。 Currently i put libgdx libs in all 3 android/desktop modules. 目前,我将libgdx库放到所有3个android / desktop模块中。 But its going to be more than 10 modules. 但是它将超过10个模块。 And its a pain process. 这是一个痛苦的过程。
So what i did is, created a common android/desktop lib folder in aa root level and added that folder as a lib dependency in each android/desktop module. 所以我要做的是,在根级别创建一个常见的android / desktop lib文件夹,并将该文件夹作为lib依赖项添加到每个android / desktop模块中。 Desktop compiles and runs fine. 桌面可以编译并正常运行。 But Android app compiles but not running. 但是Android应用可以编译但无法运行。 I am getting this error 我收到此错误
"caused by com.badlogic.gdx.utils.GdxRuntimeException couldn't load shared library 'gdx' for target: Linux, 32-bit" “由com.badlogic.gdx.utils.GdxRuntimeException引起的无法为目标加载共享库'gdx':Linux,32位”
I opened generated apk
, it doesnt have the libgdx jar files. 我打开了生成的apk
,它没有libgdx jar文件。 Even I tried setting export option for android libs in module settings. 即使我尝试在模块设置中为android libs设置导出选项。 But its not working. 但是它不起作用。 Check the screenshot 检查截图
I wanted the idea to export the linked referenced libraries to apk bundle. 我想要将链接的引用库导出到apk捆绑包的想法。 is there a way? 有办法吗?
Problem is by default android modulle looks for the reference libraries under the lib folder of the particular module itself. 问题是默认情况下android modulle在特定模块本身的lib文件夹下查找参考库。 I resolved this by changing Native libs directory from the module lib to the root lib. 我通过将本机库目录从模块库更改为根库来解决此问题。 It works fine now. 现在工作正常。 Attached the screenshot for reference 随附屏幕截图以供参考
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.