0
Android 7.0物理デバイスでうまく動作するアプリがあり、Android 6.0 API 23で動作するエミュレータで正常に動作します。Android 5.1 API 22で動作するアプリをテストしたいネクサス4)。まあ、それはしていませんし、それがこのエラーを与える:Xamarin Androidデプロイメントエラー
Androidのマニフェストは、次のようになります。
Androidのオプション]ページは次のようになります。
Androidオプションページの詳細オプションeは次のようになります。
**注:私は、高度なタブでサポートされているアーキテクチャのメニューを使用して試してみましたし、「x86_64版」を選択するだけで試してみましたが、それはやりました私のためにエラーを解決しないでください。
私はXamarin診断の出力からこれを得た:リリースモードでアプリケーションを実行する
[I:]: Found Xamarin.Android 7.3.1.2
[I:sdk]: Runtime path: C:\Program Files (x86)\Microsoft Visual Studio\2017\Community New\MSBuild\Xamarin\Android
[I:sdk]: Framework path: C:\Program Files (x86)\Microsoft Visual Studio\2017\Community New\Common7\IDE\ReferenceAssemblies\Microsoft\Framework\MonoAndroid\v1.0
[I:sdk]: Key HKCU\SOFTWARE\Xamarin\VisualStudio\15.0_f80dbffe\Android\AndroidSdkDirectory found:
Path contains adb in \platform-tools (C:\Program Files (x86)\Android\android-sdk).
[I:sdk]: Key HKCU\SOFTWARE\Xamarin\VisualStudio\15.0_f80dbffe\Android\AndroidNdkDirectory found:
Path contains ndk-stack in \. (C:\ProgramData\Microsoft\AndroidNDK64\android-ndk-r13b).
[I:sdk]: Key HKCU\SOFTWARE\Xamarin\VisualStudio\15.0_f80dbffe\Android\JavaSdkDirectory found:
Path contains jarsigner.exe in \bin (C:\Program Files\Java\jdk1.8.0_131).
[I:]: Found Android SDK. API levels: 22, 23, 24, 25
[I:]: Tracking android devices started
[D:]: TrackDeviceTask got: 710f5e7a device
[I:]: Got new device list from adb with 1 devices
[D:RunShellCommand]: 710f5e7a getprop
[D:RunShellCommand]: 710f5e7a getprop
[D:]: Tracking avd started
[D:]: avd watcher *.ini path: 'C:\Users\cx67\.android\avd'
[D:]: avd watcher: got device list from avd with 5 devices
[D:]: avd watcher: got device list from avd with 5 devices
[D:]: TrackDeviceTask got: emulator-5554 offline, 710f5e7a device
[I:]: Got new device list from adb with 2 devices
[D:]: TrackDeviceTask got: emulator-5554 device, 710f5e7a device
[I:]: Got new device list from adb with 2 devices
[D:RunShellCommand]: emulator-5554 getprop
[D:RunShellCommand]: emulator-5554 getprop
[D:RunShellCommand]: emulator-5554 getprop
[D:RunShellCommand]: emulator-5554 getprop
[D:RunShellCommand]: emulator-5554 date +%s
[D:RunShellCommand]: emulator-5554 setprop "debug.mono.extra" "debug=127.0.0.1:29274:29275,timeout=1499696237,loglevel=0,server=y"
[D:RunShellCommand]: emulator-5554 getprop
[D:RunShellCommand]: emulator-5554 "echo" "-n" "${EMULATED_STORAGE_SOURCE}"
[D:RunShellCommand]: emulator-5554 "echo" "-n" "${EMULATED_STORAGE_TARGET}"
[D:RunShellCommand]: emulator-5554 am broadcast -a "mono.android.intent.action.EXTERNAL_STORAGE_DIRECTORY" -n "Mono.Android.DebugRuntime/com.xamarin.mono.android.ExternalStorageDirectory"
[D:RunShellCommand]: emulator-5554 "echo" "-n" "${EXTERNAL_STORAGE}"
[D:RunShellCommand]: emulator-5554 am start -a "android.intent.action.MAIN" -c "android.intent.category.LAUNCHER" -n "LoginSystem.Android/md50ef850b548eeb6d8287c9a52e2084363.SplashActivity"
[D:RunShellCommand]: emulator-5554 ps
[D:GetLogCat]: logcat -v time
[D:RunShellCommand]: emulator-5554 logcat -v time
[D:RunShellCommand]: emulator-5554 am force-stop LoginSystem.Android
[D:RunShellCommand]: emulator-5554 setprop "debug.mono.connect" ""
[D:]: avd watcher: got device list from avd with 5 devices
[D:]: TrackDeviceTask got: 710f5e7a device
[I:]: Got new device list from adb with 1 devices
[D:]: avd watcher: got device list from avd with 5 devices
[D:]: avd watcher: got device list from avd with 5 devices
[D:]: TrackDeviceTask got: emulator-5554 offline, 710f5e7a device
[I:]: Got new device list from adb with 2 devices
[D:]: TrackDeviceTask got: emulator-5554 device, 710f5e7a device
[I:]: Got new device list from adb with 2 devices
[D:RunShellCommand]: emulator-5554 getprop
[D:RunShellCommand]: emulator-5554 getprop
[D:RunShellCommand]: emulator-5554 getprop
[D:RunShellCommand]: emulator-5554 getprop
[D:RunShellCommand]: emulator-5554 getprop
[D:RunShellCommand]: 710f5e7a date +%s
[D:RunShellCommand]: 710f5e7a setprop "debug.mono.extra" "debug=127.0.0.1:29276:29277,timeout=1499697764,loglevel=0,server=y"
[D:RunShellCommand]: 710f5e7a getprop
[D:RunShellCommand]: 710f5e7a "echo" "-n" "${EMULATED_STORAGE_SOURCE}"
[D:RunShellCommand]: 710f5e7a "echo" "-n" "${EMULATED_STORAGE_TARGET}"
[D:RunShellCommand]: 710f5e7a am broadcast -a "mono.android.intent.action.EXTERNAL_STORAGE_DIRECTORY" -n "Mono.Android.DebugRuntime/com.xamarin.mono.android.ExternalStorageDirectory"
[D:RunShellCommand]: 710f5e7a am start -a "android.intent.action.MAIN" -c "android.intent.category.LAUNCHER" -n "LoginSystem.Android/md50ef850b548eeb6d8287c9a52e2084363.SplashActivity"
[D:RunShellCommand]: 710f5e7a ps
[D:GetLogCat]: logcat -v time
[D:RunShellCommand]: 710f5e7a logcat -v time
[D:RunShellCommand]: 710f5e7a am force-stop LoginSystem.Android
[D:RunShellCommand]: 710f5e7a setprop "debug.mono.connect" ""
[I:]: Found Android SDK. API levels: 22, 23, 24, 25
[D:RunShellCommand]: emulator-5554 getprop
[D:RunShellCommand]: emulator-5554 am broadcast -a "mono.android.intent.action.PACKAGE_VERSIONS" -e "packages" "Mono.Android.DebugRuntime,Mono.Android.Platform.ApiLevel_22,LoginSystem.Android" -n "Mono.Android.DebugRuntime/com.xamarin.mono.android.PackageVersions"
[D:RunShellCommand]: emulator-5554 pm install "/data/local/tmp/LoginSystem.Android-Signed.apk"
[D:RunShellCommand]: emulator-5554 rm "/data/local/tmp/LoginSystem.Android-Signed.apk"
[E:]: Deployment failed
Mono.AndroidTools.InstallFailedException: Unexpected install output: pkg: /data/local/tmp/LoginSystem.Android-Signed.apk
Failure [0]
at Mono.AndroidTools.Internal.AdbOutputParsing.CheckInstallSuccess(String output, String packageName) in C:\d\lanes\4699\fec6f88f\source\xamarinvs\External\md-addins\MonoDevelop.MonoDroid\external\androidtools\Mono.AndroidTools\Internal\AdbOutputParsing.cs:line 325
at Mono.AndroidTools.AndroidDevice.<>c__DisplayClass91_0.<InstallPackage>b__0(Task`1 t) in C:\d\lanes\4699\fec6f88f\source\xamarinvs\External\md-addins\MonoDevelop.MonoDroid\external\androidtools\Mono.AndroidTools\AndroidDevice.cs:line 740
at System.Threading.Tasks.ContinuationTaskFromResultTask`1.InnerInvoke()
at System.Threading.Tasks.Task.Execute()
は、このエラーを与える:6.0にターゲットのAndroidのバージョンを設定する
Severity Code Description Project File Line Suppression State
Error The "LinkAssemblies" task failed unexpectedly.
Java.Interop.Tools.Diagnostics.XamarinAndroidException: error XA2006: Could not resolve reference to 'System.Void Android.App.Activity::OnRequestPermissionsResult(System.Int32,System.String[],Android.Content.PM.Permission[])' (defined in assembly 'Xamarin.Android.Support.Fragment, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null') with scope 'Mono.Android, Version=0.0.0.0, Culture=neutral, PublicKeyToken=84e04ff9cfb79065'. When the scope is different from the defining assembly, it usually means that the type is forwarded. ---> Mono.Cecil.ResolutionException: Failed to resolve System.Void Android.App.Activity::OnRequestPermissionsResult(System.Int32,System.String[],Android.Content.PM.Permission[])
at Mono.Linker.Steps.MarkStep.MarkMethod(MethodReference reference)
at Mono.Linker.Steps.MarkStep.MarkInstruction(Instruction instruction)
at Mono.Linker.Steps.MarkStep.MarkMethodBody(MethodBody body)
at Mono.Linker.Steps.MarkStep.ProcessMethod(MethodDefinition method)
at Mono.Linker.Steps.MarkStep.ProcessQueue()
at Mono.Linker.Steps.MarkStep.Process()
at Mono.Linker.Steps.MarkStep.Process(LinkContext context)
at Mono.Linker.Pipeline.Process(LinkContext context)
at MonoDroid.Tuner.Linker.Run(Pipeline pipeline, LinkContext context)
at MonoDroid.Tuner.Linker.Process(LinkerOptions options, LinkContext& context)
at Xamarin.Android.Tasks.LinkAssemblies.Execute(DirectoryAssemblyResolver res)
--- End of inner exception stack trace ---
at Java.Interop.Tools.Diagnostics.Diagnostic.Error(Int32 code, Exception innerException, String message, Object[] args)
at Xamarin.Android.Tasks.LinkAssemblies.Execute(DirectoryAssemblyResolver res)
at Xamarin.Android.Tasks.LinkAssemblies.Execute()
at Microsoft.Build.BackEnd.TaskExecutionHost.Microsoft.Build.BackEnd.ITaskExecutionHost.Execute()
at Microsoft.Build.BackEnd.TaskBuilder.<ExecuteInstantiatedTask>d__26.MoveNext() LoginSystem.Android