Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Building on latest Android Studio project with assimp version 4.0 #25

Open
acespring78 opened this issue Jan 18, 2020 · 2 comments
Open

Comments

@acespring78
Copy link

acespring78 commented Jan 18, 2020

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?

@acespring78 acespring78 changed the title Building on latest Android Studio project + build.gradle Building on latest Android Studio project with version 4.0 Jan 18, 2020
@acespring78 acespring78 changed the title Building on latest Android Studio project with version 4.0 Building on latest Android Studio project with assimp version 4.0 Jan 18, 2020
@acespring78
Copy link
Author

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' }
    }
}

@acespring78
Copy link
Author

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)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant