androidandroid-ndkmupdf

I can not get MUPDF to compile in Android Studio. It works fine in Eclipse. NDK ERROR


I have been at this for days!!! I have read and re-read all the posts I can find and I just can't figure it out.

I built the Mupdf for android and can import it to eclipse, build it and run it on my device alone no problem. However I am new to all of this and do not know how to integrate it into my existing project in Eclipse.

In Android Studio I can integrate it into my existing project but I can not get a succesfull build. I really want to use Android Studio but can not figure out why it will not build!

The ERROR I Get in Android Studio. This does not happen in Eclipse

Information:Gradle tasks [:mupdfdemo:assembleDebug]
:mupdfdemo:preBuild
:mupdfdemo:compileDebugNdk
make.exe: *** No rule to make target `C:\Apps\PDFLastTest\mupdfdemo\build\intermediates\ndk\debug\obj/local/arm64-v8a/objs/mupdf/C_\Apps\PDFLastTest\mupdfdemo\src\main\jni', needed by `C:\Apps\PDFLastTest\mupdfdemo\build\intermediates\ndk\debug\obj/local/arm64-v8a/objs/mupdf/C_\Apps\PDFLastTest\mupdfdemo\src\main\jni\mupdf.o'.  Stop.
Error:Execution failed for task ':mupdfdemo:compileDebugNdk'.
> com.android.ide.common.internal.LoggedErrorException: Failed to run command:
    C:\Android-ndk\android-ndk-r10c\ndk-build.cmd NDK_PROJECT_PATH=null APP_BUILD_SCRIPT=C:\Apps\PDFLastTest\mupdfdemo\build\intermediates\ndk\debug\Android.mk APP_PLATFORM=android-16 NDK_OUT=C:\Apps\PDFLastTest\mupdfdemo\build\intermediates\ndk\debug\obj NDK_LIBS_OUT=C:\Apps\PDFLastTest\mupdfdemo\build\intermediates\ndk\debug\lib APP_ABI=all
Error Code:
    2
Output:
    make.exe: *** No rule to make target `C:\Apps\PDFLastTest\mupdfdemo\build\intermediates\ndk\debug\obj/local/arm64-v8a/objs/mupdf/C_\Apps\PDFLastTest\mupdfdemo\src\main\jni', needed by `C:\Apps\PDFLastTest\mupdfdemo\build\intermediates\ndk\debug\obj/local/arm64-v8a/objs/mupdf/C_\Apps\PDFLastTest\mupdfdemo\src\main\jni\mupdf.o'.  Stop.
Information:BUILD FAILED
Information:Total time: 4.237 secs
Information:1 error
Information:0 warnings
Information:See complete output in console

Solution

  • I followed u/ph0b advice and built the library in eclipse and then included it in the app in Android Studio.