birdofpreyru / react-native-static-server

Embedded HTTP server for React Native
https://dr.pogodin.studio/docs/react-native-static-server
Other
154 stars 22 forks source link

[Android] The build for RN Old Architecture was broken by v0.7.8 #32

Closed charlyschulte closed 1 year ago

charlyschulte commented 1 year ago

i updated the react-native-static-server library to 7.9 and now i cant build on android. i get the error message: ReactNativeStaticServerModule is not abstract and does not override abstract method start(double,String,Promise) in ReactNativeStaticServerSpec public class ReactNativeStaticServerModule

do you have any clue, what the problem might be?

birdofpreyru commented 1 year ago

Ogh... sorry about, it turns out in v0.7.8 I missed a small change needed in the native Android / Old Architecture code, which broke support of Old Achitecture on Android.

This: https://github.com/birdofpreyru/react-native-static-server/blob/11f8944f3ba3dc70d49017fedbbdb7a4ebbe08cd/android/src/oldarch/ReactNativeStaticServerSpec.java#L21 should read:

public abstract void start(double id, String configPath, String errlogPath, Promise promise); 

Will fix in the next release.

frederiko-famobi commented 1 year ago

Hello there, same error here while trying to build:

> Task :app:processDebugManifest
> Task :app:processDebugManifestForPackage
> Task :dr.pogodin_react-native-static-server:compileDebugJavaWithJavac
[stderr] 
/home/expo/workingdir/build/node_modules/@dr.pogodin/react-native-static-server/android/src/main/java/com/drpogodin/reactnativestaticserver/ReactNativeStaticServerModule.java:27: error: ReactNativeStaticServerModule is not abstract and does not override abstract method start(double,String,Promise) in ReactNativeStaticServerSpec
[stderr] 
public class ReactNativeStaticServerModule
[stderr] 
       ^
[stderr] 
1 error
> Task :dr.pogodin_react-native-static-server:compileDebugJavaWithJavac FAILED

I see that is marked as ready. Is there any news about the next update with the fixes?

Thank you!

birdofpreyru commented 1 year ago

@frederiko-famobi probably I'll release later today, or within the next few days. I wanna complete and include into the same release the clean-up I do for #28, just to avoid doing a separate release for each one-liner fix.