-
Notifications
You must be signed in to change notification settings - Fork 41
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
Fatal exception: main #10
Comments
Hey @erueloi I did a small adjustment for your script (please take a look to
Please try and let me know if it works for you. Thanks. |
Hello, Thks for your answer, but error persists with same error in "java.lang.ClassCastException":
For more information, i call AlanVoice in a button on a Flutter App inside a "Widget build(BuildContext context)":
And handle command function get de command data "value":
Thks. |
@erueloi what version of alan_voice are you using? Could you provide whole script if it is possible? |
@snyuryev yes, use alan_voice 3.1.0. In debug mode it works correctly, but when use in release mode it fails. |
@erueloi got it. will try in release mode. |
@erueloi Release build (with script above) is working fine for me.
What is "value" in your scenario? |
@snyuryev the command value is a return of "userInput" This is the script:
Commandsthat do not return anything work correctly, for example:
thks for your help! |
@erueloi we tried to reproduce this issue and no luck. |
@Prateek0Srivastav no, the issue continues to fail. |
Please try to add additional params for release build type
to your build.gradle file. It should be located
As result you should have something similar to:
After that please try to run |
Fixed with previous release. |
Hello,
Code in Alan Studio on load and execute is:
//Is a Json with pokemon data same this:
project.pokemons = [
{
form: "Normal",
pokemon_id: 663,
pokemon_name: "Talonflame",
type: [
"Fire",
"Flying"
]
},
{
form: "Normal",
pokemon_id: 664,
pokemon_name: "Scatterbug",
type: [
"Bug"
]
},
...
onCreateProject(() => {
project.pokemonsdata = project.pokemons.map(p =>
${p.pokemon_name}~${p.pokemon_id}
).join('|');console.log(project.pokemonsdata);
});
const userInput = context(() => {
console.log(project.pokemonsdata);
follow("$(POKEMON~ p:pokemonsdata)", p => p.resolve(p.POKEMON.value));
})
intent("Add (first|lead) (Poke|Pokemon) (1|one)", async p => {
p.play("What pokemon add?");
var pokemon = await p.then(userInput);
console.log(pokemon);
p.play({command: "pokemon1", value: pokemon});
});
When play a command with values return error:
"E/AndroidRuntime(29591): java.lang.ClassCastException: com.google.gson.internal.LinkedTreeMap cannot be cast to com.alan.alansdk.events.EventParsed$ParsedEntity
E/AndroidRuntime(29591): at com.alan.alansdk.button.AlanStateListener.onParsedEvent(:1)
E/AndroidRuntime(29591): at com.alan.alansdk.d.run(:6)
E/AndroidRuntime(29591): at android.os.Handler.handleCallback(Handler.java:938)
E/AndroidRuntime(29591): at android.os.Handler.dispatchMessage(Handler.java:99)
E/AndroidRuntime(29591): at android.os.Looper.loop(Looper.java:236)
E/AndroidRuntime(29591): at android.app.ActivityThread.main(ActivityThread.java:8056)
E/AndroidRuntime(29591): at java.lang.reflect.Method.invoke(Native Method)
E/AndroidRuntime(29591): at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:656)
E/AndroidRuntime(29591): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:967)"
Can you help me with the error? I don't know if the syntax is incorrect or an internal error.
Thks.
The text was updated successfully, but these errors were encountered: