<p dir="auto">flutter' app crash met with gomobile package .aar</p>
<ol dir="auto">
<li>
<p dir="auto">I follow the guidence <a href="https://flutter.io/platform-channels/" rel="nofollow">https://flutter.io/platform-channels/</a> ... It works; I can see the result in Simulator.</p>
</li>
<li>
<p dir="auto">I write a simple code in Golang, Gomobile <code class="notranslate">bind -target=android</code>, get <code class="notranslate">.aar</code> file, put into libs, the app stopped when the call happened. The code is very simple:</p>
</li>
</ol>
<div class="highlight highlight-source-go notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content=" package bond

 import (

 )

 func FirstCall() int{
   return 20180311
 }

 func SecondCall() string{
   return &quot;20180311&quot;
 }

 func ThirdCall() {
 }

 type Counter struct {
  Value int
 }

 func (c *Counter) Inc() { c.Value++ }

 func NewCounter() *Counter { return &amp;Counter{ 5 } }"><pre class="notranslate"> <span class="pl-k">package</span> bond

 <span class="pl-k">import</span> (

 )

 <span class="pl-k">func</span> <span class="pl-en">FirstCall</span>() <span class="pl-smi">int</span>{
   <span class="pl-k">return</span> <span class="pl-c1">20180311</span>
 }

 <span class="pl-k">func</span> <span class="pl-en">SecondCall</span>() <span class="pl-smi">string</span>{
   <span class="pl-k">return</span> <span class="pl-s">"20180311"</span>
 }

 <span class="pl-k">func</span> <span class="pl-en">ThirdCall</span>() {
 }

 <span class="pl-k">type</span> <span class="pl-smi">Counter</span> <span class="pl-k">struct</span> {
  <span class="pl-c1">Value</span> <span class="pl-smi">int</span>
 }

 <span class="pl-k">func</span> (<span class="pl-s1">c</span> <span class="pl-c1">*</span><span class="pl-smi">Counter</span>) <span class="pl-en">Inc</span>() { <span class="pl-s1">c</span>.<span class="pl-c1">Value</span><span class="pl-c1">++</span> }

 <span class="pl-k">func</span> <span class="pl-en">NewCounter</span>() <span class="pl-c1">*</span><span class="pl-smi">Counter</span> { <span class="pl-k">return</span> <span class="pl-c1">&amp;</span><span class="pl-smi">Counter</span>{ <span class="pl-c1">5</span> } }</pre></div>
<ol start="3" dir="auto">
<li>I create app with Android Studio, put the <code class="notranslate">.aar</code> file in, and call, it gets the right return.</li>
</ol>
<p dir="auto">final <code class="notranslate">String stext=Bond.secondCall();</code><br>
4) So the problem is, there are 2 bridges here; each of them work, but put together, it crashes.</p>
<p dir="auto">Anybody could give me a solution? Is the problem in Flutter or Gomobile?</p>
<h2 dir="auto">Steps to Reproduce</h2>

<h2 dir="auto">Logs</h2>

<h2 dir="auto">Flutter Doctor</h2>