ResolveSDKs build error

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

ResolveSDKs build error

tmarkham1
I get the following error whenever I try to build the very basic sample "Hello Word" app:

The "ResolveSdks" task failed unexpectedly.
System.ArgumentException: Illegal characters in path.
   at System.IO.Path.CheckInvalidPathChars(String path)
   at System.IO.Path.Combine(String path1, String path2)
   at MonoDroid.MonoDroidSdk.Which(String executable, String[] pathDirs)
   at MonoDroid.MonoDroidSdk.FindAndroidSdk(String[] pathDirs)
   at MonoDroid.MonoDroidSdk.GetPaths(String& monoDroidBinDir, String& monoDroidFrameworkDir, String& androidSdkPath, String& javaSdkPath, TaskLoggingHelper log)
   at Novell.MonoDroid.Build.Tasks.ResolveSdks.Execute()
   at Microsoft.Build.BackEnd.TaskExecutionHost.Microsoft.Build.BackEnd.ITaskExecutionHost.Execute()
   at Microsoft.Build.BackEnd.TaskBuilder.ExecuteInstantiatedTask(ITaskExecutionHost taskExecutionHost, TaskLoggingContext taskLoggingContext, TaskHost taskHost, ItemBucket bucket, TaskExecutionMode howToExecuteTask, Boolean& taskResult)

FYI - I had the AndroidSDK installed previously in a C:\Dowloads folder. I moved that entire folder to my E: drive (straight file copy). I then re-ran the "SDK Setup.exe" from the E: drive and got an error as the AndroidSDK tried to rename the "tools" folder, saying it was in use. I decided to download the AndroidSDK again to a new folder on the C: drive (C:\AndroidSDK) and ran setup again. Setup completed just fine. I checked my PATH evironment variable and had to change it from C:\Downloads... to C:\AdroidSDK... to map the tools and platform-tools folders.

I'm at a loss as to what else to try. Looking through the entire solution, I don't see any paths with invalid characters in them.

Thoughts?  
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: ResolveSDKs build error

Jonathan Pobst
You might want to check the following registry keys the SDK installer
writes and see if they still have old paths:

HKEY_LOCAL_MACHINE\SOFTWARE\Android SDK Tools\Path
HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Android SDK Tools\Path

Additionally, you can look at Tools->Options->Mono for Android in Visual
Studio to set the Android SDK path manually.

(The first keys take precedence, so if they exist and are wrong, you
need to fix/remove them.)

Jonathan

On 4/25/2011 3:51 PM, tmarkham1 wrote:

> I get the following error whenever I try to build the very basic sample
> "Hello Word" app:
>
> The "ResolveSdks" task failed unexpectedly.
> System.ArgumentException: Illegal characters in path.
>     at System.IO.Path.CheckInvalidPathChars(String path)
>     at System.IO.Path.Combine(String path1, String path2)
>     at MonoDroid.MonoDroidSdk.Which(String executable, String[] pathDirs)
>     at MonoDroid.MonoDroidSdk.FindAndroidSdk(String[] pathDirs)
>     at MonoDroid.MonoDroidSdk.GetPaths(String&  monoDroidBinDir, String&
> monoDroidFrameworkDir, String&  androidSdkPath, String&  javaSdkPath,
> TaskLoggingHelper log)
>     at Novell.MonoDroid.Build.Tasks.ResolveSdks.Execute()
>     at
> Microsoft.Build.BackEnd.TaskExecutionHost.Microsoft.Build.BackEnd.ITaskExecutionHost.Execute()
>     at
> Microsoft.Build.BackEnd.TaskBuilder.ExecuteInstantiatedTask(ITaskExecutionHost
> taskExecutionHost, TaskLoggingContext taskLoggingContext, TaskHost taskHost,
> ItemBucket bucket, TaskExecutionMode howToExecuteTask, Boolean&  taskResult)
>
> FYI - I had the AndroidSDK installed previously in a C:\Dowloads folder. I
> moved that entire folder to my E: drive (straight file copy). I then re-ran
> the "SDK Setup.exe" from the E: drive and got an error as the AndroidSDK
> tried to rename the "tools" folder, saying it was in use. I decided to
> download the AndroidSDK again to a new folder on the C: drive
> (C:\AndroidSDK) and ran setup again. Setup completed just fine. I checked my
> PATH evironment variable and had to change it from C:\Downloads... to
> C:\AdroidSDK... to map the tools and platform-tools folders.
>
> I'm at a loss as to what else to try. Looking through the entire solution, I
> don't see any paths with invalid characters in them.
>
> Thoughts?
>
> --
> View this message in context: http://mono-for-android.1047100.n5.nabble.com/ResolveSDKs-build-error-tp4339406p4339406.html
> Sent from the Mono for Android mailing list archive at Nabble.com.
> _______________________________________________
> Monodroid mailing list
> [hidden email]
>
> UNSUBSCRIBE INFORMATION:
> http://lists.ximian.com/mailman/listinfo/monodroid
>
>

_______________________________________________
Monodroid mailing list
[hidden email]

UNSUBSCRIBE INFORMATION:
http://lists.ximian.com/mailman/listinfo/monodroid
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: ResolveSDKs build error

tmarkham1
I think I got it figured out. Although I did see either of the two registry locations you have listed above, I did a search for "android-sdk" (partial folder name) in the registry and found a key this location:

HKLM\Software\Novell\Mono for Android\

The  key in that location was called "AndroidSdkDirectory". It's value was set to "C:\android-sdk-windows". I changed that value to "C:\AndroidSDK\android-sdk-windows" (the correct location on my PC) and the app successfully built afterwards.

Thanks for the quick response BTW!
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: ResolveSDKs build error

Jonathan Pobst
Glad you figured it out.  That key is written by the
Tools->Options->Mono for Android settings page, but you can modify it
manually if you want.  :)

Jonathan


On 4/25/2011 4:11 PM, tmarkham1 wrote:

> I think I got it figured out. Although I did see either of the two registry
> locations you have listed above, I did a search for "android-sdk" (partial
> folder name) in the registry and found a key this location:
>
> HKLM\Software\Novell\Mono for Android\
>
> The  key in that location was called "AndroidSdkDirectory". It's value was
> set to "C:\android-sdk-windows". I changed that value to
> "C:\AndroidSDK\android-sdk-windows" (the correct location on my PC) and the
> app successfully built afterwards.
>
> Thanks for the quick response BTW!
>
> --
> View this message in context: http://mono-for-android.1047100.n5.nabble.com/ResolveSDKs-build-error-tp4339406p4339446.html
> Sent from the Mono for Android mailing list archive at Nabble.com.
> _______________________________________________
> Monodroid mailing list
> [hidden email]
>
> UNSUBSCRIBE INFORMATION:
> http://lists.ximian.com/mailman/listinfo/monodroid
>
>

_______________________________________________
Monodroid mailing list
[hidden email]

UNSUBSCRIBE INFORMATION:
http://lists.ximian.com/mailman/listinfo/monodroid
Loading...