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.

Task :react-native-youtube:compileDebugJavaWithJavac FAILED on build

See original GitHub issue

I’m building a project on React Native 0.59.1 but when I add react native youtube I get the following errors when I run react-native run-android

Any help would be greatly appreciated.

> Task :react-native-youtube:compileDebugJavaWithJavac FAILED
/Users/mattleach/Projects/EzeeTrader/EzeeTrader/node_modules/react-native-youtube/android/src/main/java/com/inprogress/reactnativeyoutube/YouTubeView.java:6: error: cannot find symbol
import androidx.annotation.Nullable;
                          ^
  symbol:   class Nullable
  location: package androidx.annotation
/Users/mattleach/Projects/EzeeTrader/EzeeTrader/node_modules/react-native-youtube/android/src/main/java/com/inprogress/reactnativeyoutube/YouTubeManager.java:3: error: cannot find symbol
import androidx.annotation.Nullable;
                          ^
  symbol:   class Nullable
  location: package androidx.annotation
/Users/mattleach/Projects/EzeeTrader/EzeeTrader/node_modules/react-native-youtube/android/src/main/java/com/inprogress/reactnativeyoutube/YouTubeView.java:37: error: cannot find symbol
    @Nullable
     ^
  symbol:   class Nullable
  location: class YouTubeView
/Users/mattleach/Projects/EzeeTrader/EzeeTrader/node_modules/react-native-youtube/android/src/main/java/com/inprogress/reactnativeyoutube/YouTubeManager.java:48: error: cannot find symbol
    public void receiveCommand(YouTubeView view, int commandType, @Nullable ReadableArray args) {
                                                                   ^
  symbol:   class Nullable
  location: class YouTubeManager
/Users/mattleach/Projects/EzeeTrader/EzeeTrader/node_modules/react-native-youtube/android/src/main/java/com/inprogress/reactnativeyoutube/YouTubeManager.java:76: error: cannot find symbol
    public @Nullable Map <String,Object> getExportedCustomDirectEventTypeConstants() {
            ^
  symbol:   class Nullable
  location: class YouTubeManager
/Users/mattleach/Projects/EzeeTrader/EzeeTrader/node_modules/react-native-youtube/android/src/main/java/com/inprogress/reactnativeyoutube/YouTubeManager.java:104: error: cannot find symbol
    public void setApiKey(YouTubeView view, @Nullable String param) {
                                             ^
  symbol:   class Nullable
  location: class YouTubeManager
/Users/mattleach/Projects/EzeeTrader/EzeeTrader/node_modules/react-native-youtube/android/src/main/java/com/inprogress/reactnativeyoutube/YouTubeManager.java:109: error: cannot find symbol
    public void setPropVideoId(YouTubeView view, @Nullable String param) {
                                                  ^
  symbol:   class Nullable
  location: class YouTubeManager
/Users/mattleach/Projects/EzeeTrader/EzeeTrader/node_modules/react-native-youtube/android/src/main/java/com/inprogress/reactnativeyoutube/YouTubeManager.java:114: error: cannot find symbol
    public void setPropVideoIds(YouTubeView view, @Nullable ReadableArray param) {
                                                   ^
  symbol:   class Nullable
  location: class YouTubeManager
/Users/mattleach/Projects/EzeeTrader/EzeeTrader/node_modules/react-native-youtube/android/src/main/java/com/inprogress/reactnativeyoutube/YouTubeManager.java:119: error: cannot find symbol
    public void setPropPlaylistId(YouTubeView view, @Nullable String param) {
                                                     ^
  symbol:   class Nullable
  location: class YouTubeManager
/Users/mattleach/Projects/EzeeTrader/EzeeTrader/node_modules/react-native-youtube/android/src/main/java/com/inprogress/reactnativeyoutube/YouTubeManager.java:124: error: cannot find symbol
    public void setPropPlay(YouTubeView view, @Nullable boolean param) {
                                               ^
  symbol:   class Nullable
  location: class YouTubeManager
/Users/mattleach/Projects/EzeeTrader/EzeeTrader/node_modules/react-native-youtube/android/src/main/java/com/inprogress/reactnativeyoutube/YouTubeManager.java:129: error: cannot find symbol
    public void setPropLoop(YouTubeView view, @Nullable boolean param) {
                                               ^
  symbol:   class Nullable
  location: class YouTubeManager
/Users/mattleach/Projects/EzeeTrader/EzeeTrader/node_modules/react-native-youtube/android/src/main/java/com/inprogress/reactnativeyoutube/YouTubeManager.java:134: error: cannot find symbol
    public void setPropFullscreen(YouTubeView view, @Nullable boolean param) {
                                                     ^
  symbol:   class Nullable
  location: class YouTubeManager
/Users/mattleach/Projects/EzeeTrader/EzeeTrader/node_modules/react-native-youtube/android/src/main/java/com/inprogress/reactnativeyoutube/YouTubeManager.java:139: error: cannot find symbol
    public void setPropControls(YouTubeView view, @Nullable int param) {
                                                   ^
  symbol:   class Nullable
  location: class YouTubeManager
/Users/mattleach/Projects/EzeeTrader/EzeeTrader/node_modules/react-native-youtube/android/src/main/java/com/inprogress/reactnativeyoutube/YouTubeManager.java:144: error: cannot find symbol
    public void setPropShowFullscreenButton(YouTubeView view, @Nullable boolean param) {
                                                               ^
  symbol:   class Nullable
  location: class YouTubeManager
/Users/mattleach/Projects/EzeeTrader/EzeeTrader/node_modules/react-native-youtube/android/src/main/java/com/inprogress/reactnativeyoutube/YouTubeManager.java:149: error: cannot find symbol
    public void setPropResumePlay(YouTubeView view, @Nullable boolean param) {
                                                     ^
  symbol:   class Nullable
  location: class YouTubeManager

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:5 (3 by maintainers)

github_iconTop GitHub Comments

4reactions
davidohayon669commented, Sep 18, 2019

@MattJLeach on v2 we migrated to AndroidX (React Native v0.60 is using AndroidX) so your project should support that. (Basically v2 of this lib supports only RN v0.60 an up)

You can fork this repo and change import androidx.annotation.Nullable; to import android.support.annotation.Nullable; in YouTubeManager.java and YouTubeView.java (basically revert what was done in 6654df696b2263ac9032ec7b7ff5ae70deca045d)

3reactions
davidohayon669commented, Sep 24, 2019

@davidohayon669 didn’t look for, do your research. Shouldn’t be hard to manually link a cocoapods lib

Read more comments on GitHub >

github_iconTop Results From Across the Web

Task app:compileDebugJavaWithJavac failed - Stack Overflow
FAILURE: Build failed with an exception. What went wrong: Execution failed for task ':@react-native-firebase_app:compileDebugJavaWithJavac'.
Read more >
Android - Build Failing · Issue #353 · software-mansion/react ...
Task :react-native-screens:compileDebugJavaWithJavac FAILED FAILURE: Build failed with an exception. * What went wrong: Execution failed for ...
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