#My plugin doesn't load

18 messages · Page 1 of 1 (latest)

tepid anvil
#

I'm trying to create plugin, but it doesn't seem to work, check screens
What i did wrong?

sick charm
#

Oooooh it's an Android plugin

#

That's a bit trickier then (since I haven't worked with android plugins yet, I've mostly been working on the whole "getting it to work at all in the first place" part x)

tepid anvil
#

yeah

#

maybe i placed rust function in wrong place?

sick charm
#

Hmmmmm, it suggests that you might in the app you're loading the plugin into haven't ran the init funciton

#
fn main() {
    tauri::Builder::default()
        .plugin(tauri_plugin_window_state::Builder::default().build())
        .run(tauri::generate_context!())
        .expect("error while running tauri application");
}

Something like this for example

tepid anvil
#

well, can i just put init() after line 86?

sick charm
#

The init() needs to be ran by the app you're running

#

At some point before the run() part

tepid anvil
sick charm
tepid anvil
sick charm
tepid anvil
#

i tried to add .plugin(init()) and it started compiling

#

nope, it crashed while starting app

#

oh, i think i see, why it crashed

#

yes, plugin loaded! thank you so much!
now it cant find my function, but thats different story