5

I get the following error log when I run my Android app: http://pastebin.com/1jHEfdQ3 The app sometimes crashes in the simulator but most of the time it just displays a white screen. I can console.log one or two things until the app won't respond. R-R to refresh doesn't work. None of the dev tools work. I'm stumped with what to do at this point.

I'm running react native 0.38.0

EDIT:

I've tried cleaning my gradle and deleting and reinstalling my node modules.

One thing to note is that I am using React Native Navigation which means I had to modify MainApplication and MainActivity to the following:

MainActivity:

package com.prayerrequest;

import com.facebook.react.ReactActivity;
import com.reactnativenavigation.NavigationApplication;
import com.airbnb.android.react.maps.MapsPackage;
import com.cmcewen.blurview.BlurViewPackage;
import io.realm.react.RealmReactPackage;
import com.reactnativenavigation.controllers.SplashActivity;


public class MainActivity extends SplashActivity {

}

MainApplication:

package com.prayerrequest;

import com.facebook.react.ReactPackage;

import com.cmcewen.blurview.BlurViewPackage;
import io.realm.react.RealmReactPackage;
import com.airbnb.android.react.maps.MapsPackage;

import com.reactnativenavigation.NavigationApplication;

import java.util.Arrays;
import java.util.List;

  public class MainApplication extends NavigationApplication {
    @Override
     public boolean isDebug() {
         // Make sure you are using BuildConfig from your own application
         return BuildConfig.DEBUG;
     }

     @Override
     public List<ReactPackage> createAdditionalReactPackages() {
        return Arrays.<ReactPackage>asList(
          new RealmReactPackage(),
          new BlurViewPackage(),
          new MapsPackage()
        );
     }
  }

I've crossposted on React Native's issues page here

guy.gc
  • 3,359
  • 2
  • 24
  • 39
Daniel van der Merwe
  • 1,570
  • 2
  • 10
  • 20
  • Possible duplicate of [Couldn't load memtrack module Logcat Error](http://stackoverflow.com/questions/22629568/couldnt-load-memtrack-module-logcat-error) – Florin Dobre Feb 13 '17 at 12:58
  • I am also using react-native-navigation and I also have that problem testing with rn 0.46.3. So it might also be a problem of react-native-navigation. – SudoPlz Jul 26 '17 at 10:49

2 Answers2

1

The issue seems to be 'Couldn't load memtrack module (No such file or directory)'

It looks like there's an issue with the simulator.

This is a config of my fully functional simulator: enter image description here

Lots of other suggestions can be found here:

Couldn't load memtrack module Logcat Error

Community
  • 1
  • 1
Florin Dobre
  • 9,872
  • 3
  • 59
  • 93
  • Thanks for the reply. I've tried all of those suggestions and nothing works. Since the app is actually running I'm not sure if it is related to that error or not. – Daniel van der Merwe Feb 14 '17 at 08:48
  • I added a config of my simulator to the answer. Maybe that helps. I had to fix a few white screens too until I brought my app up and running. – Florin Dobre Feb 14 '17 at 11:07
  • Ok thanks I'll try that. Something to note is that I plugged in a google tablet and it had a white screen there too. – Daniel van der Merwe Feb 14 '17 at 11:39
  • Try running `adb logcat` and watch for any error or warning on both simulator and real device. I used GoogleApi system image for my emulator but the normal x86_64 one should be enough. I need the google maps and that is why I used that system image. – Florin Dobre Feb 14 '17 at 11:50
  • The above log was from logcat. I've tried different RN versions and cleaning my build and node modules but am still getting this error. Here's the updated log: http://pastebin.com/96ww1f8S – Daniel van der Merwe Feb 15 '17 at 08:58
1

I had a similar problem. I would get this white screen when trying to get it to run on device.

The problem was when I would do adb devices or react-native run-android I would get "ADB is Not Recognized as an internal or external command".

So my fix was to add the path to adb.exe's parent directory to my Environment Variables and then restart my command prompts.I then ran react-native run-android and on startup no more red screen showing the completely useless error message Error calling AppRegistry.runApplication! :)

So I found ADB was located in my folder:

C:\Users\dell\AppData\Local\Android\sdk\platform-tools\adb.exe I am on a Windows 10 system. dell is my user name of the computer.

So I went to System Environment Variables then found "Path" then clicked "Edit", then clicked "New" and added in "C:\Users\dell\AppData\Local\Android\sdk\platform-tools".

Manuj Vashist
  • 23
  • 1
  • 5