react-native-fast-image: Android build failed.( ios ok) compileReleaseJavaWithJavac FAILED
hi, first installed package on ios it builds success . but Android it fails:
`:react-native-fast-image:prepareComFacebookFrescoImagepipeline101Library :react-native-fast-image:prepareComFacebookFrescoImagepipelineBase101Library :react-native-fast-image:prepareComFacebookFrescoImagepipelineOkhttp3101Library :react-native-fast-image:prepareComFacebookReactReactNative0451Library :react-native-fast-image:prepareComFacebookSoloaderSoloader010Library :react-native-fast-image:prepareOrgWebkitAndroidJscR174650Library :react-native-fast-image:prepareReleaseDependencies :react-native-fast-image:compileReleaseAidl :react-native-fast-image:compileReleaseNdk UP-TO-DATE :react-native-fast-image:compileLint :react-native-fast-image:copyReleaseLint UP-TO-DATE :react-native-fast-image:compileReleaseRenderscript :react-native-fast-image:generateReleaseBuildConfig :react-native-fast-image:generateReleaseResValues :react-native-fast-image:generateReleaseResources :react-native-fast-image:mergeReleaseResources :react-native-fast-image:processReleaseManifest /…/node_modules/react-native-fast-image/android/src/main/AndroidManifest.xml:11:9-15:15 Warning: meta-data#com.bumptech.glide.integration.okhttp.OkHttpGlideModule was tagged at AndroidManifest.xml:11 to remove other declarations but no other declaration present :react-native-fast-image:processReleaseResources :react-native-fast-image:generateReleaseSources :react-native-fast-image:incrementalReleaseJavaCompilationSafeguard :react-native-fast-image:compileReleaseJavaWithJavac :react-native-fast-image:compileReleaseJavaWithJavac - is not incremental (e.g. outputs have changed, no previous execution, etc.). /…/node_modules/react-native-fast-image/android/src/main/java/com/dylanvann/fastimage/FastImageViewPackage.java:14: error: FastImageViewPackage is not abstract and does not override abstract method createJSModules() in ReactPackage public class FastImageViewPackage implements ReactPackage { ^ Note: /…/node_modules/react-native-fast-image/android/src/main/java/com/dylanvann/fastimage/FastImageViewManager.java uses unchecked or unsafe operations. Note: Recompile with -Xlint:unchecked for details. 1 error :react-native-fast-image:compileReleaseJavaWithJavac FAILED
FAILURE: Build failed with an exception.
- What went wrong: Execution failed for task ‘:react-native-fast-image:compileReleaseJavaWithJavac’.
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.
BUILD FAILED
Total time: 8.256 secs`
About this issue
- Original URL
- State: closed
- Created 7 years ago
- Reactions: 8
- Comments: 17 (1 by maintainers)
Commits related to this issue
- Fix #47 — committed to kmorales13/react-native-fast-image by deleted user 7 years ago
- Avoid Exception on Android Build [Issue 47] Solve this issue: https://github.com/DylanVann/react-native-fast-image/issues/47 To avoid the following exception: :react-native-fast-image:compile... — committed to martineckardt/react-native-fast-image by martineckardt 6 years ago
when i edit
node_modules/react-native-fast-image/android/src/main/java/com/dylanvann/fastimage/FastImageViewPackage.javaand add:@Override public List<Class<? extends JavaScriptModule>> createJSModules(){ return Collections.emptyList(); }it runs fine. do you have a permanent fix?+1 I’m having the same issue
I already have the following and still getting the issue
update your fast image package file by this:—
package com.dylanvann.fastimage; import com.dylanvann.fastimage.FastImageViewModule; import com.facebook.react.ReactPackage; import com.facebook.react.bridge.NativeModule; import com.facebook.react.bridge.JavaScriptModule; import com.facebook.react.bridge.ReactApplicationContext; import com.facebook.react.uimanager.ViewManager;
import java.util.Collections; import java.util.List;
public class FastImageViewPackage implements ReactPackage { @Override public List<NativeModule> createNativeModules(ReactApplicationContext reactContext) { return Collections.<NativeModule>singletonList(new FastImageViewModule(reactContext)); }
}
createJSModulesis removed in newer React Native versions (>0.47.0). If you update you will not have this issue.To simplify development of this package I’m only aiming to support the latest version, it may work for others, but I’m not including code for backward compatibility:
https://github.com/DylanVann/react-native-fast-image#supported-react-native-versions
@DanGDroid 's solution fixed it for me too. @Billydubb will you be creating that PR?
@DanGDroid 's solution fixed it for me. @DylanVann, should I create a PR with those changes?
same +1
#48
update RN to 0.47 did not solve this issue.