HttpClient in AndroidApp crash again
See original GitHub issueDescription
Crash occurs when httpclient is used to access the API,No crash in previous versions。
Steps to Reproduce
use
dotnet publish -f net6.0-android -c Release
build apk, Then run the app on your phone
If httpclient is used, it will crash and try catch will not catch errors
Version with bug
Release Candidate 1 (current)
Last version that worked well
Unknown/Other
Affected platforms
Android
Affected platform versions
Android11
Did you find any workaround?
I found a strange step to solve this problem.
1, pack apk.
2, remove <uses-permission android:name="android.permission.INTERNET" />
in AndroidManifest.xml (Maybe any other setting)
3, pack apk again
4. add <uses-permission android:name="android.permission.INTERNET" />
in AndroidManifest.xml
5. pack apk again
6. if the packaged apk becomes smaller, the bug may be fixed
Relevant log output
No response
Issue Analytics
- State:
- Created a year ago
- Comments:23 (11 by maintainers)
Top Results From Across the Web
Android HTTPClient causes app to crash
Clicking the menu item causes the app to Crash. The objects browser and dataProvider are 100% correctly declared. I test the app on...
Read more >Resolving Native HttpClient Exceptions - Android
Hello, I'd like to ask if there is a way to catch unhandled native exceptions on android in a shared code... Because currently...
Read more >MAUI app crashing in release but working in debug
Run the app on Android then look for MissingMethodException in logcat to find out what was linked out. Add that to your linker...
Read more >httpResponse = httpClient.execute(httpGet); crashes the app
httpResponse = httpClient.execute(httpGet); crashes the app. app keeps on crashing Here is my code. import android.app.
Read more >Connect to the network
Quickly bring your app to life with less code, using a modern declarative approach to UI, and the simplicity of Kotlin. ... Start...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Sorry for the delay. But I can confirm that it seems to be working just fine in RC 3. No need to add
<RunAOTCompilation>False</RunAOTCompilation>
@PieEatingNinjas can you try MAUI RC 3 that just shipped? dotnet/runtime 6.0.5 did not ship until today as well.