redux-kotlin icon indicating copy to clipboard operation
redux-kotlin copied to clipboard

java.lang.NoSuchMethodError: redux.api.Store.getState

Open mikecole20 opened this issue 9 years ago • 2 comments

I'm having trouble properly creating the store. Whenever I call getState on the store, I get the error shown below. It prints out that the mainStore is of type redux.MiddlewareKt$applyMiddleware$1$1$1.

// TODO: initialize AppState from file if available
val previousState = AppState()
val mainStore = createStore(AppReducer(), previousState, applyMiddleware(MyMiddleware<AppState>()))
Log.e(getClass().toString(), "Store's class type is: " + mainStore.getClass().toString());
AppState state = mainStore.getState();

02-07 11:18:54.354 3556-3556/? E/class com.mypackage.MainApplication: Store's class type is: class redux.MiddlewareKt$applyMiddleware$1$1$1 02-07 11:18:54.354 3556-3556/? D/AndroidRuntime: Shutting down VM 02-07 11:18:54.354 3556-3556/? W/dalvikvm: threadid=1: thread exiting with uncaught exception (group=0x9cc93b20) 02-07 11:18:54.354 3556-3556/? E/AndroidRuntime: FATAL EXCEPTION: main Process: com.mypackage, PID: 3556 java.lang.NoSuchMethodError: redux.api.Store.getState

I've also tried without the middleware. Without the middleware, it says the type is redux.StoreKt$createStore$creator$1$1.

mikecole20 avatar Feb 07 '17 16:02 mikecole20

Well I have something working on API 25, but I'm still getting this error on API 19.

mikecole20 avatar Feb 08 '17 18:02 mikecole20

getting the same error

robert-cronin avatar Jun 21 '19 01:06 robert-cronin