assimp
assimp copied to clipboard
Building on latest Android Studio project with assimp version 4.0
Hello,
I have an Android OpenGL project and am trying to use assimp to load some 3D models in my project. In my build.gradle
file, I included this:
implementation "com.github.kotlin-graphics:assimp:4.0"
However, my project fails to build. The first error I see is the following:
More than one file was found with OS independent path 'libglfw.so.sha1'
Any ideas on how to workaround this? When I tried excluding this in the gradle packagingOptions
(which I don't think is a good idea, but I tried anyway), I got additional More than one file was found ...
errors. All in all, these are the ones that caused the conflict:
libglfw.so.sha1
liblwjgl_opengl.so.sha1
libglfw_wayland.so.sha1
liblwjgl.so.sha1
liblwjgl_stb.so.sha1
logo-mini.png
libopenal.so.sha1
libjemalloc.so.sha1
Any ideas on how to work around this?
I also have the following in my project level build.gradle
file:
allprojects {
repositories {
google()
jcenter()
maven { url "https://repo.eclipse.org/content/repositories/paho-snapshots/" }
maven { url "https://dl.bintray.com/kotlin/kotlin-dev" }
maven { url "https://dl.bintray.com/kotlin/kotlin-eap" }
maven { url "https://oss.sonatype.org/content/repositories/snapshots/" }
maven { url 'https://jitpack.io' }
}
}
Additional follow-up:
Just for kicks I decided to add the exclude
keyword on those items that complained of a More than one file was found ...
error. I was able to build my project, but upon calling readFile
, not surprisingly, it crashed and complained of a java.lang.NoClassDefFoundError
, which I'm guessing is the result of excluding the files above
2020-01-17 17:40:13.800 8623-8623/? E/AndroidRuntime: FATAL EXCEPTION: main
Process: com.shieldai.dendro2.dev.debug, PID: 8623
java.lang.NoClassDefFoundError: Failed resolution of: Ljavax/imageio/ImageIO;
at gli_.load$DefaultImpls.loadImage(load.kt:41)
at gli_.gli.loadImage(gli.kt:4)
at gli_.load$DefaultImpls.load(load.kt:30)
at gli_.gli.load(gli.kt:4)
at assimp.format.obj.ObjFileImporter.loadTextures(ObjFileImporter.kt:421)
at assimp.format.obj.ObjFileImporter.createDataFromImport(ObjFileImporter.kt:78)
at assimp.format.obj.ObjFileImporter.internReadFile(ObjFileImporter.kt:51)
at assimp.BaseImporter.readFile(BaseImporter.kt:63)
at assimp.Importer.readFile(Importer.kt:370)
at assimp.Importer.readFile(Importer.kt:308)