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: Task :@react-native-community_datetimepicker:compileDebugJavaWithJavac FAILED

See original GitHub issue

Bug

Task :@react-native-community_datetimepicker:compileDebugJavaWithJavac FAILED /Users/rahshett/localshiva/QuickCare/node_modules/@react-native-community/datetimepicker/android/src/main/java/com/reactcommunity/rndatetimepicker/RNDatePickerDialogFragment.java:24: error: package androidx.fragment.app does not exist import androidx.fragment.app.DialogFragment; ^ /Users/rahshett/localshiva/QuickCare/node_modules/@react-native-community/datetimepicker/android/src/main/java/com/reactcommunity/rndatetimepicker/RNDatePickerDialogFragment.java:28: error: cannot find symbol public class RNDatePickerDialogFragment extends DialogFragment { ^ symbol: class DialogFragment /Users/rahshett/localshiva/QuickCare/node_modules/@react-native-community/datetimepicker/android/src/main/java/com/reactcommunity/rndatetimepicker/RNDatePickerDialogModule.java:14: error: package androidx.fragment.app does not exist import androidx.fragment.app.FragmentActivity; ^ /Users/rahshett/localshiva/QuickCare/node_modules/@react-native-community/datetimepicker/android/src/main/java/com/reactcommunity/rndatetimepicker/RNDatePickerDialogModule.java:15: error: package androidx.fragment.app does not exist import androidx.fragment.app.FragmentManager; ^ /Users/rahshett/localshiva/QuickCare/node_modules/@react-native-community/datetimepicker/android/src/main/java/com/reactcommunity/rndatetimepicker/RNTimePickerDialogFragment.java:18: error: package androidx.fragment.app does not exist import androidx.fragment.app.DialogFragment; ^ /Users/rahshett/localshiva/QuickCare/node_modules/@react-native-community/datetimepicker/android/src/main/java/com/reactcommunity/rndatetimepicker/RNTimePickerDialogFragment.java:27: error: cannot find symbol public class RNTimePickerDialogFragment extends DialogFragment { ^ symbol: class DialogFragment /Users/rahshett/localshiva/QuickCare/node_modules/@react-native-community/datetimepicker/android/src/main/java/com/reactcommunity/rndatetimepicker/RNTimePickerDialogModule.java:14: error: package androidx.fragment.app does not exist import androidx.fragment.app.DialogFragment; ^ /Users/rahshett/localshiva/QuickCare/node_modules/@react-native-community/datetimepicker/android/src/main/java/com/reactcommunity/rndatetimepicker/RNTimePickerDialogModule.java:15: error: package androidx.fragment.app does not exist import androidx.fragment.app.FragmentActivity; ^ /Users/rahshett/localshiva/QuickCare/node_modules/@react-native-community/datetimepicker/android/src/main/java/com/reactcommunity/rndatetimepicker/RNTimePickerDialogModule.java:16: error: package androidx.fragment.app does not exist import androidx.fragment.app.FragmentManager; ^ /Users/rahshett/localshiva/QuickCare/node_modules/@react-native-community/datetimepicker/android/src/main/java/com/reactcommunity/rndatetimepicker/RNDatePickerDialogFragment.java:36: error: method does not override or implement a method from a supertype @Override ^ /Users/rahshett/localshiva/QuickCare/node_modules/@react-native-community/datetimepicker/android/src/main/java/com/reactcommunity/rndatetimepicker/RNDatePickerDialogFragment.java:38: error: cannot find symbol Bundle args = getArguments(); ^ symbol: method getArguments() location: class RNDatePickerDialogFragment /Users/rahshett/localshiva/QuickCare/node_modules/@react-native-community/datetimepicker/android/src/main/java/com/reactcommunity/rndatetimepicker/RNDatePickerDialogFragment.java:39: error: cannot find symbol instance = createDialog(args, getActivity(), mOnDateSetListener); ^ symbol: method getActivity() location: class RNDatePickerDialogFragment /Users/rahshett/localshiva/QuickCare/node_modules/@react-native-community/datetimepicker/android/src/main/java/com/reactcommunity/rndatetimepicker/RNDatePickerDialogFragment.java:122: error: method does not override or implement a method from a supertype @Override ^ /Users/rahshett/localshiva/QuickCare/node_modules/@react-native-community/datetimepicker/android/src/main/java/com/reactcommunity/rndatetimepicker/RNDatePickerDialogFragment.java:124: error: cannot find symbol super.onDismiss(dialog); ^ symbol: variable super location: class RNDatePickerDialogFragment /Users/rahshett/localshiva/QuickCare/node_modules/@react-native-community/datetimepicker/android/src/main/java/com/reactcommunity/rndatetimepicker/RNDatePickerDialogModule.java:104: error: cannot find symbol FragmentActivity activity = (FragmentActivity) getCurrentActivity(); ^ symbol: class FragmentActivity location: class RNDatePickerDialogModule /Users/rahshett/localshiva/QuickCare/node_modules/@react-native-community/datetimepicker/android/src/main/java/com/reactcommunity/rndatetimepicker/RNDatePickerDialogModule.java:104: error: cannot find symbol FragmentActivity activity = (FragmentActivity) getCurrentActivity(); ^ symbol: class FragmentActivity location: class RNDatePickerDialogModule /Users/rahshett/localshiva/QuickCare/node_modules/@react-native-community/datetimepicker/android/src/main/java/com/reactcommunity/rndatetimepicker/RNDatePickerDialogModule.java:112: error: cannot find symbol FragmentManager fragmentManager = activity.getSupportFragmentManager(); ^ symbol: class FragmentManager location: class RNDatePickerDialogModule /Users/rahshett/localshiva/QuickCare/node_modules/@react-native-community/datetimepicker/android/src/main/java/com/reactcommunity/rndatetimepicker/RNDatePickerDialogModule.java:129: error: cannot find symbol fragment.setArguments(createFragmentArguments(options)); ^ symbol: method setArguments(Bundle) location: variable fragment of type RNDatePickerDialogFragment /Users/rahshett/localshiva/QuickCare/node_modules/@react-native-community/datetimepicker/android/src/main/java/com/reactcommunity/rndatetimepicker/RNTimePickerDialogFragment.java:35: error: method does not override or implement a method from a supertype @Override ^ /Users/rahshett/localshiva/QuickCare/node_modules/@react-native-community/datetimepicker/android/src/main/java/com/reactcommunity/rndatetimepicker/RNTimePickerDialogFragment.java:37: error: cannot find symbol final Bundle args = getArguments(); ^ symbol: method getArguments() location: class RNTimePickerDialogFragment /Users/rahshett/localshiva/QuickCare/node_modules/@react-native-community/datetimepicker/android/src/main/java/com/reactcommunity/rndatetimepicker/RNTimePickerDialogFragment.java:38: error: cannot find symbol instance = createDialog(args, getActivity(), mOnTimeSetListener); ^ symbol: method getActivity() location: class RNTimePickerDialogFragment /Users/rahshett/localshiva/QuickCare/node_modules/@react-native-community/datetimepicker/android/src/main/java/com/reactcommunity/rndatetimepicker/RNTimePickerDialogFragment.java💯 error: method does not override or implement a method from a supertype @Override ^ /Users/rahshett/localshiva/QuickCare/node_modules/@react-native-community/datetimepicker/android/src/main/java/com/reactcommunity/rndatetimepicker/RNTimePickerDialogFragment.java:102: error: cannot find symbol super.onDismiss(dialog); ^ symbol: variable super location: class RNTimePickerDialogFragment /Users/rahshett/localshiva/QuickCare/node_modules/@react-native-community/datetimepicker/android/src/main/java/com/reactcommunity/rndatetimepicker/RNTimePickerDialogModule.java:78: error: cannot find symbol FragmentActivity activity = (FragmentActivity) getCurrentActivity(); ^ symbol: class FragmentActivity location: class RNTimePickerDialogModule /Users/rahshett/localshiva/QuickCare/node_modules/@react-native-community/datetimepicker/android/src/main/java/com/reactcommunity/rndatetimepicker/RNTimePickerDialogModule.java:78: error: cannot find symbol FragmentActivity activity = (FragmentActivity) getCurrentActivity(); ^ symbol: class FragmentActivity location: class RNTimePickerDialogModule /Users/rahshett/localshiva/QuickCare/node_modules/@react-native-community/datetimepicker/android/src/main/java/com/reactcommunity/rndatetimepicker/RNTimePickerDialogModule.java:87: error: cannot find symbol FragmentManager fragmentManager = activity.getSupportFragmentManager(); ^ symbol: class FragmentManager location: class RNTimePickerDialogModule /Users/rahshett/localshiva/QuickCare/node_modules/@react-native-community/datetimepicker/android/src/main/java/com/reactcommunity/rndatetimepicker/RNTimePickerDialogModule.java:104: error: cannot find symbol fragment.setArguments(createFragmentArguments(options)); ^ symbol: method setArguments(Bundle) location: variable fragment of type RNTimePickerDialogFragment Note: /Users/rahshett/localshiva/QuickCare/node_modules/@react-native-community/datetimepicker/android/src/main/java/com/reactcommunity/rndatetimepicker/RNDatePickerDialogFragment.java uses or overrides a deprecated API. Note: Recompile with -Xlint:deprecation for details. 27 errors

FAILURE: Build failed with an exception.

Compilation failed; see the compiler error output for details.

  • Try: Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.

  • Get more help at https://help.gradle.org

Deprecated Gradle features were used in this build, making it incompatible with Gradle 6.0. Use ‘–warning-mode all’ to show the individual deprecation warnings. See https://docs.gradle.org/5.1.1/userguide/command_line_interface.html#sec:command_line_warnings

BUILD FAILED in 11s 19 actionable tasks: 11 executed, 8 up-to-date error Could not install the app on the device, read the error above for details. Make sure you have an Android emulator running or a device connected and have set up your Android development environment: https://facebook.github.io/react-native/docs/getting-started.html error Command failed: ./gradlew app:installDebug. Run CLI with --verbose flag for more details.

Environment info

  React Native Environment Info:
    System:
      OS: macOS 10.14.5
      CPU: (12) x64 Intel(R) Core(TM) i7-8850H CPU @ 2.60GHz
      Memory: 273.63 MB / 16.00 GB
      Shell: 5.3 - /bin/zsh
    Binaries:
      Node: 10.15.3 - ~/.nvm/versions/node/v10.15.3/bin/node
      npm: 6.4.1 - ~/.nvm/versions/node/v10.15.3/bin/npm
      Watchman: 4.9.0 - /usr/local/bin/watchman
    SDKs:
      iOS SDK:
        Platforms: iOS 12.2, macOS 10.14, tvOS 12.2, watchOS 5.2
      Android SDK:
        API Levels: 26, 27, 28
        Build Tools: 28.0.3
        System Images: android-26 | Intel x86 Atom_64, android-26 | Google APIs Intel x86 Atom, android-27 | Intel x86 Atom_64, android-27 | Google APIs Intel x86 Atom, android-28 | Intel x86 Atom_64, android-28 | Google APIs Intel x86 Atom
    IDEs:
      Android Studio: 3.4 AI-183.6156.11.34.5692245
      Xcode: 10.2.1/10E1001 - /usr/bin/xcodebuild
    npmPackages:
      react: 16.8.6 => 16.8.6
      react-native: ^0.59.8 => 0.59.8
    npmGlobalPackages:
      react-native-cli: 2.0.1

Library version: ^1.0.0

Steps To Reproduce

  1. npm i @react-native-community/datetimepicker
  2. npm link @react-native-community/datetimepicker
  3. react-native run-android …

Describe what you expected to happen:

  1. App to install successfully in the Emulator

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Reactions:14
  • Comments:20 (1 by maintainers)

github_iconTop GitHub Comments

5reactions
suhask-iprogrammercommented, Nov 1, 2019

@Swaagie Facing same issue, using v^2.0.0 “react-native”: “0.59.5” “Gradle”: 3.4.1

Error: Task: react-native-datetimepicker:compileDebugJavaWithJavac FAILED

4reactions
wasim-abuzahercommented, Sep 16, 2019

Facing same issue, using v^2.0.0 and "react-native": "0.59.5"

Execution failed for task ':react-native-datetimepicker:compileDebugJavaWithJavac'.

Deprecated Gradle features were used in this build, making it incompatible with Gradle 6.0
Read more comments on GitHub >

github_iconTop Results From Across the Web

Execution Failed for task :app:compileDebugJavaWithJavac in ...
In Android Studio 3.1, you can see the errors details in the Build window. Open up Build tab. They are somewhat hidden, you...
Read more >
Execution failed for task ':app:mergeDebugNativeLibs'. #35215
A failure occurred while executing com.android.build.gradle.internal.tasks.MergeJavaResWorkAction
Read more >
Task - Android Developers
Adds a listener that is called if the Task fails. The listener will be called on main application thread. If the Task has...
Read more >
The Tasks API | Google Play services
A Task aligns conceptually to several popular Android approaches to managing asynchronous code, and a Task can be straightforwardly converted to other ...
Read more >
Different Ways to fix "Execution failed for task - GeeksforGeeks
This file handles all other files in your Android Studio Project and also provides apk name and app logo for the generated apk...
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