Warning: file_get_contents(/data/phpspider/zhask/data//catemap/0/jpa/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Android emulator expo弹出后:无法获取null对象的属性“absolutePath”_Android Emulator_Expo - Fatal编程技术网

Android emulator expo弹出后:无法获取null对象的属性“absolutePath”

Android emulator expo弹出后:无法获取null对象的属性“absolutePath”,android-emulator,expo,Android Emulator,Expo,我退出了Expo,因为我需要在我的项目中添加一些本机模块。我遵循 为此提供的文档 问题是,正在构建的android emulator在build.gradle文件中出现错误: 无法获取null对象上的属性“absolutePath” 你有什么建议吗?我从未在android studio中编写过代码,所以我有点迷失在这个问题中 我认为错误来自这个函数 `def findNdkBuildFullPath() { // we allow to provide full path to ndk-bu

我退出了Expo,因为我需要在我的项目中添加一些本机模块。我遵循 为此提供的文档

问题是,正在构建的android emulator在build.gradle文件中出现错误:

无法获取null对象上的属性“absolutePath”

你有什么建议吗?我从未在android studio中编写过代码,所以我有点迷失在这个问题中

我认为错误来自这个函数

`def findNdkBuildFullPath() {
  // we allow to provide full path to ndk-build tool
  if (hasProperty('ndk.command')) {
    return property('ndk.command')
  }
  ldNam// or just a path to the containing directory
    if (hasProperty('ndk.path')) {
      def ndkDir = property('ndk.path')
      return new File(ndkDir, getNdkBuie()).`**getAbsolutePath**`()
  }
  if (System.getenv('ANDROID_NDK') != null) {
    def ndkDir = System.getenv('ANDROID_NDK')
    return new File(ndkDir, getNdkBuildName()).`**getAbsolutePath**`()
  }
  def ndkDir = android.hasProperty('plugin') ? android.plugin.ndkFolder :
      plugins.getPlugin('com.android.library').hasProperty('sdkHandler') ?
          plugins.getPlugin('com.android.library').sdkHandler.getNdkFolder() :
          android.ndkDirectory.absolutePath
  if (ndkDir) {
    return new File(ndkDir, getNdkBuildName()).`**getAbsolutePath**`()
  }
  return null
}`

在Android studio中,单击左上角的SDK管理器图标。然后在Android SDK上,选择并下载NDK原生开发工具包LLDB和CMake。这对我有用