I'm trying to test out the ShinobiCharts for Android library. I have included the library folder as a project dependency (I'm on Intellij), and all the relevant classes (e.g. ShinobiChart, ChartFragment, etc) compile just fine. But when I run the project, I get the following error: java.lang.UnsatisfiedLinkError: Couldn't load shinobicharts-android from loader dalvik.system.PathClassLoader
. I don't understand how the libraries can compile fine but then fail at runtime. Any ideas?
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试):
问题:
回答1:
Solution: for both IntelliJ and Eclipse, ignore the instructions provided by ShinobiCharts for adding the library as a project, or adding a Jar to the build path, etc. Instead, navigate to the libs folder in the ShinobiCharts download (i.e. shinobichart-android-library/libs), and then do either: (a) if you already have a libs folder, copy the contents of this folder (i.e. not the folder itself) into the libs folder inside your project; or (b) if you don't have a libs folder in the project already, just copy the entire libs folder into your project. Only then will Intellij/Eclipse figure out where the files are at runtime.