flutter' app crash met with gomobile package .aar
I follow the guidence https://flutter.io/platform-channels/ ... It works; I can see the result in Simulator.
I write a simple code in Golang, Gomobile bind -target=android, get .aar file, put into libs, the app stopped when the call happened. The code is very simple:
package bond
import (
)
func FirstCall() int{
return 20180311
}
func SecondCall() string{
return "20180311"
}
func ThirdCall() {
}
type Counter struct {
Value int
}
func (c *Counter) Inc() { c.Value++ }
func NewCounter() *Counter { return &Counter{ 5 } }
3) I create app with Android Studio, put the .aar file in, and call, it gets the right return.
final String stext=Bond.secondCall();
4) So the problem is, there are 2 bridges here; each of them work, but put together, it crashes.
Anybody could give me a solution? Is the problem in Flutter or Gomobile?