Expo构建属性错误 – 找不到要加载的DSO。

huangapple go评论68阅读模式
英文:

Expo build properties error - couldn't find DSO to loaad

问题

我需要将我的 Expo 应用(带有自定义开发客户端)的 minSdkVersion 设置为 24。因此,我按照这里提到的方式,在我的 app.json 文件中添加了 "expo-build-properties" 插件,并设置了 minSdkVersion:

{
  "expo": {
    ...
    "plugins": [
      ...
      [
        "expo-build-properties",
        {
          "android": {
            "minSdkVersion": 24
          }
        }
      ],
    ]
  }
}

问题是,当我使用 eas build ... 构建应用程序时,在尝试在 Android 模拟器或物理 Android 设备上运行应用程序时,我收到以下错误。有人知道为什么会发生这种情况吗?我唯一的更改是设置 min sdk 版本。其他一切都与应用程序正常运行之前保持一致。

Expo构建属性错误 – 找不到要加载的DSO。

如果有关系的话,我正在使用搭载 M1 芯片的 MacBook Pro 进行开发。

英文:

I need to set the minSdkVersion of my expo app (with custom dev client) to 24. So, I added the "expo-build-properties" plugin with the minSdkVersion to my app.json file as mentioned here:

{
  "expo": {
    ...
    "plugins": [
      ...
      [
        "expo-build-properties",
          {
            "android": {
               "minSdkVersion": 24
            }
          }
      ],
    ]
  }
}

The problem is that when I build the app using eas build ..., when I try to run the app on an Android emulator or a physical Android device, I get the following error. Does anyone have any idea why this is happening? The only change I made was to set the min sdk version. Everything else remained as before when the app would run properly.

Expo构建属性错误 – 找不到要加载的DSO。

In case it matters, I am developing on a MacBook Pro with an M1 chip.

答案1

得分: 0

对于遇到相同问题的人,我通过按照这个 GitHub issue 中提到的方法添加了一个新的自定义插件来解决了问题:

基本上,首先将上面帖子中的插件代码保存到项目中的一个文件中,例如 ./withAppBuildGradleModified.js

然后,在你的 app.jsonapp.config.js 文件中,像这样将插件添加到插件数组中:

{
  "expo": {
    ...
    "plugins": [
      ...
      "./withAppBuildGradleModified"
    ]
  }
}

最后,使用正确的 eas build 命令重新构建你的应用程序。如果在构建过程中出现任何错误,可能需要将 --clear-cache 添加到你的 eas build 命令中。

希望这能为下一个人节省几个小时的疑惑和困惑 Expo构建属性错误 – 找不到要加载的DSO。

英文:

For anyone who faces the same issue, I was able to fix the problem by adding a new custom plugin as mentioned in this GitHub issue:

Basically, first save the plugin code in the post above to a file in your project, for example, ./withAppBuildGradleModified.js.

Then, in your app.json or app.config.js file, add the plugin to the plugins array like this:

{
  "expo": {
    ...
    "plugins": [
      ...
      "./withAppBuildGradleModified"
    ]
  }
}

And finally, rebuild your app using the proper eas build command. If you get any errors during the build, you may need to add --clear-cache to your eas build command.

Hope this saves the next person a few hours of uncertainty and doubt Expo构建属性错误 – 找不到要加载的DSO。

huangapple
  • 本文由 发表于 2023年6月6日 10:47:05
  • 转载请务必保留本文链接:https://go.coder-hub.com/76411144.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定