Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Android build failed in react-native 0.60.0 #711

Open
darsodango opened this issue Jul 10, 2019 · 8 comments
Open

Android build failed in react-native 0.60.0 #711

darsodango opened this issue Jul 10, 2019 · 8 comments

Comments

@darsodango
Copy link

My react-native version is 0.60.0 and my react-native-fs 2.13.3 and it's throwing an RNFSManager.java uses or overrides a deprecated API

@flyher
Copy link

flyher commented Jul 11, 2019

I meet the same problem.

    "react": "^16.8.6",
    "react-native": "^0.60.0",
    "react-native-fs": "^2.13.3",

The log:

> Task :react-native-fs:compileDebugJavaWithJavac FAILED
C:\drn\node_modules\react-native-fs\android\src\main\java\com\rnfs\RNFSManager.java:11: error: package android.support.annotation does not exist
import android.support.annotation.Nullable;
                                 ^
C:\drn\node_modules\react-native-fs\android\src\main\java\com\rnfs\RNFSManager.java:624: error: cannot find symbol
  private void sendEvent(ReactContext reactContext, String eventName, @Nullable WritableMap params) {
                                                                       ^
  symbol:   class Nullable
  location: class RNFSManager
Note: C:\drn\node_modules\react-native-fs\android\src\main\java\com\rnfs\RNFSManager.java uses or overrides a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
2 errors

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':react-native-fs:compileDebugJavaWithJavac'.
> Compilation failed; see the compiler error output for details.

@darsodango
And I think this issue may link to #686

@darsodango
Copy link
Author

@flyher I think it is but the only difference between that issue is the react-native version

@maieonbrix
Copy link

Hello there,

@flyher the logs tells you that the package android.support.annotation.Nullable doesn't exist.
The solution is the one provided here : #686 (comment)

you need to remove both the imports and the annotation here : https://github.com/itinance/react-native-fs/blob/v2.13.3/android/src/main/java/com/rnfs/RNFSManager.java#L624 (delete both import android.support.annotation.Nullable; and the @Nullable).

@opoze
Copy link

opoze commented Jul 11, 2019

Do you really see #709

@aybarsyalcin
Copy link

please update latest version this problem. I manually change the code. but it is not true.

@maximilianoforlenza
Copy link

Any news?

@EhteshamAnwar
Copy link

getting this error

Execution failed for task ':react-native-fs:javaPreCompileDebug'.
Could not resolve all files for configuration ':react-native-fs:debugCompileClasspath'.
any solutions ?

@niravreact
Copy link

getting this error

Execution failed for task ':react-native-fs:javaPreCompileDebug'.
Could not resolve all files for configuration ':react-native-fs:debugCompileClasspath'.
any solutions ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

8 participants