在调试Xamarin PCL项目时遇到问题。我知道代码是okey,因为我可以在Windows Phone模拟器上调试它,但我无法在Android模拟器上调试它。
在Win10上使用VS2015教授。我可以构建解决方案没问题,只需在调试bug中启动它(无论是实际的设备还是模拟器)
2>Starting deploy 5.7" Marshmallow (6.0.0) XHDPI Phone ...
2>Deploying 5.7" Marshmallow (6.0.0) XHDPI Phone ...
2>Build started.
2>D:\Programs\Java\jdk1.8.0_102\\bin\jarsigner.exe -keystore C:\key\keystore -storepass ttttt -keypass ttttt -digestalg SHA1 -sigalg md5withRSA -signedjar bin\Debug\\com.data-Signed-Unaligned.apk D:\WebDevelopment\XF.Data\XF.Data\XF.Data.Droid\obj\Debug\android\bin\com.data.apk tttapps
2>No -tsa or -tsacert is provided and this jar is not timestamped. Without a timestamp, users may not be able to validate this jar after the signer certificate's expiration date (2042-06-26) or after any future revocation date.
2>D:\Programs\Android\android-sdk\build-tools\24.0.1\zipalign.exe 4 "D:\WebDevelopment\XF.Data\XF.Data\XF.Data.Droid\bin\Debug\com.data-Signed-Unaligned.apk" "bin\Debug\\com.data-Signed.apk"
2>D:\Programs\Android\android-sdk\platform-tools\adb.exe -s 169.254.147.66:5555 shell getprop ro.build.version.sdk
2>D:\Programs\Android\android-sdk\platform-tools\adb.exe -s 169.254.147.66:5555 shell getprop ro.product.cpu.abilist64
2>D:\Programs\Android\android-sdk\platform-tools\adb.exe -s 169.254.147.66:5555 shell getprop ro.product.cpu.abi
2>:Deployment failed
2>System.InvalidOperationException: 'D:\Programs\Java\jdk1.8.0_102\bin\jarsigner.exe' exited with code '1':
2> at Xamarin.AndroidTools.PlatformPackage.Exec(String step, ProcessStartInfo psi, IProgressNotifier progressReporter, CancellationToken token)
2> at Xamarin.AndroidTools.PlatformPackage.Jarsigner(String unsigned, String packageDir, IProgressNotifier progressReporter, CancellationToken token)
2> at Xamarin.AndroidTools.PlatformPackage.GetPlatformPackagePath(Int32 apiLevel, String aaptPath, IProgressNotifier progressReporter, CancellationToken token)
2> at Xamarin.AndroidTools.AndroidDeploySession.<InstallSharedPlatformAsync>c__async6.MoveNext()
2>--- End of stack trace from previous location where exception was thrown ---
2> at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
2> at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
2> at Xamarin.AndroidTools.AndroidDeploySession.<EnsureCorrectSharedRuntimes>c__async3.MoveNext()
2>--- End of stack trace from previous location where exception was thrown ---
2> at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
2> at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
2> at System.Runtime.CompilerServices.TaskAwaiter.GetResult()
2> at Xamarin.AndroidTools.AndroidDeploySession.<RunAsync>c__async2.MoveNext()
2>--- End of stack trace from previous location where exception was thrown ---
2> at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
2> at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
2> at Xamarin.AndroidTools.AndroidDeploySession.<RunLoggedAsync>c__async1.MoveNext()
2>The "InstallPackageAssemblies" task failed unexpectedly.
2>System.AggregateException: One or more errors occurred. ---> Xamarin.AndroidTools.AndroidDeploymentException: InternalError ---> System.InvalidOperationException: 'D:\Programs\Java\jdk1.8.0_102\bin\jarsigner.exe' exited with code '1':
2> at Xamarin.AndroidTools.PlatformPackage.Exec(String step, ProcessStartInfo psi, IProgressNotifier progressReporter, CancellationToken token)
2> at Xamarin.AndroidTools.PlatformPackage.Jarsigner(String unsigned, String packageDir, IProgressNotifier progressReporter, CancellationToken token)
2> at Xamarin.AndroidTools.PlatformPackage.GetPlatformPackagePath(Int32 apiLevel, String aaptPath, IProgressNotifier progressReporter, CancellationToken token)
2> at Xamarin.AndroidTools.AndroidDeploySession.<InstallSharedPlatformAsync>c__async6.MoveNext()
2>--- End of stack trace from previous location where exception was thrown ---
2> at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
2> at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
2> at Xamarin.AndroidTools.AndroidDeploySession.<EnsureCorrectSharedRuntimes>c__async3.MoveNext()
2>--- End of stack trace from previous location where exception was thrown ---
2> at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
2> at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
2> at System.Runtime.CompilerServices.TaskAwaiter.GetResult()
2> at Xamarin.AndroidTools.AndroidDeploySession.<RunAsync>c__async2.MoveNext()
2>--- End of stack trace from previous location where exception was thrown ---
2> at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
2> at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
2> at Xamarin.AndroidTools.AndroidDeploySession.<RunLoggedAsync>c__async1.MoveNext()
2> --- End of inner exception stack trace ---
2> at Xamarin.AndroidTools.AndroidDeploySession.<RunLoggedAsync>c__async1.MoveNext()
2>--- End of stack trace from previous location where exception was thrown ---
2> at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
2> at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
2> at Xamarin.AndroidTools.AndroidDeploySession.<StartAsync>c__async0.MoveNext()
2> --- End of inner exception stack trace ---
2> at System.Threading.Tasks.Task.ThrowIfExceptional(Boolean includeTaskCanceledExceptions)
2> at System.Threading.Tasks.Task.Wait(Int32 millisecondsTimeout, CancellationToken cancellationToken)
2> at System.Threading.Tasks.Task.Wait()
2> at Xamarin.Android.Tasks.InstallPackageAssemblies.Execute()
2> at Microsoft.Build.BackEnd.TaskExecutionHost.Microsoft.Build.BackEnd.ITaskExecutionHost.Execute()
2> at Microsoft.Build.BackEnd.TaskBuilder.<ExecuteInstantiatedTask>d__26.MoveNext()
2>---> (Inner Exception #0) Xamarin.AndroidTools.AndroidDeploymentException: InternalError ---> System.InvalidOperationException: 'D:\Programs\Java\jdk1.8.0_102\bin\jarsigner.exe' exited with code '1':
2> at Xamarin.AndroidTools.PlatformPackage.Exec(String step, ProcessStartInfo psi, IProgressNotifier progressReporter, CancellationToken token)
2> at Xamarin.AndroidTools.PlatformPackage.Jarsigner(String unsigned, String packageDir, IProgressNotifier progressReporter, CancellationToken token)
2> at Xamarin.AndroidTools.PlatformPackage.GetPlatformPackagePath(Int32 apiLevel, String aaptPath, IProgressNotifier progressReporter, CancellationToken token)
2> at Xamarin.AndroidTools.AndroidDeploySession.<InstallSharedPlatformAsync>c__async6.MoveNext()
2>--- End of stack trace from previous location where exception was thrown ---
2> at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
2> at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
2> at Xamarin.AndroidTools.AndroidDeploySession.<EnsureCorrectSharedRuntimes>c__async3.MoveNext()
2>--- End of stack trace from previous location where exception was thrown ---
2> at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
2> at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
2> at System.Runtime.CompilerServices.TaskAwaiter.GetResult()
2> at Xamarin.AndroidTools.AndroidDeploySession.<RunAsync>c__async2.MoveNext()
2>--- End of stack trace from previous location where exception was thrown ---
2> at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
2> at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
2> at Xamarin.AndroidTools.AndroidDeploySession.<RunLoggedAsync>c__async1.MoveNext()
2> --- End of inner exception stack trace ---
2> at Xamarin.AndroidTools.AndroidDeploySession.<RunLoggedAsync>c__async1.MoveNext()
2>--- End of stack trace from previous location where exception was thrown ---
2> at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
2> at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
2> at Xamarin.AndroidTools.AndroidDeploySession.<StartAsync>c__async0.MoveNext()<---
2>
2>Build FAILED.
由于