Mono for Android OnPause event not triggering on G

2019-07-01 11:31发布

I put together my first Mono for Android project (targeting API level 8, minimum Android 2.2) and deployed it to an HTC Incredible [1] running 2.3.4. Everything worked great and breakpoints in my main activities OnCreate, OnStart, OnResume, OnPause, and OnStop all triggered as described on Xamarin's Activity Lifecycle tutorial.

Without changing any project settings, I swapped for a Samsung Galaxy Nexus running 4.0.2 and deployed the same app. It called OnCreate just fine, but never triggered any of the other events when I switched away from the app.

How do I get these activity events to trigger in Ice Cream Sandwich (ICS) on the Galaxy Nexus?

1条回答
萌系小妹纸
2楼-- · 2019-07-01 11:56

While running the first deployment on a Galaxy Nexus, you will see it deploying the "armeabi-v7a - 40202" assemblies. For some reason that stuck in my head when this issue started making things difficult.

If you go to the project properties and check the box for "armeabi-v7a" under "Supported architectures", these events will start being triggered as expected.

armeabi-v7a supported architecture checkbox

查看更多
登录 后发表回答