Build compilation problem
mva1991 opened this issue · 3 comments
mva1991 commented
Hi,
I get the following errors during my build:
/GeoCoderTest/android/app/src/main/java/com/geocodertest/MainActivity.java:16: error: cannot find symbol
protected List<ReactPackage> getPackages() {
^
symbol: class List
location: class MainActivity
GeoCoderTest/android/app/src/main/java/com/geocodertest/MainActivity.java:16: error: cannot find symbol
protected List<ReactPackage> getPackages() {
^
symbol: class ReactPackage
location: class MainActivity
/GeoCoderTest/android/app/src/main/java/com/geocodertest/MainActivity.java:15: error: method does not override or implement a method from a supertype
@Override
^
GeoCoderTest/android/app/src/main/java/com/geocodertest/MainActivity.java:18: error: cannot find symbol
new MainReactPackage(),
^
symbol: class MainReactPackage
location: class MainActivity
/GeoCoderTest/android/app/src/main/java/com/geocodertest/MainActivity.java:17: error: cannot find symbol
return Arrays.<ReactPackage>asList(
^
symbol: class ReactPackage
location: class MainActivity
/GeoCoderTest/android/app/src/main/java/com/geocodertest/MainActivity.java:17: error: cannot find symbol
return Arrays.<ReactPackage>asList(
^
symbol: variable Arrays
location: class MainActivity
6 errors
:app:compileDebugJavaWithJavac FAILED
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':app:compileDebugJavaWithJavac'.
I tried importing java.util.Arrays, java.util.List, However I was not sure of the ReactPackage and MainReactPackage classes and also the @OverRide annotation.
Looking forward for a feasible fix.
kaizenlabs commented
Can someone help with this? I'm getting the same build problems on this.
pjb3 commented
I think there is an error in the documentation, the RNGeocoderPackage goes in MainApplication.java, not MainActivity.java
kaizenlabs commented
Thank you pjb3, will give that a shot, the documentation is definitely wrong.