Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ExtraDimensions is undefined #17

Closed
code-by opened this issue Mar 16, 2017 · 10 comments
Closed

ExtraDimensions is undefined #17

code-by opened this issue Mar 16, 2017 · 10 comments

Comments

@code-by
Copy link

code-by commented Mar 16, 2017

I have followed all instructions, but got
undefined is not an object (evaluating '_reactNative.NativeModules.ExtraDimensions[dim]'

My code is:

import ExtraDimensions from 'react-native-extra-dimensions-android';
...
console.log(ExtraDimensions.get('REAL_WINDOW_WIDTH'));

I have RN ver 0.42

@Sunhat
Copy link
Owner

Sunhat commented Mar 21, 2017

Hi, apologies for the delayed response here.

Firstly have you run rnpm link

Secondly double check the MainActivity.java file (check README)

Thirdly, I will be testing this as soon as I get the chance

@infinityl00p
Copy link

I'm running into the same issue RN 0.52, any fix yet?

@metahexane
Copy link

Bringing this back on topic, since I just can't use it without ejecting (and that's really not what I want to do). Is this not possible to do without ejecting (so just CRNA and Expo)?

@Josh-Rosen
Copy link

I'm also experiencing this issue

@Sunhat
Copy link
Owner

Sunhat commented Feb 20, 2019

I'm also experiencing this issue

What version of RN are you using?

@Sunhat
Copy link
Owner

Sunhat commented Feb 21, 2019

If you do experience this issue, I imagine a quick react-native run-android will fix it, by rebuilding the project for you.

@Jeijie
Copy link

Jeijie commented Mar 4, 2019

+1, RN 0.55.4

@nnzbz
Copy link

nnzbz commented Apr 26, 2019

I'm also experiencing this issue.
Is it Expo's problem?

@Sunhat
Copy link
Owner

Sunhat commented Jun 6, 2019

This issue seems to only occur when initially installing the package. It requires a full re-compile.

@Sunhat Sunhat closed this as completed Jun 6, 2019
@eddietex
Copy link

A feature requested was created on Expo's Canny to start supporting this library by default on Expo managed projects. Those of you interested, feel free to vote up: https://expo.canny.io/feature-requests/p/react-native-extra-dimensions-android

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

8 participants