cant get native libraries to work with detached expo App

hi, i have detached my expo project using exp detach to try to implement a native library to control the phone’s volume, the detached app seems to work ok with android studio and i was able to use “react-native link” without errors, but using the native library method SystemSetting.setVolume(newValue); gives me an error. ( there is any special step i need to make to install native libraries on detached expo Apps? i have tested the library on a simple react native init App and it works ok there. is there any diference between an react native init App and an Detached expo App?

Hi! Do you think you could provide a Minimal, Complete, and Verifiable Example that we can clone as its own project and confirm this with?

Thanks for replaying @dikaiosune! this minimal example was created using exp init and then ‘exp detach’. trying to build this example on android studio i encountered two errors that where also present on my project and might be related to the issue:

  1. The SDK Build Tools revision (23.0.1) is too low for project ‘:react-native-system-setting’. Minimum required is 25.0.0
    to proceed i had to update the SDK, after that i got another error

  2. Too many classes in --main-dex-list, main dex capacity exceeded
    so i used the workaround proposed by @LeiZeng in this issue

Unfortunately i couldn’t get it to run, it builds but crashes when is executed.
using the same code on an react-native init project, works. at this point i think its a safer bet to just use react-native init and copy over the javascript code i have on my expo project

This topic was automatically closed 15 days after the last reply. New replies are no longer allowed.