{"action":"created","issue":{"url":"https://api.github.com/repos/bbcallen/ijkplayer/issues/150","labels_url":"https://api.github.com/repos/bbcallen/ijkplayer/issues/150/labels{/name}","comments_url":"https://api.github.com/repos/bbcallen/ijkplayer/issues/150/comments","events_url":"https://api.github.com/repos/bbcallen/ijkplayer/issues/150/events","html_url":"https://github.com/bbcallen/ijkplayer/issues/150","id":53659643,"number":150,"title":"How to import this library in Android Studio ?","user":{"login":"fingerup","id":2444800,"avatar_url":"https://avatars.githubusercontent.com/u/2444800?v=3","gravatar_id":"","url":"https://api.github.com/users/fingerup","html_url":"https://github.com/fingerup","followers_url":"https://api.github.com/users/fingerup/followers","following_url":"https://api.github.com/users/fingerup/following{/other_user}","gists_url":"https://api.github.com/users/fingerup/gists{/gist_id}","starred_url":"https://api.github.com/users/fingerup/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fingerup/subscriptions","organizations_url":"https://api.github.com/users/fingerup/orgs","repos_url":"https://api.github.com/users/fingerup/repos","events_url":"https://api.github.com/users/fingerup/events{/privacy}","received_events_url":"https://api.github.com/users/fingerup/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":6,"created_at":"2015-01-07T17:42:35Z","updated_at":"2015-01-18T04:54:48Z","closed_at":null,"body":"I'm on Mac (no cygwin), i have run \"compile-ffmpeg.sh\" and \"compile-ijk.sh\" ,everything went well.\r\nIn Android Studio when i run Gradle (Sync Project with Gradle Files), everything is ok.\r\nBut i have this error when i start my application on device.\r\n\r\n```\r\njava.lang.UnsatisfiedLinkError: Couldn't load ijkffmpeg from loader dalvik.system.PathClassLoader[DexPathList[[zip file \"/data/app/myapp.test_videomosaic-2.apk\"],nativeLibraryDirectories=[/data/app-lib/myapp.test_videomosaic-2, /vendor/lib, /system/lib]]]: findLibrary returned null\r\n\tat java.lang.Runtime.loadLibrary(Runtime.java:358)\r\n\tat java.lang.System.loadLibrary(System.java:526)\r\n\tat tv.danmaku.ijk.media.player.IjkMediaPlayer$1.loadLibrary(IjkMediaPlayer.java:98)\r\n\tat tv.danmaku.ijk.media.player.IjkMediaPlayer.loadLibrariesOnce(IjkMediaPlayer.java:106)\r\n\tat tv.danmaku.ijk.media.player.IjkMediaPlayer.initPlayer(IjkMediaPlayer.java:147)\r\n\tat tv.danmaku.ijk.media.player.IjkMediaPlayer.<init>(IjkMediaPlayer.java:143)\r\n\tat tv.danmaku.ijk.media.player.IjkMediaPlayer.<init>(IjkMediaPlayer.java:135)\r\n\tat myapp.test_videomosaic.MainActivity$PlayRunnable$1.run(MainActivity.java:102)\r\n\tat java.lang.Thread.run(Thread.java:841)\r\n01 Force finishing activity myapp.test_videomosaic/.MainActivity\r\n```\r\n---\r\nI follow [this tuto][1] for import ijkplayer in Android Studio :\r\n* In project root directory create new folder: _libs_\r\n* I copy _ijkmediaplayer_ folder to _libs_\r\n* Add to settings.gradle : \r\n```\r\ninclude ':app', ':ijkmediaplayer'\r\nproject(':ijkmediaplayer').projectDir = new File('libs/ijkmediaplayer')\r\n```\r\n* Add to app/build.gradle : \r\n```\r\ncompile project(\":ijkmediaplayer\")\r\n```\r\n---\r\n\r\nCan you help me ?\r\n\r\n[1]: http://stackoverflow.com/questions/16588064/how-do-i-add-a-library-project-to-the-android-studio"},"comment":{"url":"https://api.github.com/repos/bbcallen/ijkplayer/issues/comments/70396588","html_url":"https://github.com/bbcallen/ijkplayer/issues/150#issuecomment-70396588","issue_url":"https://api.github.com/repos/bbcallen/ijkplayer/issues/150","id":70396588,"user":{"login":"thuantran","id":410960,"avatar_url":"https://avatars.githubusercontent.com/u/410960?v=3","gravatar_id":"","url":"https://api.github.com/users/thuantran","html_url":"https://github.com/thuantran","followers_url":"https://api.github.com/users/thuantran/followers","following_url":"https://api.github.com/users/thuantran/following{/other_user}","gists_url":"https://api.github.com/users/thuantran/gists{/gist_id}","starred_url":"https://api.github.com/users/thuantran/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/thuantran/subscriptions","organizations_url":"https://api.github.com/users/thuantran/orgs","repos_url":"https://api.github.com/users/thuantran/repos","events_url":"https://api.github.com/users/thuantran/events{/privacy}","received_events_url":"https://api.github.com/users/thuantran/received_events","type":"User","site_admin":false},"created_at":"2015-01-18T04:54:48Z","updated_at":"2015-01-18T04:54:48Z","body":"@fingerup I managed to compile 0.2.2 then using this guide http://www.shaneenishry.com/blog/2014/08/17/ndk-with-android-studio/ to change the project directory structure and it works for me after some gradle file modifications.\r\n\r\nAs said you should be able to use ndk with Android Studio and with the previous guide I mentioned, it should be theoretically possible to make this library to compatible with both eclipse and Android Studio. Unfortunately I'm not familiar with git and ndk enough to do all this yet. I will try to do it once I have more time."}}