how to create a build file to build mono android project and generate myproject.apk file.?
I have a mono android project. I can use monodevelop to build the apk of my project. But I want to write a build file (like we do using ANT) with targets that can generate the .apk file. Please point me to the right direction. I have figured out the we need to use mandroid.exe to generate .apk from the .dll. the log shows that there is a target called _Manddroid that monodevelop's build tool runs. This target in turn runs following command C:\Program Files\MSBuild\Novell\mandroid.exe -v --nosign --sdk-dir="C:\Android\android-sdk" --builddir="C:\Users\Sikha\Documents\Projects\helloShikha\helloShikha\obj\Debug\android" --framework-dir="C:\Program Files\Reference Assemblies\Microsoft\Framework\MonoAndroid\v2.2" --framework-dir="C:\Program Files\Reference Assemblies\Microsoft\Framework\MonoAndroid\v1.0" -S="C:\Users\Sikha\Documents\Projects\helloShikha\helloShikha\obj\Debug\res" --package="helloShikha.helloShikha" --nolink --abi="armeabi" --java-sdk-dir="C:\Program Files\Java\jdk1.6.0_30" --debug --sdk-platform="8" "C:\Users\Sikha\Documents\Projects\helloShikha\helloShikha\bin\Debug\helloShikha.dll" "C:\Program Files\Reference Assemblies\Microsoft\Framework\MonoAndroid\v2.2\Mono.Android.dll" "C:\Program Files\Reference Assemblies\Microsoft\Framework\MonoAndroid\v1.0\mscorlib.dll" "C:\Program Files\Reference Assemblies\Microsoft\Framework\MonoAndroid\v1.0\System.Core.dll" "C:\Program Files\Reference Assemblies\Microsoft\Framework\MonoAndroid\v1.0\System.dll" "C:\Program Files\Reference Assemblies\Microsoft\Framework\MonoAndroid\v1.0\System.Xml.dll" When I try to copy paste the above command on cmd nothing happens. Any Idea what I am missing here?
I used following command and it generated the .apk file for me. C:\Windows\Microsoft.NET\Framework\v4.0.30319\MSBuild.exe myproject.csproj /t:Package I tried using .sln file but was receiving an error : target Package does not exist in the project. I opened the myproject.csproj file and figured out that this file imports Novell.MomoDroid.CSharp.Targets which in turn imports the Novell.MonoDroid.Common.Targets The target "Package" is present in the file Novell.MonoDroid.Common.Targets.
Why do you want to write alternative targets? The Mono for Android project files are MSBuild-based, and MSBuild is Microsoft's equivalent of ant. This means the csproj files are already fully extensible and customizable, and can be built using the commandline MSBuild tool: C:\Windows\Microsoft.NET\Framework\v4.0.30319\MSBuild.exe YourSolution.sln
invalid param in LinerLayout:layout.weight? [closed]
Picasso onBitmapLoaded returns bitmap but not being drawn on canvas
I got the error when I am trying to delete items of Recycler View
How to transmit an Eddystone Beacon with Url using Altbeacon Library for Android
how can I change colour of list item background after it has been uploaded to an ERP server?
ListView with dynamic number of EditTexts containning rows
BURP and Fiddler don't detect WebSockets on Android/iOS?
Share via whatsapp doesn't add image if frequent contact is selected on Android
How to handle same pattern in uri matcher for content provider?
Android Volley gives error regarding session
Retrofit 2 does not parse response in case error
Image file path Issues
Android Studio inspections are different on different machines
Is the Samsung Camera SDK used to expand on the Camera2 API?
Null pointer error in jsonObjectRequest [duplicate]
How to add subitem in Listview