Visual Studio Won't Deploy Project On Android Emulator - android

I just installed VS2017 and created a vanilla project just to see if I can get it to run on the Android emulator. The project builds, the emulator starts and runs but my application does not start in the emulator. I get no errors when the project is built or deployed. Can you please give me an idea as to where I can start to troubleshoot this.
Andy
1>------ Build started: Project: MyFirstApp.Android, Configuration: Debug Any CPU ------
1> MyFirstApp.Android -> c:\users\family\documents\visual studio 2017\Projects\MyFirstApp\MyFirstApp\MyFirstApp.Android\bin\Debug\MyFirstApp.Android.dll
1>c:\users\family\documents\visual studio 2017\Projects\MyFirstApp\MyFirstApp\MyFirstApp.Android\MyFirstApp.Android.csproj : warning XA0105: The $(TargetFrameworkVersion) for FormsViewGroup.dll (v7.1) is greater than the $(TargetFrameworkVersion) for your project (v6.0). You need to increase the $(TargetFrameworkVersion) for your project.
1>c:\users\family\documents\visual studio 2017\Projects\MyFirstApp\MyFirstApp\MyFirstApp.Android\MyFirstApp.Android.csproj : warning XA0105: The $(TargetFrameworkVersion) for Xamarin.Forms.Platform.Android.dll (v7.1) is greater than the $(TargetFrameworkVersion) for your project (v6.0). You need to increase the $(TargetFrameworkVersion) for your project.
1>c:\users\family\documents\visual studio 2017\Projects\MyFirstApp\MyFirstApp\MyFirstApp.Android\MyFirstApp.Android.csproj : warning XA0105: The $(TargetFrameworkVersion) for Xamarin.Forms.Platform.dll (v7.1) is greater than the $(TargetFrameworkVersion) for your project (v6.0). You need to increase the $(TargetFrameworkVersion) for your project.
2>Starting deploy VisualStudio_android-23_x86_phone ...
2>Starting emulator VisualStudio_android-23_x86_phone ...
2>C:\PROGRA~2\Android\ANDROI~1\tools\emulator.EXE -partition-size 512 -no-boot-anim -avd VisualStudio_android-23_x86_phone -prop monodroid.avdname=VisualStudio_android-23_x86_phone
2>Hax is enabled
2>Hax ram_size 0x40000000
2>HAX is working and emulator runs in fast virt mode.
2>emulator: Listening for console connections on port: 5554
2>emulator: Serial number of this emulator (for ADB): emulator-5554
2>emulator: emulator window was out of view and was recentered
2>Emulator VisualStudio_android-23_x86_phone is running.
2>Waiting for emulator to be ready...
2>Deploying VisualStudio_android-23_x86_phone ...
2>Build started.
2>Project "MyFirstApp.Android.csproj" (Install target(s)):
2>Project "MyFirstApp.csproj" (GetTargetFrameworkProperties target(s)):
2>Done building project "MyFirstApp.csproj".
2>Project "MyFirstApp.csproj" (GetTargetPath target(s)):
2>Done building project "MyFirstApp.csproj".
2>Project "MyFirstApp.csproj" (GetNativeManifest target(s)):
2>Done building project "MyFirstApp.csproj".
2>C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\MSBuild\15.0\Bin\Roslyn\csc.exe /noconfig /nowarn:1701,1702,2008 /nostdlib+ /errorreport:prompt /warn:4 /define:DEBUG;TRACE;__XAMARIN_ANDROID_v1_0__;__MOBILE__;__ANDROID__;__ANDROID_1__;__ANDROID_2__;__ANDROID_3__;__ANDROID_4__;__ANDROID_5__;__ANDROID_6__;__ANDROID_7__;__ANDROID_8__;__ANDROID_9__;__ANDROID_10__;__ANDROID_11__;__ANDROID_12__;__ANDROID_13__;__ANDROID_14__;__ANDROID_15__;__ANDROID_16__;__ANDROID_17__;__ANDROID_18__;__ANDROID_19__;__ANDROID_20__;__ANDROID_21__;__ANDROID_22__;__ANDROID_23__ /errorendlocation /preferreduilang:en-US /reference:"c:\users\family\documents\visual studio 2017\Projects\MyFirstApp\packages\Xamarin.Forms.2.3.4.247\lib\MonoAndroid10\FormsViewGroup.dll" /reference:"C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\Common7\IDE\ReferenceAssemblies\Microsoft\Framework\MonoAndroid\v1.0\Java.Interop.dll" /reference:"C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\Common7\IDE\ReferenceAssemblies\Microsoft\Framework\MonoAndroid\v6.0\Mono.Android.dll" /reference:"C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\Common7\IDE\ReferenceAssemblies\Microsoft\Framework\MonoAndroid\v1.0\mscorlib.dll" /reference:"c:\users\family\documents\visual studio 2017\Projects\MyFirstApp\MyFirstApp\MyFirstApp\bin\Debug\MyFirstApp.dll" /reference:"C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\Common7\IDE\ReferenceAssemblies\Microsoft\Framework\MonoAndroid\v1.0\System.Core.dll" /reference:"C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\Common7\IDE\ReferenceAssemblies\Microsoft\Framework\MonoAndroid\v1.0\System.dll" /reference:"C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\Common7\IDE\ReferenceAssemblies\Microsoft\Framework\MonoAndroid\v1.0\System.Xml.dll" /reference:"C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\Common7\IDE\ReferenceAssemblies\Microsoft\Framework\MonoAndroid\v1.0\System.Xml.Linq.dll" /reference:"c:\users\family\documents\visual studio 2017\Projects\MyFirstApp\packages\Xamarin.Android.Support.Animated.Vector.Drawable.23.3.0\lib\MonoAndroid403\Xamarin.Android.Support.Animated.Vector.Drawable.dll" /reference:"c:\users\family\documents\visual studio 2017\Projects\MyFirstApp\packages\Xamarin.Android.Support.Design.23.3.0\lib\MonoAndroid43\Xamarin.Android.Support.Design.dll" /reference:"c:\users\family\documents\visual studio 2017\Projects\MyFirstApp\packages\Xamarin.Android.Support.v4.23.3.0\lib\MonoAndroid403\Xamarin.Android.Support.v4.dll" /reference:"c:\users\family\documents\visual studio 2017\Projects\MyFirstApp\packages\Xamarin.Android.Support.v7.AppCompat.23.3.0\lib\MonoAndroid403\Xamarin.Android.Support.v7.AppCompat.dll" /reference:"c:\users\family\documents\visual studio 2017\Projects\MyFirstApp\packages\Xamarin.Android.Support.v7.CardView.23.3.0\lib\MonoAndroid403\Xamarin.Android.Support.v7.CardView.dll" /reference:"c:\users\family\documents\visual studio 2017\Projects\MyFirstApp\packages\Xamarin.Android.Support.v7.MediaRouter.23.3.0\lib\MonoAndroid403\Xamarin.Android.Support.v7.MediaRouter.dll" /reference:"c:\users\family\documents\visual studio 2017\Projects\MyFirstApp\packages\Xamarin.Android.Support.v7.RecyclerView.23.3.0\lib\MonoAndroid403\Xamarin.Android.Support.v7.RecyclerView.dll" /reference:"c:\users\family\documents\visual studio 2017\Projects\MyFirstApp\packages\Xamarin.Android.Support.Vector.Drawable.23.3.0\lib\MonoAndroid403\Xamarin.Android.Support.Vector.Drawable.dll" /reference:"c:\users\family\documents\visual studio 2017\Projects\MyFirstApp\packages\Xamarin.Forms.2.3.4.247\lib\MonoAndroid10\Xamarin.Forms.Core.dll" /reference:"c:\users\family\documents\visual studio 2017\Projects\MyFirstApp\packages\Xamarin.Forms.2.3.4.247\lib\MonoAndroid10\Xamarin.Forms.Platform.Android.dll" /reference:"c:\users\family\documents\visual studio 2017\Projects\MyFirstApp\packages\Xamarin.Forms.2.3.4.247\lib\MonoAndroid10\Xamarin.Forms.Platform.dll" /reference:"c:\users\family\documents\visual studio 2017\Projects\MyFirstApp\packages\Xamarin.Forms.2.3.4.247\lib\MonoAndroid10\Xamarin.Forms.Xaml.dll" /reference:"C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\Common7\IDE\ReferenceAssemblies\Microsoft\Framework\MonoAndroid\v1.0\Facades\Microsoft.Win32.Primitives.dll" /reference:"C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\Common7\IDE\ReferenceAssemblies\Microsoft\Framework\MonoAndroid\v1.0\Facades\Microsoft.Win32.Registry.AccessControl.dll" /reference:"C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\Common7\IDE\ReferenceAssemblies\Microsoft\Framework\MonoAndroid\v1.0\Facades\Microsoft.Win32.Registry.dll" /reference:"C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\Common7\IDE\ReferenceAssemblies\Microsoft\Framework\MonoAndroid\v1.0\Facades
....
2>Project "MyFirstApp.csproj" (GetCopyToOutputDirectoryItems target(s)):
2>Done building project "MyFirstApp.csproj".
2>MyFirstApp.Android -> c:\users\family\documents\visual studio 2017\Projects\MyFirstApp\MyFirstApp\MyFirstApp.Android\bin\Debug\MyFirstApp.Android.dll
2>The $(TargetFrameworkVersion) for FormsViewGroup.dll (v7.1) is greater than the $(TargetFrameworkVersion) for your project (v6.0). You need to increase the $(TargetFrameworkVersion) for your project.
2>The $(TargetFrameworkVersion) for Xamarin.Forms.Platform.Android.dll (v7.1) is greater than the $(TargetFrameworkVersion) for your project (v6.0). You need to increase the $(TargetFrameworkVersion) for your project.
2>The $(TargetFrameworkVersion) for Xamarin.Forms.Platform.dll (v7.1) is greater than the $(TargetFrameworkVersion) for your project (v6.0). You need to increase the $(TargetFrameworkVersion) for your project.
2> Processing: obj\Debug\res\layout\tabbar.xml
2> Processing: obj\Debug\res\layout\toolbar.xml
2> Processing: obj\Debug\res\values\styles.xml
2>C:\Program Files\Java\jdk1.8.0_131\\bin\keytool.exe -list -alias androiddebugkey -storepass android -keypass android -keystore "C:\Users\Family\AppData\Local\Xamarin\Mono for Android\debug.keystore"
2>C:\Program Files\Java\jdk1.8.0_131\\bin\jarsigner.exe -keystore "C:\Users\Family\AppData\Local\Xamarin\Mono for Android\debug.keystore" -storepass android -keypass android -digestalg SHA1 -sigalg md5withRSA -signedjar bin\Debug\\MyFirstApp.Android-Signed-Unaligned.apk "c:\users\family\documents\visual studio 2017\Projects\MyFirstApp\MyFirstApp\MyFirstApp.Android\obj\Debug\android\bin\MyFirstApp.Android.apk" androiddebugkey
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 (2047-06-08) or after any future revocation date.
2>C:\Program Files (x86)\Android\android-sdk\build-tools\23.0.3\zipalign.exe 4 "c:\users\family\documents\visual studio 2017\Projects\MyFirstApp\MyFirstApp\MyFirstApp.Android\bin\Debug\MyFirstApp.Android-Signed-Unaligned.apk" "bin\Debug\\MyFirstApp.Android-Signed.apk"
2>Done building project "MyFirstApp.Android.csproj".
2>Build succeeded.
2>Deploy successfully on VisualStudio_android-23_x86_phone
========== Build: 1 succeeded, 0 failed, 1 up-to-date, 0 skipped ==========
========== Deploy: 1 succeeded, 0 failed, 0 skipped ==========
This is what the emulator looks like and it just sits there instead of showing the application built/deployed above.

