Xamarin Forms


My and my team are building ios and android app with Xamarin Forms (code sharing) and we are trying to add some CI to our project. When i build i always get the same error “Are you on the wrong stack?” . I tested your service with Xamarin Forms hello world project and it worked, but when i try our xamarin forms app i always get “Are you on the wrong stack?” although i use the same stack as in the hello world app. Help :slight_smile:

Please check the error log :wink:

The “Are you on the wrong stack?” message is just a reminder, that if you are indeed on a wrong stack, then changing the stack might help. But the actual error message is in the logs.

We’ll soon change the design of this (“Are you on the wrong stack?”) message, to make it look less like an error and more like a “maybe you forgot to change your stack when you upgraded from Xcode X to Xcode Y on your Mac”.

Also, @daniel you’re summoned :wink:

Thanks for the quick reply, i discovered the error, do you know any solutions to this error?

Strange, Android API lvl23 should be installed…

In general, you can install any android package with e.g. a Script step:

set -ex
echo y | android update sdk --no-ui --all --filter android-23 | grep 'package installed'

Related docs: http://devcenter.bitrise.io/android/android-tips-and-tricks/#how-to-install-an-additional-android-sdk-package

1 Like

Yes this is strange, we are 4 developers, and the error says this error is coming form “/users/quangnguyen” which is one of our team’s macbook machine, this error is not visible in our xamarin forms project, do you think we just need to install this api to his machine? and maybe push some code changes after that?

Ohh, you’re right, I missed that!

That means that someone did commit an absolute path into your (Xamarin) project settings, a path which of course won’t be available on Bitrise.io nor on any other Mac where the user is not quangnguyen

1 Like

Okay wow, do you know how to fix that and then make him not commit this path again?

It might be a local.properties or similar file, which should be git ignored, but is not for some reason. Unfortunately this can come from other places too, so I can’t really tell you which file it is, but it’s the Android SDK path configuration somewhere.

Probably the easiest way to debug is:

  1. do a clean git clone of the repository, into a new/temporary directory (checkout the same branch etc. where you have this issue)
  2. then open it in any “programmer text editor”, like Sublime or Atom or VisualStudio Code etc.
  3. and simply for the absolute path in all files (in your case /users/quangnguyen or just /users/ - search with case insensitive!)

I think this is the simplest and most reliable way to solve this, but there might be other solutions too, e.g. searching for the absolute path on GitHub (if you host your code on GitHub).

1 Like

Hi again,

We changed the target framework of the project to API 23 (suggested on stackoverflow) and the error is no longer when i build on bitrise, but another error that we are not familiar with comes along. “/users/vagrant” is not one of our machines, do you recognise this error?

/Users/vagrant/git is where your code is cloned by default, on the MacOS stacks on bitrise.io, so this path looks good, something is missing from your repo it seems.

Or maybe a dependency is missing.