question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[Android] v0.22.5 doesn't compile with RN 0.33

See original GitHub issue

Compilation fails (both dev and release) for version 0.22.5, with error: cannot find symbol import com.facebook.react.bridge.BaseActivityEventListener:

/Users/david/...../node_modules/react-native-image-picker/android/src/main/java/com/imagepicker/ImagePickerActivityEventListener.java:6: error: cannot find symbol
import com.facebook.react.bridge.BaseActivityEventListener;
                                ^
  symbol:   class BaseActivityEventListener
  location: package com.facebook.react.bridge
/Users/david/...../node_modules/react-native-image-picker/android/src/main/java/com/imagepicker/ImagePickerActivityEventListener.java:10: error: cannot find symbol
public class ImagePickerActivityEventListener extends BaseActivityEventListener {
                                                      ^
  symbol: class BaseActivityEventListener
/Users/david/...../node_modules/react-native-image-picker/android/src/main/java/com/imagepicker/ImagePickerActivityEventListener.java:15: error: incompatible types: ImagePickerActivityEventListener cannot be converted to ActivityEventListener
        reactContext.addActivityEventListener(this);

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Comments:11 (3 by maintainers)

github_iconTop GitHub Comments

7reactions
marcshillingcommented, Sep 14, 2016

A few things to check:

  • In the project build.gradle, make sure the allprojects declaration looks like this:
allprojects {
    repositories {
        mavenLocal()
        jcenter()
        maven {
            // All of React Native (JS, Obj-C sources, Android binaries) is installed from npm
            url "$rootDir/../node_modules/react-native/android"
        }
    }
}
  • In the app build.gradle, ensure react-native is compiled like this:
compile "com.facebook.react:react-native:+"  // From node_modules

And for good measure, run ./gradlew clean inside the android/ directory.

3reactions
hirviidcommented, Sep 14, 2016

Thanks @marcshilling ! Indeed, I had a build.gradle from an older react-native version, with url "$projectDir/../../node_modules/react-native/android".

I changed it and now it works perfectly.

Thank you for your quick response.

Read more comments on GitHub >

github_iconTop Results From Across the Web

[Android] v0.22.5 doesn't compile with RN 0.33 #311 - GitHub
Compilation fails (both dev and release) for version 0.22.5, with error: cannot find symbol import com.facebook.react.bridge.
Read more >
ACTRIMS Forum 2021 – Poster Presentations, 2021 - SAGE Journals
Background: Breastfeeding during infancy confers lower pediatric and adult-onset multiple sclerosis (MS) and pediatric neuromyelitis optica (NMO) risk.
Read more >
Public Hearing: YES NO Department: Planning & Sustainability ...
Based on DeKalb County records, it appears that the R-85 zoning of the property has not changed since adoption of the first Zoning...
Read more >
Front matr - CDC stacks
This report is not the final word. More work will need to be done so that we can determine the most effective ways...
Read more >
00000005981LF-000 - Verical
This coversheet was created by Verical, a division of Arrow Electronics, Inc. (“Verical”). The attached document was created by the part supplier, not...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found