yamill / react-native-orientation

Listen to device orientation changes in react-native and set preferred orientation on screen to screen basis.
https://www.npmjs.com/package/react-native-orientation
ISC License
1.72k stars 810 forks source link

get SDK version from root directory #360

Open alikazemkhanloo opened 5 years ago

alikazemkhanloo commented 5 years ago

building the release app failed with this error:

\node_modules\react-native-orientation\android\build\intermediates\res\merged\release\values\values.xml:2919: error: resource android:attr/offset not found.

increasing the sdk versions of this library solved the issue for me. This PR tries to get the sdk version from the root project, and in case of error, falls back to older default values.

Also it is good to be compatible with the root project of the users.

lmeireles commented 5 years ago

I'm working on this port for this lib as it seems dead, already applied all the pull requests from here.

https://github.com/YatoStudio/react-native-orientation-handler