-
Notifications
You must be signed in to change notification settings - Fork 17.9k
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
x/mobile: flutter' app crash met with gomobile package .aar #24468
Comments
If you're not sure whether it's a Flutter issue or a Go one, please start at the (You'll reach a broader audience there, and we don't use the Go issue tracker for general questions.) |
I asked on golang-nuts(https://groups.google.com/forum/#!forum/golang-nuts),but got no reply, what can I do next? Flutter is good,gomobile is good, but not work when put them together |
I see instructions for using Flutter with various languages, but not Go. I suspect it's not a configuration they support. (See flutter/flutter#14816.) |
@hjlp20150803 can you put the project on github as its too tricky to help without the full project. i have done this using protobuf as the type being shared between golang and flutter |
Sorry I just saw the response, thanks for your reply. |
It does not make sense though. A standard flutter app compiled is only 8 mb to start. I think you need to understand that with react and xamamin you will have much bigger issues with integration. Much bigger... |
I don't think the executed file is enough, you need to know how I config,mainfest,..,. I have tried before, just now I checked it again, the whole directory is more than 100M. And I haven't done anything else except inject the .aar file. In one word that is :"In a terminal run: flutter create batterylevel"(https://flutter.io/platform-channels/), and drag the .aar file into lib. So I hope you could repeat my experience as I met. I don't know why you think it does not make sense, I can't find reason but I temporarily fixed the crash, if you can I hope you do it as do exactly, that is simple than I upload the project. Correct one thing, instruction should be: |
yeah i see what your saying.
If you put the basic cut down code on github i can hae a look
you must be doing something wrong to hit 100 mb.
you seriously dont want to use react or xamarin. i used both for many years
and switched to flutter because its much ebtter for so many reasons.
i have grpc between flutter and golang working. its easy and works very
well.
you can also do flatbuffers now to between flutter and golang for any IPC.
you want get that with react or xamarin among many other things.
anyway, if you put up a sample of the code with a Makefile i can run it and
find out why your getting 100 mb blow outs. Its really weird.
…On Tue, 24 Apr 2018 at 12:19 hjlp20150803 ***@***.***> wrote:
I don't think the executed file is enough, you need to know how I
config,mainfest,..,. I have tried before, just now I checked it again, the
whole directory is more than 100M. And I haven't done anything else except
inject the .aar file. In one word that is :"In a terminal run: flutter
create batterylevel"(https://flutter.io/platform-channels/), and drag the
.aar file into lib. So I hope you could repeat my experience as I met.
And in golang side, I put the source out there, and I told you the way I
build.
I don't know why you think it does not make sense, I can't find reason but
I temporarily fixed the crash, if you can I hope you do it as do exactly,
that is simple than I upload the project.
Correct one thing, instruction should be:
gomobile bind -target=android/386
not
gomobile bind -target=android/x86
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#24468 (comment)>, or mute
the thread
<https://github.com/notifications/unsubscribe-auth/ATuCwoj46_K6iGU9WKVBQyXOU1I6CGnwks5trvwXgaJpZM4SzFwJ>
.
|
I put this issue aside for a while, and today I tried the project, I can't repeat the crash again! The project is huge for "blender/build/app/intermediates",and the .apk. I delete them,you can take a look. |
The zip is just a normal flutter project. thats not going to help:) Just put up a github repo with the code and a makefile if you want help. |
I haven't done anything more than that and I have give all the file I can give, I really don't understand what you expect, I am a fresh of flutter. If you mean the makefile for golang? no , there are no, the code is very simple, with package bond import ( ) func FirstCall() int{ func SecondCall() string{ func ThirdCall() { type Counter struct { |
@gedw99 I upload a project here , can you have a look and help to fix it.... Thanks.. https://github.com/chaim1986/flutter-go bug similar : |
Please answer these questions before submitting your issue. Thanks!
What version of Go are you using (
go version
)?go version go1.10 darwin/amd64
Does this issue reproduce with the latest release?
yes
What operating system and processor architecture are you using (
go env
)?GOHOSTARCH="amd64"
GOHOSTOS="darwin"
GOOS="darwin"
What did you do?
I test .aar by:
gomobile bind -target=android
put into Android studio project's libs, and test the package.
When I test with android's app alone, it works; when I test with the flutter app platform channel alone, it works too.When I put them together, when the call happened, it crashed.
It looks like the 2 bridge there and they are not match.I don't know which team in google would answer me, flutter or golang,gomobile?
If possible, provide a recipe for reproducing the error.
A complete runnable program is good.
A link on play.golang.org is best.
What did you expect to see?
What did you see instead?
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?
The text was updated successfully, but these errors were encountered: