Quantcast
Channel: Recent Threads — Xamarin Community Forums
Viewing all articles
Browse latest Browse all 204402

App crashes with Android.Manifest.Permission.WriteExternalStorage

$
0
0

Hi!

I need the WriteExternalStorage permission. However, once I add it to my manifest, my app immediately crashes. It does not even reach OnCreate(...).
As soon as I remove the permission, the app works again, so this is definitely the problem.

Am I doing something wrong? I know I also have to ask for permission at runtime, but I'm not given the chance.

I have tried with and without the shared runtime. It occurs for both release and debug. Have also tried uninstalling everything mono-related from the phone before deplying again.

Here is from the output window:

03-04 12:28:34.673 F/monodroid-assembly(15541): Could not load assembly 'Alumis.Android' during startup registration.
03-04 12:28:34.673 F/monodroid-assembly(15541): This might be due to an invalid debug installation.
03-04 12:28:34.673 F/monodroid-assembly(15541): A common cause is to 'adb install' the app directly instead of doing from the IDE.

Here is from the device log (not sure if it's relevant):

Time    Device Name Type    PID Tag Message
03-04 12:36:54.981  OnePlus A3010   Info    1170    ActivityManager Process Alumis.Android.Alumis.Android (pid 16149) has died
03-04 12:36:55.465  OnePlus A3010   Warning 2755    OpenGLRenderer  Incorrectly called buildLayer on View: ShortcutAndWidgetContainer, destroying layer...
03-04 12:36:55.465  OnePlus A3010   Warning 2755    OpenGLRenderer  Incorrectly called buildLayer on View: ShortcutAndWidgetContainer, destroying layer...
03-04 12:36:55.161  OnePlus A3010   Warning 1170    WindowManager   Failed looking up window
03-04 12:36:55.161  OnePlus A3010   Warning 1170    WindowManager   java.lang.IllegalArgumentException: Requested window android.view.ViewRootImpl$W@d3baf82 does not exist
    at com.android.server.wm.WindowManagerService.windowForClientLocked(WindowManagerService.java:9469)
    at com.android.server.wm.WindowManagerService.windowForClientLocked(WindowManagerService.java:9460)
    at com.android.server.wm.WindowManagerService.removeWindow(WindowManagerService.java:2401)
    at com.android.server.wm.Session.remove(Session.java:202)
    at android.view.ViewRootImpl.dispatchDetachedFromWindow(ViewRootImpl.java:3290)
    at android.view.ViewRootImpl.doDie(ViewRootImpl.java:5923)
    at android.view.ViewRootImpl$ViewRootHandler.handleMessage(ViewRootImpl.java:3629)
    at android.os.Handler.dispatchMessage(Handler.java:102)
    at android.os.Looper.loop(Looper.java:154)
    at android.os.HandlerThread.run(HandlerThread.java:61)
    at com.android.server.ServiceThread.run(ServiceThread.java:46)
03-04 12:36:54.985  OnePlus A3010   Info    2662    BrcmNfcNfa  nfa_ce_discovery_cback(): event:0x00
03-04 12:36:54.985  OnePlus A3010   Debug   2662    NfcService  Discovery configuration equal, not updating.
03-04 12:36:54.985  OnePlus A3010   Debug   2662    BrcmNfcJni  nfaConnectionCallback: NFA_RF_DISCOVERY_STARTED_EVT: status = 0x0
03-04 12:36:54.985  OnePlus A3010   Debug   2662    BrcmNfcJni  update_transaction_stat: Enter. Requested by : setDefaultRoute   Requested state : RESET
03-04 12:36:54.985  OnePlus A3010   Debug   2662    BrcmNfcJni  nfaConnectionCallback: Connection Event = 30
03-04 12:36:54.985  OnePlus A3010   Debug   2662    BrcmNfcJni  startRfDiscovery: is exit=1
03-04 12:36:54.985  OnePlus A3010   Info    2662    BrcmNfcNfa  nfa_dm_disc_sm_execute (): new state: DISCOVERY (1), disc_flags: 0x1
03-04 12:36:54.985  OnePlus A3010   Info    2662    BrcmNfcNfa  nfa_dm_disc_discovery_cback (): event:0x4000
03-04 12:36:54.985  OnePlus A3010   Info    2662    BrcmNfcNfa  nfa_ce_handle_disc_start (status=0x0)
03-04 12:36:54.985  OnePlus A3010   Info    2662    BrcmNfcNfa  nfa_dm_disc_sm_execute (): state: IDLE (0), event: DISCOVER_RSP(1) disc_flags: 0x31
03-04 12:36:54.985  OnePlus A3010   Debug   2662    BrcmNfcJni  update_transaction_stat: Exit.  Requested by : setDefaultRoute   Requested state : RESET  status : SUCCESS
03-04 12:36:54.985  OnePlus A3010   Info    2662    BrcmNfcNfa  nfa_dm_disc_new_state (): old_state: IDLE (0), new_state: DISCOVERY (1) disc_flags: 0x11
03-04 12:36:54.985  OnePlus A3010   Debug   2662    BrcmNfcJni  nfcManager_setDefaultRoute : exit
03-04 12:36:54.984  OnePlus A3010   Debug   2662    NxpHal  read successful status = 0x0
03-04 12:36:54.984  OnePlus A3010   Debug   2662    NxpTml  PN54X - Posting read message.....
03-04 12:36:54.984  OnePlus A3010   Info    575 Zygote  Process 16149 exited cleanly (3)
03-04 12:36:54.984  OnePlus A3010   Info    2662    BrcmNfcNfa  NFC received rsp gid:1
03-04 12:36:54.984  OnePlus A3010   Debug   2662    NxpTml  PN54X - Read requested.....
03-04 12:36:54.984  OnePlus A3010   Debug   2662    NxpTml  PN54X - Invoking I2C Read.....
03-04 12:36:54.984  OnePlus A3010   Debug   2662    NfcAdaptation   NfcAdaptation::HalDeviceContextDataCallback: len=4
03-04 12:36:54.984  OnePlus A3010   Info    2662    BrcmNfcNfa  returning TRUE
03-04 12:36:54.984  OnePlus A3010   Debug   2662    NxpTml  PN54X - I2C Read successful.....len = 4
03-04 12:36:54.984  OnePlus A3010   Debug   2662    NxpNciR len =   4 <= 41030100
03-04 12:36:54.982  OnePlus A3010   Debug   2662    NxpNciX len =  28 => 2103190C000101010201030105018001810182018301850106017001
03-04 12:36:54.982  OnePlus A3010   Debug   2662    NxpTml  PN54X - Tml Writer Thread Running................
03-04 12:36:54.982  OnePlus A3010   Debug   2662    NxpTml  PN54X - Posting Fresh Write message.....
03-04 12:36:54.982  OnePlus A3010   Debug   2662    NxpHal  write successful status = 0x0
03-04 12:36:54.982  OnePlus A3010   Debug   2662    NxpTml  PN54X - I2C Write successful.....

Viewing all articles
Browse latest Browse all 204402

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>