[MonoDevelop] MacOSX Lion + MonoDevelop 2.8.2 + Mono for Android not installed

Alan alan.mcgovern at gmail.com
Tue Nov 8 06:31:22 EST 2011


Hi,

This is actually the most bizarre issue I've ever seen. The code path which
throws the 'Mono for Android is not installed' error is *identical* for the
case where you open an existing project and the case where you start a new
project. The first time the Mono for Android code is touched, a static
constructor runs which essentially verifies that the file "/
Developer/MonoAndroid//usr/**lib/mandroid/Mono.Android.**DebugRuntime-debug.apk"
exists, which it does.

However, if the file is *not* detected, then Mono for Android is marked as
not being installed and the information in the about dialog will display "Mono
for Android not installed", which yours does. The code which populates the
information in the about dialog is
https://gist.github.com/c29a1fd1aaf2bcbf2075 . The code which pops up the
error dialog is: https://gist.github.com/b34533235d56f4382e28 . This
variable is only assigned to once so it is impossible for you to be unable
to open an existing project and yet able to create a new one unless
something has gone horrifically wrong in Mono.

The log file should be found at
/Users/moljac/Library/Logs/MonoDevelop-2.8/MonoDevelop.log
. You missed the 'Logs' part of the path when you checked before. I'd love
a log file from immediately after you try to open an existing project and
it fails and also from when you create a new android project and it doesn't
throw an exception.

If you can repeatedly get this issue when opening existing projects I'll
sort out a special debug build which contains *much* more logging to try
and figure out exactly what has gone wrong.

Alan

On 8 November 2011 08:11, Miljenko Cvjetko <mcvjetko at holisticware.net>wrote:

>  Hi
>
>
> On 11/8/11 3:00 AM, Alan wrote:
>
> One last thing, do you get the same error when you create a brand new Mono
> for Android solution?
>
> Nope. All goes well with new solution, but got error from AssemblyInfo.cs
> but this is matter for
> mono-android group...
>
> For us it is still to clear why we get error for older solutions...
>
> @mono-android guys:
> Brand new sln. Hit Run/Debug got this:
>
>
> ------------------------------------ Snip begin
> ---------------------------------------------
> Build Output
>
> Building: sasa (Debug)
>
> Building Solution sasa
>
> Building: sasa (Debug)
>
> Performing main compilation...
>
> Build started 11/08/2011 08:52:50.
> __________________________________________________
> Project "/Users/moljac/Projects/sasa/sasa/sasa.csproj" (Build target(s)):
>
>     Target _GenerateAndroidAssetsDir:
>     No output files were specified for target _GenerateAndroidAssetsDir,
> skipping.
>
>     Target _GenerateAndroidResourceDir:
>     Skipping target "_GenerateAndroidResourceDir" because its outputs are
> up-to-date.
>
>     Target _ResolveMonoAndroidSdks:
>         MonoAndroid Tools: /Developer/MonoAndroid/usr/lib/mandroid/
>         MonoAndroid Framework:
> /Developer/MonoAndroid/usr/lib/mandroid/platforms/android-8;/Developer/MonoAndroid/usr/lib/mono/2.1
>         Android SDK: /opt/android/sdk/
>         Java SDK: /usr/
>
>     Target _ValidateAndroidPackageProperties:
>         GetAndroidPackageName Task
>           ManifestFile:
>           AssemblyName: sasa
>           PackageName: sasa.sasa
>
>     Target _UpdateAndroidResgen:
>     Skipping target "_UpdateAndroidResgen" because its outputs are
> up-to-date.
>
>     Target PrepareForBuild:
>         Configuration: Debug Platform: AnyCPU
>
>     Target GenerateSatelliteAssemblies:
>     No input files were specified for target GenerateSatelliteAssemblies,
> skipping.
>
>     Target CoreCompile:
>         Tool /Developer/MonoAndroid/usr/lib/mandroid/../../bin/smcs
> execution started with arguments: /noconfig /debug:full /debug+ /optimize-
> /out:obj/Debug/sasa.dll Activity1.cs Resources/Resource.designer.cs
> Properties/AssemblyInfo.cs /target:library
> /define:"DEBUG;__ANDROID__;__ANDROID_1__;__ANDROID_2__;__ANDROID_3__;__ANDROID_4__;__ANDROID_5__;__ANDROID_6__;__ANDROID_7__;__ANDROID_8__"
> /reference:/Developer/MonoAndroid/usr/lib/mono/2.1/System.dll
> /reference:/Developer/MonoAndroid/usr/lib/mono/2.1/System.Xml.dll
> /reference:/Developer/MonoAndroid/usr/lib/mandroid/platforms/android-8/Mono.Android.dll
> /reference:/Developer/MonoAndroid/usr/lib/mono/2.1/System.Core.dll /warn:4
> Properties/AssemblyInfo.cs(30,12): error CS0246: The type or namespace
> name `UsesPermission' could not be found. Are you missing a using directive
> or an assembly reference?
> Properties/AssemblyInfo.cs(30,12): error CS0246: The type or namespace
> name `UsesPermissionAttribute' could not be found. Are you missing a using
> directive or an assembly reference?
>     Task "Csc" execution -- FAILED
>     Done building target "CoreCompile" in project
> "/Users/moljac/Projects/sasa/sasa/sasa.csproj".-- FAILED
>
> Done building project "/Users/moljac/Projects/sasa/sasa/sasa.csproj".--
> FAILED
>
> Build FAILED.
> Errors:
>
> /Users/moljac/Projects/sasa/sasa/sasa.csproj (Build) ->
> /Library/Frameworks/Mono.framework/Versions/2.10.6/lib/mono/4.0/Microsoft.CSharp.Targets
> (CoreCompile target) ->
>
>     Properties/AssemblyInfo.cs(30,12): error CS0246: The type or namespace
> name `UsesPermission' could not be found. Are you missing a using directive
> or an assembly reference?
>     Properties/AssemblyInfo.cs(30,12): error CS0246: The type or namespace
> name `UsesPermissionAttribute' could not be found. Are you missing a using
> directive or an assembly reference?
>
>      0 Warning(s)
>      2 Error(s)
>
> Time Elapsed 00:00:01.6348940
> Build complete -- 2 errors, 0 warnings
>
> ---------------------- Done ----------------------
>
> Build: 2 errors, 0 warnings
> ------------------------------------ Snip End
> ---------------------------------------------
>
> I was suspeting that java sdk in /usr/ was the cause, but checked
> everything one more time (installation etc)
>
> MonoDevelop + Preferences + Other:
>
>
>
>
>
>  Thanks!
>
>
> You are welcome
>
> greetings
>
> mel
>
>
>
> --
> Miljenko Cvjetko dipl.ing. ET
> 	Direktor/CEO
> 	Projektant rješenja/Solution Architect	
> 	Razvojni programer/Senior developer
> 	Voditelj projekta/Project Manager
>
> IX južna obala 13
> Kajzerica Zagreb
> T: 385 1 7775555
> M: 385 91 557 447 3
> F: 385 1 7779556
> e: mcvjetko at holisticware.net
> w: http://www.holisticware.net
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.ximian.com/pipermail/monodevelop-list/attachments/20111108/983bb16b/attachment.html 


More information about the Monodevelop-list mailing list