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

Titanium Samsung Galaxy S7 close window shows white screen
Android: ListPreference title attribute in xml should contain a string concatenated with the selected value
print service without wifi connection is not working
Display specific markers based on spinner
Android MockWebServer dispatcher problems
Binding adapter in onViewStateRestored impacts on Performance
Attach an internal storage encoded bitmap string in email
java.lang.UnsatisfiedLinkError: dalvik.system.PathClassLoader[DexPathList…] couldn't find “libdetection_based_tracker.so”
Create schedule save data in android service based on system time
Why this null pointer error is comming? [duplicate]
Choose which android device (emulator or phone) will react-native run-android run on
Error: `com.android.Volley.ServerError` when calling local REST service from Android
Starting activity from onClickListener inside RecyclerView
Get all pictures in SD and storing it in Array
How can I check texallcaps is true/false for Editext/TextView in Andorid at run time?
First sound with SoudPool not loud enough android

Categories

HOME
sonarqube
adal
twig
mjml
zend-framework
can
alarm
access
big-o
flume
github-enterprise
xcodebuild
flatpak
linear-algebra
event-sourcing
mvc-mini-profiler
soci
cfml
boost-icl
selinux
symbols
breadth-first-search
rubymotion
jquery-multiselect
angularjs-components
has-and-belongs-to-many
ms-access-2003
progress-bar
bringtofront
subclass
mql
sqlpackage
testcomplete
magento-1.8
autodesk-designautomation
record
dumpbin
android-gridview
hard-drive
instantiation
openwhisk
installscript
mnist
lubridate
roblox
google-knowledge-graph
wurfl
linqpad
microsoft-metro
apollostack
stylecop
getchar
openrasta
sonarlint-eclipse
globalize
aquamacs
cup
reshape
gpg-signature
rxtx
smartfoxserver
slackware
atlas
jodd
tracker-enabled-dbcontext
np-spring
jparsec
vhosts
character-replacement
doctype
amiga
teamcity-9.1
fail2ban
phpldapadmin
ejb-2.x
reflector
lnk
dct
koala
rfc5322
http-patch
jammer
hidapi
adobe-media-server
appjs
inkcanvas
metaweblog
silent
globals
addchild
complex-event-processing
fail-fast-fail-early

Resources

Database Users
RDBMS discuss
Database Dev&Adm
javascript
java
csharp
php
android
javascript
java
csharp
php
python
android
jquery
ruby
ios
html
Mobile App
Mobile App
Mobile App