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

NDK Library files are in the wrong directory? #25

Closed
xiphirx opened this issue Jan 3, 2014 · 8 comments
Closed

NDK Library files are in the wrong directory? #25

xiphirx opened this issue Jan 3, 2014 · 8 comments
Assignees
Labels

Comments

@xiphirx
Copy link

xiphirx commented Jan 3, 2014

I have included the project via maven in eclipse, and when I attempt to run my project I receive the following error,

image

I'm aware of the force error option and I have it disabled. The odd thing is that I have other JARs in this project that also include native libraries, and they allow the project to build just fine, they also don't have the files in lib/, but in libs/...

@laurencedawson
Copy link

I noticed this with Eclipse but it works fine with Android Studio.

@ghost ghost assigned koral-- Jan 3, 2014
@xiphirx
Copy link
Author

xiphirx commented Jan 3, 2014

How is the support for the NDK in Android studio? Well built or still obviously beta?

@laurencedawson
Copy link

Not great...

@koral--
Copy link
Owner

koral-- commented Jan 4, 2014

@xiphirx what do you mean by "I have included the project via maven in eclipse"?
There should be no .jar file when using maven since packaging is set to apklib not jar.

UPDATE:
It seems that you have android-gif-drawable-1.0.4.jar referenced somehow which is not needed when using maven.
Anyway I've updated README.md adding <type> tag inside <dependency>.
According to #10 native libraries should be located in lib, not libs, but having them in JAR is not well supported by eclipse so using APKLIB or maven dependency will be better.

@xiphirx
Copy link
Author

xiphirx commented Jan 5, 2014

I mean that I added the maven dependency to my pom file and tried to build in eclipse...

I didn't copy over the jar at all. However I managed to get it working by copying over your package and the native files, and so im just compiling it alongside my project now :/

@koral--
Copy link
Owner

koral-- commented Jan 5, 2014

Does android-gif-drawable-1.0.4.jar exist in your local maven repo?

@xiphirx
Copy link
Author

xiphirx commented Jan 5, 2014

Ah right sorry, I believe I did put the JAR in our maven repo.

Anyway, it seems like that error message isn't supposed to be an error message, but more of a warning, according to this https://groups.google.com/d/msg/android-ndk/u1v64AapyKI/vUuaW2Vs62oJ

If you want, you can put the .so file into the assets folder and copy it over at runtime as described here https://www.crittercism.com/packaging-android-libraries-with-native-code/

or you can just provide the pre-built .so file in the git repo under libs/ and let people just link the project in Eclipse (probably the most favorable solution)

@koral--
Copy link
Owner

koral-- commented Jan 6, 2014

Thanks! Good idea with pre-built .so files in repo. I've added them in fe93d22.

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

No branches or pull requests

3 participants