Git Product home page Git Product logo

Comments (7)

fxthomas avatar fxthomas commented on July 28, 2024
  • How did it crash? "It crashed" is not exactly easy to debug ;)
  • Can you try adding proguardOptions += "-keep class net.sourceforge.zbar.** { *; }" to your settings, then clean and rebuild?
  • If that didn't work, what's the output of the show unmanaged-jars SBT command? Can you run (in a terminal) dexdump target/classes-*.dex | grep "Class descr" and tell me if you see any of ZBar's classes?

from android-plugin.

appamatto avatar appamatto commented on July 28, 2024

Does proguard have anything to do with the native libraries? We have special handling for dependencies which are native libraries (only) but I'm not sure that the native libraries get copied if they are simply inside a JAR file.

from android-plugin.

Marvin182 avatar Marvin182 commented on July 28, 2024
  • it crashes the moment I'm loading the native library using "System.loadLibrary("iconv")""
  • keeping the net.sourceforge,zbar classes - I tried it, but it did not change anything
  • show unmananged-jars:

[info] ArrayBuffer(Attributed(C:\Users\Marvin\Dropbox\workspace\TicketChecker\lib\zbar.jar), Attributed(C:\Portables\and
roid-sdk\sdk\platforms\android-16\android.jar), Attributed(C:\Portables\android-sdk\sdk\platforms\android-16\android.jar
), Attributed(C:\Portables\android-sdk\sdk\platforms\android-16\android.jar))

  • dexdump target/classes-*.dex | grep "Class descr" => yes, for example "Class descriptor : 'Lnet/sourceforge/zbar/ImageScanner;'"
  • I don't know wether it is sbt or proguard that is missing the .so files, but I though proguard is just filtering the classes in jar files and not native libraries

from android-plugin.

Marvin182 avatar Marvin182 commented on July 28, 2024

I uploaded the project to https://github.com/Marvin182/TicketChecker

from android-plugin.

fxthomas avatar fxthomas commented on July 28, 2024

@appamatto, I don't think native libraries inside JARs are included either, but I could be wrong, I have never tested that a lot.

@Marvin182 : Actually, just put the .so files inside ./src/main/libs (so you'll have ./src/main/libs/armeabi/... and so on). The JARs stay inside ./lib/, and it works for me. It was probably done that way to be able to use the NDK more easily, but... that shouldn't be so hard for simple projects like yours. I'll look into it!

from android-plugin.

Marvin182 avatar Marvin182 commented on July 28, 2024

wtf -.-
I spend hours on searching for a solution, but it was never mentioned that the libs should be in src/main/libs ...

Thank you! :)

from android-plugin.

fxthomas avatar fxthomas commented on July 28, 2024

Took me a while to guess as well.

For the record, when I tried running show native<TAB> after a while, it showed me a list of exactly one potential candidate setting, and then it didn't take me long to guess that natives-lib-path was where SBT looked for .so files... Could be handy next time you have an issue like that!

Anyway, this sucks, I think I'll try to change that to be the same as the JARs, plus it makes no sense (besides catering to old-style Ant Android projects) to put libs inside src/main, as I don't see any source in .so files!

(Added this to the wiki)

from android-plugin.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.