0

I installed Android Studio using this guide. I have Android Studio 3.0.1 and Java version 1.8.0_161, running on Macbook Pro: MacOS High Sierra, with Core i7 and 16GB RAM.

I'm working on an app and I've been using the iOS simulator fine for awhile now, and recently started to try to test the app on the android simulator. I open the app up in Android Studio (making sure to select the android sub-folder in the React project as my root project folder) and then hit "Run App" to launch the simulator, which does run. However, I only see the home screen of the simulated phone, and the app doesn't launch. I get these errors:

/Users/myUser/Documents/myProject/node_modules/react-native-permissions/android/src/main/java/com/joshblour/reactnativepermissions/ReactNativePermissionsPackage.java
Error:(19, 5) error: method does not override or implement a method from a supertype


Error:Execution failed for task ':react-native-permissions:compileDebugJavaWithJavac'.
> Compilation failed; see the compiler error output for details.

enter image description here

Attila
  • 1,097
  • 2
  • 19
  • 45
  • What version of react-native and react-native-permissions are you using? – ajthyng Feb 24 '18 at 05:24
  • @ajthyng react-native 0.49.3 and react-native-permissions 0.2.7 – Attila Feb 26 '18 at 15:16
  • Not sure if this would be your issue, but the readme gives a version table and RN 0.40 - 0.52 requires version 1.1.1 of react-native-permissions. https://github.com/yonahforst/react-native-permissions – ajthyng Feb 26 '18 at 15:57
  • When I upgrade the version of react-native-permissions I get this error in AS: `Unable to find a matching configuration of project :react-native-permissions: None of the consumable configurations have attributes.` – Attila Feb 26 '18 at 16:39

1 Answers1

-1

Removing the @Override on the following method (inside of ReactNativePermissionsPackage.java file) removes the above errors:

@Override
public List<Class<? extends JavaScriptModule>> createJSModules() {
  return Collections.emptyList();
}
Attila
  • 1,097
  • 2
  • 19
  • 45