android


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

Related Links

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

Categories

HOME
grok
prism
apache-flink
nuget
access
bitbucket-api
javacc
scripting
emscripten
visual-studio-emulator
bing-maps
performancepoint
extjs4.2
google-schemas
plist
jxl
enterprise-architect
altera
mvc-mini-profiler
asp.net-mvc-viewmodel
topology
asciidoctor-pdf
ag
articulate-storyline
cgbitmapcontext
imageresizer
qliksense
short-url
siri
gpio
fable-f#
jackson-modules
angularjs-components
nstimer
ms-access-2003
handler
spotipy
carrierwave
mql
userdefaults
left-join
database-comparison
indy10
sql-delete
engine.io
apic
openproject
timing
amazon-ses
password-protection
apns-php
typesafe-config
visa
laravel-elixir
berkeley-db-je
memory-mapping
libgphoto2
lampp
datamaps
lightning
cvxpy
beamer
vorpal.js
libav
aspen
realsense
character-replacement
sciruby
oracle-spatial
video-player
fuelcms
rubaxa-sortable
amiga
baasbox
java-security
beatsmusic
ghcjs
sip-server
spy++
wcm
jqmodal
matrix-inverse
terminate
extjs2
mt4j
light
scringo
neos-server
mvc-editor-templates
pdfviewer
xcode3.2
adobe-media-server
correlated-subquery
cross-database
multiplatform
uipagecontrol
strsep
dataform
inline-formset
collectionviewsource
photolibrary
instantiationexception
cruisecontrol.rb
rowlex
eclipse-marketplace
tabpanel
wordprocessingml
fail-fast-fail-early
appliance

Resources

Mobile Apps Dev
Database Users
javascript
java
csharp
php
android
MS Developer
developer works
python
ios
c
html
jquery
RDBMS discuss
Cloud Virtualization
Database Dev&Adm
javascript
java
csharp
php
python
android
jquery
ruby
ios
html
Mobile App
Mobile App
Mobile App