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

Reports an error required minSdkVersion >= 26 #8

Closed
gone-phishing opened this issue Jan 28, 2018 · 23 comments
Closed

Reports an error required minSdkVersion >= 26 #8

gone-phishing opened this issue Jan 28, 2018 · 23 comments

Comments

@gone-phishing
Copy link

Hi,

I was trying to work with assimp-all.jar on an android project supporting API 21 and above. When I added this jar and tried to build the project, I get an error saying required mindSdkVersion >= 26. Since it was not mentioned on the README page, I am trying to confirm the same here. Also, if true, are there any plans for backward compatibility?

@Sylvyrfysh
Copy link
Collaborator

Sylvyrfysh commented Jan 28, 2018 via email

@Sylvyrfysh
Copy link
Collaborator

Also, can you compile your own? If so, try our android branch. It removes some code that only desktop java has. If that works, let me know and I'll bring it up to master

@gone-phishing
Copy link
Author

Sure, will redo the setup and post the logs here soon

@gone-phishing
Copy link
Author

Please find below the log while trying to build the project:
Error:com.android.builder.dexing.DexArchiveBuilderException: Failed to process /Users/gone-phishing/AndroidStudioProjects/sample1/app/libs/assimp-all.jar

Error:com.android.builder.dexing.DexArchiveBuilderException: Error while dexing org/lwjgl/opengl/GL.class

Error:com.android.dx.cf.code.SimException: invalid opcode ba (invokedynamic requires --min-sdk-version >= 26)

Error:Execution failed for task ':app:transformClassesWithDexBuilderForDebug'.

> com.android.build.api.transform.TransformException: com.android.builder.dexing.DexArchiveBuilderException: com.android.builder.dexing.DexArchiveBuilderException: Failed to process /Users/gone-phishing/AndroidStudioProjects/sample1/app/libs/assimp-all.jar

Information:BUILD FAILED in 6s

@gone-phishing
Copy link
Author

Also, in repeated build runs, the classname keeps changing like to this:
Error:com.android.builder.dexing.DexArchiveBuilderException: Error while dexing org/lwjgl/system/MemoryStack.class

or

Error:com.android.builder.dexing.DexArchiveBuilderException: Error while dexing org/lwjgl/glfw/GLFWErrorCallback$1.class

@Sylvyrfysh
Copy link
Collaborator

Funnily enough, I fixed the issue you were having about 5 minutes before you posted this. I'll link a working (may still be issues) build in a few minutes.

@Sylvyrfysh
Copy link
Collaborator

@elect86 paging you on the best way to do this: remove uno-sdk and add in the necessary functions, or remove LWJGL from uno (don't think that can happen).

In the mean time i'll see of I can do anything on my personal branch.

@gone-phishing
Copy link
Author

gone-phishing commented Jan 28, 2018

Thanks for your quick reply. Great that it is fixed :)

I see that you have posted a new release with the source code files. Though I will wait for you to upload the assimp-all.jar so that I can consume it directly.

@elect86
Copy link
Collaborator

elect86 commented Jan 28, 2018

Uhm ok.

Anyway, as far as I recall, the problem with Android was that there is no java.nio.File there

See also this previous issue

isn't that valid anymore?

@Sylvyrfysh
Copy link
Collaborator

@gone-phishing
Copy link
Author

gone-phishing commented Jan 29, 2018

@elect86 Yes, the readfile function was not supporting an input stream so I replaced the obj files from assets directory temporarily to a test directory for local testing, but this issue is somewhat different from that. (Update: When I use the assimp jar from 2016 pre-release, it builds successfully and then I hit this issue. There is something going wrong in between then)

@Sylvyrfysh In the jar you uploaded I could not find the AiScene and Importer classes as the packages are organized differently than the other jars. Can you please look into it? Also are there any previously released working jars supporting .obj with textures that I can try meanwhile?

@Sylvyrfysh
Copy link
Collaborator

@gone-phishing can you compile your own? I can later today, but the branch at https://github.com/kotlin-graphics/assimp/tree/no_nio should be working if you can roll your own

@Sylvyrfysh
Copy link
Collaborator

@gone-phishing
Copy link
Author

gone-phishing commented Jan 31, 2018

No, the jar you have linked above does not contain any assimp classes, rather it bundles all its dependencies. I could not find AiScene and Import classes inside the jar mentioned above and also with the jar you have linked 3 comments above. Can you please look into the jar and see if I have missed something? Below is the list of packages available in your mentioned assimp.jar:
screen shot 2018-01-31 at 17 04 04

I did not compile on my own as I do not have a Kotlin compiler though I will try to get one running for myself.

@Sylvyrfysh
Copy link
Collaborator

Thanks for finding that, apparently it did not include the actual code in the compilation, only the dependencies. I have fixed that, and confirmed that the updated jar at https://github.com/Sylvyrfysh/assimp/blob/master/assimp.jar has all the necessary files.

@gone-phishing
Copy link
Author

gone-phishing commented Jan 31, 2018

No, we are back to square one with the current jar. With the above-mentioned jar I am getting the same issue I reported earlier and adding the logs below:

Error:com.android.builder.dexing.DexArchiveBuilderException: Failed to process /Users/gone-phishing/AndroidStudioProjects/sample1/app/libs/assimp.jar
Error:com.android.builder.dexing.DexArchiveBuilderException: Error while dexing org/lwjgl/stb/LibSTB.class
Error:com.android.dx.cf.code.SimException: invalid opcode ba (invokedynamic requires --min-sdk-version >= 26)
Error:Execution failed for task ':app:transformClassesWithDexBuilderForDebug'.
com.android.build.api.transform.TransformException: com.android.builder.dexing.DexArchiveBuilderException: com.android.builder.dexing.DexArchiveBuilderException: Failed to process /Users/gone-phishing/AndroidStudioProjects/sample1/app/libs/assimp.jar

@Sylvyrfysh
Copy link
Collaborator

Download can be found at the same link, LWJGL has been removed and no errors were reported in my testing. Your mileage may vary.

@gone-phishing
Copy link
Author

Are you using methods: invoke or invokeExact in the source code somewhere as that might be the root cause of the problem as they require minSdkVersion 26 and above?

@Sylvyrfysh
Copy link
Collaborator

No, according to my search invoke only occurs in the test suite which I do not think I included. Can you post the error you're getting?

@gone-phishing
Copy link
Author

gone-phishing commented Feb 1, 2018 via email

@gone-phishing
Copy link
Author

@elect86
Copy link
Collaborator

elect86 commented Apr 2, 2018

so, which one was of the three options?

@gone-phishing
Copy link
Author

the first one i.e. ASM version being used by another jar had a version mismatch with the one required for this project. Regardless, @Sylvyrfysh @elect86 thanks for your patient support in helping me debug this issue, learnt a lot of things in between

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

3 participants