In the "Configuration Properties" of the main solution file check that the "Deploy feature" is enabled.

Related

Xamarin failed to deploy app to emulator with: "Unexpected install output: cmd: Can't find service: package"

I'm building the sample intro xamarin forms app With Visual studio 2019 and the emulator boots up but the app doesn't deploy with the error Unexpected install output: cmd: Can't find service: package":
1>No way to resolve conflict between "mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" and "mscorlib, Version=2.0.5.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e". Choosing "mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" arbitrarily.
1>C:\Program Files\Android\jdk\microsoft_dist_openjdk_1.8.0.9\bin\keytool.exe -list -alias androiddebugkey -storepass android -keypass android -keystore "C:\Users\sticker592\AppData\Local\Xamarin\Mono for Android\debug.keystore"
1>C:\Program Files (x86)\Android\android-sdk\build-tools\25.0.3\zipalign.exe -p 4 "C:\Users\sticker592\Downloads\FirstApp\AwesomeApp\AwesomeApp.Android\obj\Debug\81\android\bin\com.companyname.AwesomeApp.apk" "bin\Debug\\com.companyname.AwesomeApp-Signed.apk"
1>C:\Program Files\Android\jdk\microsoft_dist_openjdk_1.8.0.9\bin\java.exe -jar "C:\Program Files (x86)\Android\android-sdk\build-tools\25.0.3\lib\apksigner.jar" sign --ks "C:\Users\sticker592\AppData\Local\Xamarin\Mono for Android\debug.keystore" --ks-pass pass:android --ks-key-alias androiddebugkey --key-pass pass:android --min-sdk-version 21 --max-sdk-version 27 C:\Users\sticker592\Downloads\FirstApp\AwesomeApp\AwesomeApp.Android\bin\Debug\com.companyname.AwesomeApp-Signed.apk
1>ADB0000: Deployment failed
1>Mono.AndroidTools.InstallFailedException: Unexpected install output: cmd: Can't find service: package
1>
1> at Mono.AndroidTools.Internal.AdbOutputParsing.CheckInstallSuccess(String output, String packageName) in E:\A\_work\413\s\External\androidtools\Mono.AndroidTools\Internal\AdbOutputParsing.cs:line 345
1> at Mono.AndroidTools.AndroidDevice.<>c__DisplayClass95_0.<InstallPackage>b__0(Task`1 t) in E:\A\_work\413\s\External\androidtools\Mono.AndroidTools\AndroidDevice.cs:line 753
1> at System.Threading.Tasks.ContinuationTaskFromResultTask`1.InnerInvoke()
1> at System.Threading.Tasks.Task.Execute()
1>ADB0010: Unexpected install output: cmd: Can't find service: package
1>
1> at Mono.AndroidTools.Internal.AdbOutputParsing.CheckInstallSuccess(String output, String packageName) in E:\A\_work\413\s\External\androidtools\Mono.AndroidTools\Internal\AdbOutputParsing.cs:line 345
1> at Mono.AndroidTools.AndroidDevice.<>c__DisplayClass95_0.<InstallPackage>b__0(Task`1 t) in E:\A\_work\413\s\External\androidtools\Mono.AndroidTools\AndroidDevice.cs:line 753
1> at System.Threading.Tasks.ContinuationTaskFromResultTask`1.InnerInvoke()
1> at System.Threading.Tasks.Task.Execute()
1>Done building project "AwesomeApp.Android.csproj" -- FAILED.
1>Build FAILED.
In my case it helped to do a Factory Reset of the emulation device in the Android Device Manager.
SOLUTION FOR MANY ISSUES THAT I'VE FACED:
As user5389726598465 mentioned, "Switching from Android 9.0 Emulator to Android 8 Oreo image" makes Visual Studio to uninstall a Mono shared runtime and install a new one. It's like a Mono repair it seems.
Here are the steps within Visual Studio:
1- Create a project/solution.
2- Go to Tools > Android > Android SDK Manager.
3- Install your desired Android with all its components. e.g. Android 8 Oreo. (wait for the installation to finish!)
NOTE: If you're using Visual Studio 2019 like me you have to go with Android 8.1 Oreo or higher.
Now you can uninstall the old one - optional.
4- Go to Tools > Android > Android Device Manager.
5- Create a new device/Emulator with exactly the same OS and API version which you chose in step 1.
(Do NOT go with x86_64 Processor to avoid random errors)
6- Under Solution right-click on myApp.Android project > Properties > Application >
set Compile using Android version: (Target Framework) TO select your matching Android version .
7- Android device manager > Run. (Wait for Android Emulator to completely boot up.)
8- Clean then Build your solution.
9- Run the solution and wait. (This step might take more than 20 minutes for the first time with no visualizing process. Leave the computer, be patient and don't break the program until you see your output on the Emulator screen!)
Well done!
As a workaround, switching from an Android 9.0 Emulator to Android 8 Oreo image solved the problem.
Last week I used My Device (red box in screenshot) without issue. This week I was getting:
Mono.AndroidTools.InstallFailedException: Unexpected install output: cmd: Can't find service: package
Tweaking Reza's answer I created a new emulator in the same project, My Device 2 (purple box in screenshot), and it works on that device.
Just factory reset the device and let it build over. That should do the trick

Installing Kivy on Windows 7 with Anaconda Python 3.6

I am trying to install Kivy on my Windows 7 PC for Android development using python.
I have followed the steps mentioned here.kivy installation on Windows
I am getting the following error for
python -m pip install kivy
The first error
C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\BIN\x86_amd64\link.exe /nologo /INCREMENTAL:NO /LTCG /DLL /MANIFEST:EMBED,ID=2 /MANIFESTUAC:NO /LIBPATH:C:\Users\OEM\Anaconda3\libs /LIBPATH:C:\Users\OEM\Anaconda3\PCbuild\amd64 "/LIBPATH:C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\LIB\amd64" "/LIBPATH:C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\ATLMFC\LIB\amd64" "/LIBPATH:C:\Program Files (x86)\Windows Kits\10\lib\10.0.10586.0\ucrt\x64" "/LIBPATH:C:\Program Files (x86)\Windows Kits\NETFXSDK\4.6.1\lib\um\x64" "/LIBPATH:C:\Program Files (x86)\Windows Kits\10\lib\10.0.10586.0\um\x64" /EXPORT:PyInit_buffer build\temp.win-amd64-3.6\Release\Users\OEM\AppData\Local\Temp\pip-build-jmayz55y\kivy\kivy\graphics\buffer.obj /OUT:build\lib.win-amd64-3.6\kivy\graphics\buffer.cp36-win_amd64.pyd /IMPLIB:build\temp.win-amd64-3.6\Release\Users\OEM\AppData\Local\Temp\pip-build-jmayz55y\kivy\kivy\graphics\buffer.cp36-win_amd64.lib
buffer.obj : warning LNK4197: export 'PyInit_buffer' specified multiple times; using first specification
Creating library build\temp.win-amd64-3.6\Release\Users\OEM\AppData\Local\Temp\pip-build-jmayz55y\kivy\kivy\graphics\buffer.cp36-win_amd64.lib and object build\temp.win-amd64-3.6\Release\Users\OEM\AppData\Local\Temp\pip-build-jmayz55y\kivy\kivy\graphics\buffer.cp36-win_amd64.exp
Generating code
Finished generating code
cythoning C:\Users\OEM\AppData\Local\Temp\pip-build-jmayz55y\kivy\kivy\graphics/context.pyx to C:\Users\OEM\AppData\Local\Temp\pip-build-jmayz55y\kivy\kivy\graphics\context.c
building 'kivy.graphics.context' extension
C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\BIN\x86_amd64\cl.exe /c /nologo /Ox /W3 /GL /DNDEBUG /MD -IC:\Users\OEM\Anaconda3\include -IC:\Users\OEM\Anaconda3\include "-IC:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\INCLUDE" "-IC:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\ATLMFC\INCLUDE" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.10586.0\ucrt" "-IC:\Program Files (x86)\Windows Kits\NETFXSDK\4.6.1\include\um" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.10586.0\shared" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.10586.0\um" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.10586.0\winrt" /TcC:\Users\OEM\AppData\Local\Temp\pip-build-jmayz55y\kivy\kivy\graphics\context.c /Fobuild\temp.win-amd64-3.6\Release\Users\OEM\AppData\Local\Temp\pip-build-jmayz55y\kivy\kivy\graphics\context.obj
context.c
c:\users\oem\appdata\local\temp\pip-build-jmayz55y\kivy\kivy\graphics\gl_redirect.h(8): fatal error C1083: Cannot open include file: 'GL/glew.h': No such file or directory
error: command 'C:\\Program Files (x86)\\Microsoft Visual Studio 14.0\\VC\\BIN\\x86_amd64\\cl.exe' failed with exit status 2
----------------------------------------
Running setup.py clean for kivy
Failed to build kivy
Installing collected packages: kivy
Running setup.py install for kivy: started
Running setup.py install for kivy: finished with status 'error'
Complete output from command C:\Users\OEM\Anaconda3\python.exe -u -c "import setuptools, tokenize;__file__='C:\\Users\\OEM\\AppData\\Local\\Temp\\pip-build-jmayz55y\\kivy\\setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record C:\Users\OEM\AppData\Local\Temp\pip-wg_pau0w-record\install-record.txt --single-version-externally-managed --compile:
Using distutils
Detected Cython version 0.25.2
This version of Cython is untested with Kivy. While this version may
work perfectly fine, it is possible that you may experience issues. If
you do have issues, please downgrade to a supported version. It is
best to use the newest supported version, 0.23, but the minimum
supported version is 0.20.
If your platform provides a Cython package, check if you can downgrade
to a supported version. Otherwise, uninstall the platform package and
install Cython via pip:
pip install -I Cython==0.23
User distribution detected, avoid portable command.
Windows platform detected, force GLEW usage.
Using this graphics system: OpenGL
WARNING: A problem occured while running pkg-config --libs --cflags gstreamer-1.0 (code 1)
b"'pkg-config' is not recognized as an internal or external command,\r\noperable program or batch file.\r\n"
WARNING: A problem occured while running pkg-config --libs --cflags sdl2 SDL2_ttf SDL2_image SDL2_mixer (code 1)
b"'pkg-config' is not recognized as an internal or external command,\r\noperable program or batch file.\r\n"
The second error:
C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\BIN\x86_amd64\link.exe /nologo /INCREMENTAL:NO /LTCG /DLL /MANIFEST:EMBED,ID=2 /MANIFESTUAC:NO /LIBPATH:C:\Users\OEM\Anaconda3\libs /LIBPATH:C:\Users\OEM\Anaconda3\PCbuild\amd64 "/LIBPATH:C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\LIB\amd64" "/LIBPATH:C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\ATLMFC\LIB\amd64" "/LIBPATH:C:\Program Files (x86)\Windows Kits\10\lib\10.0.10586.0\ucrt\x64" "/LIBPATH:C:\Program Files (x86)\Windows Kits\NETFXSDK\4.6.1\lib\um\x64" "/LIBPATH:C:\Program Files (x86)\Windows Kits\10\lib\10.0.10586.0\um\x64" /EXPORT:PyInit_buffer build\temp.win-amd64-3.6\Release\Users\OEM\AppData\Local\Temp\pip-build-jmayz55y\kivy\kivy\graphics\buffer.obj /OUT:build\lib.win-amd64-3.6\kivy\graphics\buffer.cp36-win_amd64.pyd /IMPLIB:build\temp.win-amd64-3.6\Release\Users\OEM\AppData\Local\Temp\pip-build-jmayz55y\kivy\kivy\graphics\buffer.cp36-win_amd64.lib
buffer.obj : warning LNK4197: export 'PyInit_buffer' specified multiple times; using first specification
Creating library build\temp.win-amd64-3.6\Release\Users\OEM\AppData\Local\Temp\pip-build-jmayz55y\kivy\kivy\graphics\buffer.cp36-win_amd64.lib and object build\temp.win-amd64-3.6\Release\Users\OEM\AppData\Local\Temp\pip-build-jmayz55y\kivy\kivy\graphics\buffer.cp36-win_amd64.exp
Generating code
Finished generating code
skipping 'C:\Users\OEM\AppData\Local\Temp\pip-build-jmayz55y\kivy\kivy\graphics\context.c' Cython extension (up-to-date)
building 'kivy.graphics.context' extension
C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\BIN\x86_amd64\cl.exe /c /nologo /Ox /W3 /GL /DNDEBUG /MD -IC:\Users\OEM\Anaconda3\include -IC:\Users\OEM\Anaconda3\include "-IC:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\INCLUDE" "-IC:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\ATLMFC\INCLUDE" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.10586.0\ucrt" "-IC:\Program Files (x86)\Windows Kits\NETFXSDK\4.6.1\include\um" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.10586.0\shared" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.10586.0\um" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.10586.0\winrt" /TcC:\Users\OEM\AppData\Local\Temp\pip-build-jmayz55y\kivy\kivy\graphics\context.c /Fobuild\temp.win-amd64-3.6\Release\Users\OEM\AppData\Local\Temp\pip-build-jmayz55y\kivy\kivy\graphics\context.obj
context.c
c:\users\oem\appdata\local\temp\pip-build-jmayz55y\kivy\kivy\graphics\gl_redirect.h(8): fatal error C1083: Cannot open include file: 'GL/glew.h': No such file or directory
error: command 'C:\\Program Files (x86)\\Microsoft Visual Studio 14.0\\VC\\BIN\\x86_amd64\\cl.exe' failed with exit status 2
----------------------------------------
What is wrong with the installation?
From your first error message, your cython version may be the culprit. According to the kivy docs:
This version of Kivy requires at least Cython version 0.23, and has been tested through 0.23. Later versions may work, but as they have not been tested there is no guarantee.
Before installing kivy, try installing the specific cython version 0.23.
pip install cython==0.23
And then repeat the installation of kivy.
Py35+ support was added only recently, therefore Kivy 1.9.1 version (that on pypi) won't work on py35+.
To make it work compile either from source:
pip install https://github.com/kivy/kivy/zipball/master
or use wheels that are exactly on the same documentation page.

Xamarin Android app closes immediately after launching

I am using Xamarin in Visual Studio.
I created an boilerplate android app (click me) and I tried the following:
Scenario 1:
Switch to release mode
right click on project > Export Android Package (.apk)
Side loaded generated .apk it onto my phone
App launches with no issue
Scenario 2
Switch to release mode
Tools > Android > Publish Android App
Signed APK after creating private key store
Side load generated .apk (in release folder) onto phone
App closes immediately after launching (no error message, nothing)
What could be the issue here?
Do I need to do anything else after signing the package?
In both scenarios, the output apk is the same size 5227kb
UPDATE:
I have tried the same thing running on the android emulator. Same results. The app runs fine in debug mode on the emulator. Once I've switched it to Release, I get "Unfortunately, App1 has stopped"
Here's the error log http://pastebin.com/4j1Vwtgf
UPDATE 2:
Here's the logs when I'm deploying under release mode:
1>Starting deploy 5" KitKat (4.4) XXHDPI Phone ...
1>Deploying 5" KitKat (4.4) XXHDPI Phone ...
1>Build started.
1>C:\Program Files (x86)\MSBuild\14.0\bin\csc.exe /noconfig /nowarn:1701,1702,2008 /nostdlib+ /errorreport:prompt /warn:4 /define:TRACE;__XAMARIN_ANDROID_v1_0__;__MOBILE__;__ANDROID__;__ANDROID_1__;__ANDROID_2__;__ANDROID_3__;__ANDROID_4__;__ANDROID_5__;__ANDROID_6__;__ANDROID_7__;__ANDROID_8__;__ANDROID_9__;__ANDROID_10__;__ANDROID_11__;__ANDROID_12__;__ANDROID_13__;__ANDROID_14__;__ANDROID_15__;__ANDROID_16__;__ANDROID_17__;__ANDROID_18__;__ANDROID_19__;__ANDROID_20__;__ANDROID_21__;__ANDROID_22__;__ANDROID_23__ /errorendlocation /preferreduilang:en-US /reference:"C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\MonoAndroid\v6.0\Mono.Android.dll" /reference:"C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\MonoAndroid\v1.0\mscorlib.dll" /reference:"C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\MonoAndroid\v1.0\System.Core.dll" /reference:"C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\MonoAndroid\v1.0\System.dll" /reference:"C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\MonoAndroid\v1.0\System.Xml.dll" /reference:"C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\MonoAndroid\v1.0\System.Xml.Linq.dll" /debug:pdbonly /filealign:512 /optimize+ /out:obj\Release\App1.dll /ruleset:"C:\Program Files (x86)\Microsoft Visual Studio 14.0\Team Tools\Static Analysis Tools\\Rule Sets\MinimumRecommendedRules.ruleset" /target:library /utf8output MainActivity.cs Resources\Resource.Designer.cs Properties\AssemblyInfo.cs "C:\Users\a\AppData\Local\Temp\MonoAndroid,Version=v6.0.AssemblyAttributes.cs" obj\Release\\TemporaryGeneratedFile_E7A71F73-0F8D-4B9B-B56E-8E70B10BC5D3.cs obj\Release\\TemporaryGeneratedFile_036C0B5B-1481-4323-8D20-8F5ADCB23D92.cs obj\Release\\TemporaryGeneratedFile_5937a670-0e60-4077-877b-f7221da3dda1.cs
1>App1 -> C:\Users\a\Documents\Visual Studio 2015\Projects\App1\App1\bin\Release\App1.dll
1> Processing: obj\Release\res\layout\main.xml
1> Processing: obj\Release\res\values\strings.xml
1>C:\Program Files (x86)\Java\jdk1.7.0_55\\bin\keytool.exe -list -alias androiddebugkey -storepass android -keypass android -keystore "C:\Users\al\AppData\Local\Xamarin\Mono for Android\debug.keystore"
1>C:\Program Files (x86)\Java\jdk1.7.0_55\\bin\jarsigner.exe -keystore "C:\Users\a\AppData\Local\Xamarin\Mono for Android\debug.keystore" -storepass android -keypass android -digestalg SHA1 -sigalg md5withRSA -signedjar bin\Release\\App1.App1-Signed-Unaligned.apk "C:\Users\a\Documents\Visual Studio 2015\Projects\App1\App1\obj\Release\android\bin\App1.App1.apk" androiddebugkey
1>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 (2046-02-20) or after any future revocation date.
1>C:\Program Files (x86)\Android\android-sdk\build-tools\23.0.1\zipalign.exe 4 "C:\Users\a\Documents\Visual Studio 2015\Projects\App1\App1\bin\Release\App1.App1-Signed-Unaligned.apk" "bin\Release\\App1.App1-Signed.apk"
1>Build succeeded.
1>Deploy successfully on 5" KitKat (4.4) XXHDPI Phone
And here are the build logs for debug mode
2>Starting deploy 5" KitKat (4.4) XXHDPI Phone ...
2>Deploying 5" KitKat (4.4) XXHDPI Phone ...
2>Build started.
2>C:\Program Files (x86)\Java\jdk1.7.0_55\\bin\keytool.exe -list -alias androiddebugkey -storepass android -keypass android -keystore "C:\Users\a\AppData\Local\Xamarin\Mono for Android\debug.keystore"
2>C:\Program Files (x86)\Java\jdk1.7.0_55\\bin\jarsigner.exe -keystore "C:\Users\a\AppData\Local\Xamarin\Mono for Android\debug.keystore" -storepass android -keypass android -digestalg SHA1 -sigalg md5withRSA -signedjar bin\Debug\\App1.App1-Signed-Unaligned.apk "C:\Users\a\Documents\Visual Studio 2015\Projects\App1\App1\obj\Debug\android\bin\App1.App1.apk" androiddebugkey
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 (2046-02-20) or after any future revocation date.
2>C:\Program Files (x86)\Android\android-sdk\build-tools\23.0.1\zipalign.exe 4 "C:\Users\a\Documents\Visual Studio 2015\Projects\App1\App1\bin\Debug\App1.App1-Signed-Unaligned.apk" "bin\Debug\\App1.App1-Signed.apk"
2>Build succeeded.
2>Deploy successfully on 5" KitKat (4.4) XXHDPI Phone
I had the same error running release builds in the emulator (VS Android emulator). Turns out, we had disabled x86 as supported architecture.
I had a similar issue with a basic app when I started with Xamarin. The problem was with the apk file I was using. I picked it from my bin/Release folder while the path for the actual signed + published + zip-aligned app was at the project folder level outside the bin directory.
The signed.apk file in Release mode uses the debug keystore and so it is not possible to publish that, more info here.
Was a pretty silly miss by me, so in case someone else also has this issue please make sure you are picking the right apk file before diving into further debugging.
Inside your pastebin logs, it looks like you have a specific error here. It seems that the libmonodroid.so is not being loaded here.
03-25 00:40:18.531 E/AndroidRuntime( 1407): java.lang.UnsatisfiedLinkError:
Couldn't load monodroid from loader
dalvik.system.PathClassLoader[DexPathList[[zip file "/data/app/App1.App1-
1.apk"],nativeLibraryDirectories=[/data/app-lib/App1.App1-1, /system/lib]]]:
findLibrary returned null
This issue typically means that for some reason libmonodroid.so is not being installed.
I would recommend the following items:
use adb uninstall <package name> to completely remove any old App1.App1 applications.
Clean / Rebuild your project (Also be sure to manually delete the bin/obj folders in your solution.
If this continues to be an issue. Ensure a File->New Android Project will Debug and also install correctly as a Release .apk. You should also gather adb logcat of your attempts once you follow steps #1-2.
I found a possible solution.
On your device, in the developer options menu, you have to enable 'Force gpu rendering'.
Hope that helps.

Visual Studio 2015 CTP - Android ant.bat build error MSB3073

I'm having a problem building my APK in MSVC 2015.
Could the problem have something to do with the build pipeline?
Any ideas?
2>------ Build started: Project: NativeApp1.Packaging, Configuration: Debug ARM ------
2> ANDROID_HOME=C:\Program Files (x86)\Android\android-sdk
2> ANT_HOME=C:\Program Files (x86)\Microsoft Visual Studio 14.0\Apps\apache-ant-1.9.3\
2> JAVA_HOME=C:\Program Files\Java\jdk1.7.0\jre
2> NDK_ROOT=C:\Program Files (x86)\Microsoft Visual Studio 14.0\Apps\android-ndk-r10\
2> 9.0 was unexpected at this time.
2>C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\V140\AndroidPackaging\Android.Common.targets(280,5): error MSB3073: The command ""C:\Program Files (x86)\Microsoft Visual Studio 14.0\Apps\apache-ant-1.9.3\\bin\ant.bat" debug -Dout.final.file="G:\Projects\Android\NativeApp1\ARM\Debug\NativeApp1.Packaging.apk"" exited with code 255.
first the JAVA_HOME is wrong, you should put SDK path not JRE path
JAVA_HOME C:\Program Files (x86)\Java\jdk1.7.0_03
JRE_HOME C:\Program Files (x86)\Java\jre7
this link should help you:
https://msdn.microsoft.com/en-us/library/dn872463%28v=vs.140%29.aspx?f=255&MSPPError=-2147217396
Sorry for my bad english.

Visual Studio Tools for Apache Cordova Error, MDAVSCLI failed with code 8

I recently installed Visual Studio Tools for Apache Cordova CTP 3 in Visual Studio 2013 running on Windows 8.1. I receive the following error when I try to run a standard new Cordova project (in the Android Emulator or Device). The project is named MyCordova01:
Error 20 cmd: Command failed with exit code 8 C:\Users\Me\documents\visual studio 2013\Projects\MyCordova01\MyCordova01\MDAVSCLÄ° 1 1 MyCordova01
Here is the build output:
1>------ Build started: Project: MyCordova01, Configuration: Debug Android ------
1>C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\v12.0\TypeScript\Microsoft.TypeScript.targets(97,5): warning : The TypeScript Compiler was given no files for compilation, so it will skip compiling.
1> GeneratedJavascript=
1> C:\Users\Me\documents\visual studio 2013\Projects\MyCordova01\MyCordova01>call "C:\Program Files\nodejs\"\nodevars.bat
1> Your environment has been set up for using Node.js 0.10.26 (x64) and npm.
1> ------ Ensuring correct global installation of package from source package directory: C:\PROGRAM FILES (X86)\MICROSOFT VISUAL STUDIO 12.0\COMMON7\IDE\EXTENSIONS\DXXQ5VLG.GQS\packages\vs-mda
1>MDAVSCLÄ° : error : cmd: Command failed with exit code 8
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========
========== Deploy: 0 succeeded, 0 failed, 0 skipped ==========
What could be the problem?
I already tried clearing the Cordova cache and running npm-install on the vs-mda directory.
UPDATE:
The diagnostic build log
The attached aapt.exe at code.google.com/p/android/issues/detail?id=77629 seems to fix the issue. Turns out that the problem is with the Android Build Tools.

Categories

Resources