Azure-Samples/MyDriving

MyDriving Android can't be deployed

kingliantop opened this issue · 2 comments

HI guys,

I installed VS2015+xmarin 4.1, following the instruction to get the source code and build it without any troubles, while when I want to started MyDriving.Android with emulator, I always failed of the error like
"jarsigner.exe" exited with code 1."

I tried to change JDK from default 1.7.0.55 to 1.7.0.80, it doesn't work either. Any ideas or suggestions? Thanks a lot!

0>MyDriving.Android -> D:\DevSpace\MyDriving\MyDriving-master\src\MobileApps\MyDriving\MyDriving.Android\bin\Debug\MyDriving.Droid.dll
10>Consider app.config remapping of assembly "PCLStorage.Abstractions, Culture=neutral, PublicKeyToken=286fe515a2c35b64" from Version "1.0.0.0" [] to Version "1.0.2.0" [D:\DevSpace\MyDriving\MyDriving-master\src\MobileApps\packages\PCLStorage.1.0.2\lib\monoandroid\PCLStorage.Abstractions.dll] to solve conflict and get rid of warning.
10>Consider app.config remapping of assembly "System.Net.Primitives, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" from Version "3.9.0.0" [] to Version "4.0.0.0" [C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\MonoAndroid\v1.0\Facades\System.Net.Primitives.dll] to solve conflict and get rid of warning.
10>Consider app.config remapping of assembly "System.Net.Http.Primitives, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" from Version "1.5.0.0" [] to Version "4.2.29.0" [D:\DevSpace\MyDriving\MyDriving-master\src\MobileApps\packages\Microsoft.Net.Http.2.2.29\lib\monoandroid\System.Net.Http.Primitives.dll] to solve conflict and get rid of warning.
10>Consider app.config remapping of assembly "System.Net.Http, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" from Version "1.5.0.0" [] to Version "4.0.0.0" [C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\MonoAndroid\v1.0\System.Net.Http.dll] to solve conflict and get rid of warning.
10>Consider app.config remapping of assembly "Newtonsoft.Json, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed" from Version "6.0.0.0" [] to Version "8.0.0.0" [D:\DevSpace\MyDriving\MyDriving-master\src\MobileApps\packages\Newtonsoft.Json.8.0.3\lib\portable-net40+sl5+wp80+win8+wpa81\Newtonsoft.Json.dll] to solve conflict and get rid of warning.
10>Consider app.config remapping of assembly "System.Threading.Tasks, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" from Version "1.5.11.0" [] to Version "4.0.0.0" [C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\MonoAndroid\v1.0\Facades\System.Threading.Tasks.dll] to solve conflict and get rid of warning.
10>Found conflicts between different versions of the same dependent assembly. In Visual Studio, double-click this warning (or select it and press Enter) to fix the conflicts; otherwise, add the following binding redirects to the "runtime" node in the application configuration file:
10> Processing: obj\Debug\res\drawable\background_splash.xml
10> Processing: obj\Debug\res\layout\activity_getting_started.xml
10> Processing: obj\Debug\res\layout\activity_login.xml
10> Processing: obj\Debug\res\layout\activity_main.xml
10> Processing: obj\Debug\res\layout\activity_past_trip_details.xml
10> Processing: obj\Debug\res\layout\activity_trip_summary.xml
10> Processing: obj\Debug\res\layout\fragment_current_trip.xml
10> Processing: obj\Debug\res\layout\fragment_past_trips.xml
10> Processing: obj\Debug\res\layout\fragment_profile.xml
10> Processing: obj\Debug\res\layout\fragment_started_1.xml
10> Processing: obj\Debug\res\layout\fragment_started_2.xml
10> Processing: obj\Debug\res\layout\fragment_started_3.xml
10> Processing: obj\Debug\res\layout\fragment_started_4.xml
10> Processing: obj\Debug\res\layout\fragment_started_5.xml
10> Processing: obj\Debug\res\layout\item_trip.xml
10> Processing: obj\Debug\res\layout
10>av_header.xml
10> Processing: obj\Debug\res\layout\toolbar.xml
10> Processing: obj\Debug\res\menu\menu_current_trip.xml
10> Processing: obj\Debug\res\menu\menu_summary.xml
10> Processing: obj\Debug\res\menu
10>av_menu.xml
10> Processing: obj\Debug\res\values\colors.xml
10> Processing: obj\Debug\res\values\dimen.xml
10> Processing: obj\Debug\res\values\strings.xml
10> Processing: obj\Debug\res\values\styles.xml
10> Processing: obj\Debug\res\values-v19\styles.xml
10> Processing: obj\Debug\res\values-v21\styles.xml
10> Processing: obj\Debug\res\xml\preferences.xml
10>C:\Java\jdk1.7.0_80\bin\jarsigner.exe -keystore Build2016.keystore -storepass "Build_1234" -keypass "Build_1234" -digestalg SHA1 -sigalg md5withRSA -signedjar bin\Debug\com.microsoft.mydriving-Signed-Unaligned.apk D:\DevSpace\MyDriving\MyDriving-master\src\MobileApps\MyDriving\MyDriving.Android\obj\Debug\android\bin\com.microsoft.mydriving.apk Build2016
10>"jarsigner.exe" exited with code 1.
10>Build FAILED.
10>
========== Build: 9 succeeded, 0 failed, 0 up-to-date, 0 skipped ==========
========== Deploy: 0 succeeded, 1 failed, 0 skipped ==========

Change the VS output up: Tools, Options, Projects and Solutions, Build and Run.
Change bottom 2 dropdowns to "Normal".

Now build.

You will get the command line and the error.
In my case it was trying to use a debug.keystore file that didn't exist, so I created one and placed it in that location http://stackoverflow.com/a/4055893

closing this issue since this is stale. Please reopen if the above workaround doesnt work.