-2

I must be doing something extremely stupid, but I've been trying for several days and I'm at a loss. No matter what I do, I cannot get a "hello world" app to run on an Android emulator. I've even tried a clean install of Windows 10, clean install of VS 2015, and applying all updates (Windows, VS, SDK's, Xamarin). I've tried multiple API emulators (VS and AVD). I've tried processor settings on the VS emulators. I've tried turning off fast deploy and shared runtimes.

I've had so many different results (Marshmallow emulator hangs, debugger can't connect, app won't deploy) with the different settings. But in all cases where the app is successfully deployed to the emulator, the app starts and immediately crashes. The device logs are not particularly helpful (at least to me).

To be more specific: 1. I can create a new Android (blank) solution and can successfully deploy it to VS Kit Kat and Lollipop emulators. I can do this with both release and debug configurations. 2. When I attempt to run the app by clicking it in the emulator, it flashes the app screen and immediately stops.

My question is twofold: Is anyone else experiencing problems getting very basic Android apps to run with the latest version of VS 2015, VS Andriod Emulators, and Xamarin? And is there anything I can change in my configuration to resolve this problem?

Here is the build output:

InspectorDebugSession(0): StateChange: Start -> EntryPointBreakpointRegistered InspectorDebugSession(0): Constructed Android application is debugging. 01-04 08:07:09.024 I/art ( 1531): Late-enabling -Xcheck:jni 01-04 08:07:09.077 W/monodroid( 1531): Using override path: /data/data/App1.App1/files/.override 01-04 08:07:09.077 W/monodroid( 1531): Using override path: /storage/emulated/0/Android/data/App1.App1/files/.override 01-04 08:07:09.078 W/monodroid( 1531): Trying to load sgen from: /data/data/App1.App1/files/.override/libmonosgen-2.0.so 01-04 08:07:09.078 W/monodroid( 1531): Trying to load sgen from: /storage/emulated/0/Android/data/App1.App1/files/.override/libmonosgen-2.0.so 01-04 08:07:09.078 W/monodroid( 1531): Trying to load sgen from: /data/app/App1.App1-1/lib/x86/libmonosgen-2.0.so 01-04 08:07:09.092 W/monodroid( 1531): Trying to load sgen from: /data/data/App1.App1/files/.override/links/libmonosgen-2.0.so 01-04 08:07:09.093 W/monodroid-debug( 1531): Trying to initialize the debugger with options: --debugger-agent=transport=dt_socket,loglevel=0,address=127.0.0.1:8815,server=y,embedding=1 01-04 08:07:09.217 W/monodroid-debug( 1531): Accepted stdout connection: 22 01-04 08:07:10.001 D/Mono ( 1531): Image addref mscorlib[0xacf1a340] -> mscorlib.dll[0xaf98be00]: 1 01-04 08:07:10.001 D/Mono ( 1531): AOT module 'mscorlib.dll.so' not found: dlopen failed: library "/data/app/App1.App1-1/lib/x86/libaot-mscorlib.dll.so" not found 01-04 08:07:10.001 D/Mono ( 1531): AOT module '/Users/builder/data/lanes/3511/501e63ce/source/monodroid/builds/install/mono-x86/lib/mono/aot-cache/x86/mscorlib.dll.so' not found: dlopen failed: library "/data/app/App1.App1-1/lib/x86/libaot-mscorlib.dll.so" not found 01-04 08:07:10.011 D/Mono ( 1531): Config attempting to parse: 'mscorlib.dll.config'. 01-04 08:07:10.011 D/Mono ( 1531): Config attempting to parse: '/Users/builder/data/lanes/3511/501e63ce/source/monodroid/builds/install/mono-x86/etc/mono/assemblies/mscorlib/mscorlib.config'. Could not connect to the debugger. InspectorDebugSession(0): Disposed InspectorDebugSession(0): HandleTargetEvent: TargetExited

And here is the emulator device log. Again thanks in advance for your help. https://gist.github.com/screed01/8174a81dc5956a94ed2c549e9819b002

4

1 に答える 1

0

VS 2015 をインストールしたときにこの問題が発生しましたが、古い Xamarin Studio を削除しませんでした。XS を削除した後、新しい VS はデバッガーへの接続を失うことなくアプリをビルドしました。

デバイスの特定のログを表示したい場合は、次のようにします。

ADBを探す

VS => SDK の場所 => Android SDK の場所の設定に移動します。ターミナルでこの場所を cd します。

ほとんどの場合、パスは次の 2 つのいずれかです。

  1. cd /Users/ USERNAME /Library/Developer/Xamarin/android-sdk-macosx/platform-tools
  2. cd ~/ライブラリ/Android/sdk/platform-tools

ログのフィルタリング

このコマンドを使用して、ログ タグでフィルタリングできます。./adb logcat -s "あなたのタグ名"

于 2017-01-03T08:25:53.183 に答える