Search code examples
androidmupdf

Android import Mupdf as a module error


I want to import mupdf into my application in Android Studio.But when did it,I got an error.Below is error:

Error:(63, 0) Cannot get property 'absolutePath' on null object
<a href="openFile:F:\Android_Studio_Project\HelloToone\android\build.gradle">Open File</a>

The relevant code is in build.gradle.Below is the code:

def ndkBuildPath = plugins.getPlugin('com.android.application').sdkHandler.getNdkFolder().absolutePath + File.separator + 'ndk-build'
if (Os.isFamily(Os.FAMILY_WINDOWS)) {
    ndkBuildPath +='.cmd'
}

How to slove it? Thank you.


Solution

  • I resolved this error.I didn't install Android NDK in Android Studio before.When I install the NDK,the Gradle restarted build my application.The error resolved.