Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
379 views
in Technique[技术] by (71.8m points)

android - Flutter Release apk is not working properly?

I had run this flutter build apk to release my App. Now I had build version 2 of that.

Now again I want to release my version 2 App. To get the release apk I again run this flutter build apk again. I get released apk but It was my version 1 released apk. I go to my released directory and deleted my deleted released apk and tried again then also I get version 1 released apk. I tried this too but It is also giving me Version 1 apk

While building version 2 I was testing in debugging mode. everything was/is working fine in dung mode.

Here is Github Link to that App: https://github.com/nitishk72/Flutter-Github-API

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

If your problem is that the flutter build (APK, bundle) isn't making API calls in a real device, this is because you need to add the Internet permission to Android Manifest before creating the release/build.

By default, "internet use" will work fine on the emulator but not on a real device.

To fix this, simply:

Open the file "android/app/src/main/AndroidManifest.xml" and add the proper user-permission:

<manifest> 
...
 <uses-permission android:name="android.permission.INTERNET"/>
...
</manifest>

And then create your build again.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...