yandexmobile / react-native-appmetrica

React Native bridge to the AppMetrica on both iOS and Android.
MIT License
52 stars 132 forks source link

Cannot run app due to react-native-appmetrica:compileDebugJavaWithJavac #35

Closed YuryKorovko closed 4 years ago

YuryKorovko commented 4 years ago

Task :react-native-appmetrica:compileDebugJavaWithJavac FAILED /Users/ykorovko/IdeaProjects/mobail/node_modules/react-native-appmetrica/android/src/main/java/com/doochik/RNAppMetrica/AppMetricaModule.java:118: error: cannot access Gender ? GenderAttribute.Gender.FEMALE ^ bad class file: /Users/ykorovko/.gradle/caches/transforms-2/files-2.1/964cfa30a7fde9305577dc286fbd4460/jars/classes.jar(/com/yandex/metrica/profile/GenderAttribute$Gender.class) bad RuntimeInvisibleParameterAnnotations attribute: Gender(String) Please remove or make sure it appears in the correct subdirectory of the classpath. /Users/ykorovko/IdeaProjects/mobail/node_modules/react-native-appmetrica/android/src/main/java/com/doochik/RNAppMetrica/AppMetricaModule.java:120: error: cannot find symbol ? GenderAttribute.Gender.MALE ^ symbol: variable Gender location: class GenderAttribute

How to fix ?

NesterovichAlexey commented 4 years ago

Hi. You need to update AppMetrica SDK to 3.8.0 in file https://github.com/yandexmobile/react-native-appmetrica/blob/master/android/build.gradle#L21

YuryKorovko commented 4 years ago

Thank you very much! It helped.