Forum Xamarin.Android

Announcement:

The Xamarin Forums have officially moved to the new Microsoft Q&A experience. Microsoft Q&A is the home for technical questions and answers at across all products at Microsoft now including Xamarin!

To create new threads and ask questions head over to Microsoft Q&A for .NET and get involved today.

App crashes after splash screen when deploy in release

Newbie here.
I'm stuck in a problem. When xamarin compiles in debug, the application works perfectly on emulators or cell phones.
But when I try to deploy in release mode, the app crashes after splash screen.

I've tried to solve by changing some settings in Android Options and this is how my Android Options are today:

What I've done until now
1 - Change Linking:
When I set None or Sdk Assemblies, the app doesn't crash after splash screen, but crashes into multiples pages.
When I set Sdk and User Assemblies, the app crash after splash screen.

2 - Optimize Code into Compile Options:
When I uncheck this option, the app works but the size is too large for an apk.

I'm sorry if I didn't put everything needed to analysis.

Note: VS doesn't give any errors, compiling everything apparently ok.

Answers

  • AlessandroCaliaroAlessandroCaliaro ITMember ✭✭✭✭✭
    What do you do after splash screen? Maybe a permission problem?
  • After the splash screen, the app shows the Login Page. There is a way to see if is permission problem ?

  • AlessandroCaliaroAlessandroCaliaro ITMember ✭✭✭✭✭
    I think you should find something in the output panel of vs2019. Othervise open android studio and take a look to logcat.

    Which permissions do you have in the manifest?
  • I'll try find in the output panel, actually I've tried to debug in release mode, but when I do this, work normally.

    this is the permissions on manifest:

    <manifest xmlns:android="http://schemas.android.com/apk/res/android" android:versionCode="285" android:versionName="15.0.35" package="com.ptbr.pedidoeletronico" android:installLocation="preferExternal">
        <uses-sdk android:minSdkVersion="16" android:targetSdkVersion="29" />
        <application android:label="pedidoeletronico.com" android:theme="@style/MainTheme" android:icon="@drawable/iconPE"></application>
        <uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
        <uses-permission android:name="android.permission.ACCESS_CHECKIN_PROPERTIES" />
        <uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" />
        <uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
        <uses-permission android:name="android.permission.BATTERY_STATS" />
        <uses-permission android:name="android.permission.ACCESS_WIFI_STATE" />
        <uses-permission android:name="android.permission.BIND_NOTIFICATION_LISTENER_SERVICE" />
        <uses-permission android:name="android.permission.BLUETOOTH" />
        <uses-permission android:name="android.permission.BLUETOOTH_ADMIN" />
        <uses-permission android:name="android.permission.BLUETOOTH_PRIVILEGED" />
        <uses-permission android:name="android.permission.CAMERA" />
        <uses-permission android:name="android.permission.FLASHLIGHT" />
        <uses-permission android:name="android.permission.INTERNET" />
        <uses-permission android:name="android.permission.READ_PHONE_STATE" />
        <uses-permission android:name="android.permission.WAKE_LOCK" />
        <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
    </manifest>
    
  • AlessandroCaliaroAlessandroCaliaro ITMember ✭✭✭✭✭
    Do you ask runtime permissions for them?
  • What do you mean by that?
    sorry, is because I'm new on xamarin

  • @AlessandroCaliaro said:
    Do you ask runtime permissions for them?

    Got it now, about your question , yes, I ask for them

  • AlessandroCaliaroAlessandroCaliaro ITMember ✭✭✭✭✭
    I don’t know. Take a look to logcat or debug the app step by step. Otherwise add a repo on GitHub so someone can take a look
  • @AlessandroCaliaro said:
    I don’t know. Take a look to logcat or debug the app step by step. Otherwise add a repo on GitHub so someone can take a look

    Alright, I'll try do this.
    If I get something, I'll aswner here, thanks anyway

  • jezhjezh Member, Xamarin Team Xamurai

    Waiting for your good news. If you have any updates, please feel free to update here. :)

Sign In or Register to comment.