Exclamation mark next to glyphs

I m working with glyphs 2 and used the color function which is obviously not supported by adobe indesign yet. but the problem i actually have is that the alternatives I made, which do not use more than one color (layer) do not work in indesign either and they have an exclamation mark next to them looking like this:


and when i m in the glyph it looks like this:

The exclamation mark means that your metrics keys are not in sync. You can see it in the the second screen shot that they are red.

But how can I keep the shape at this position and fix the cerning?

We are speaking about the spacing, not the kerning. If you need to keep the spacing like this, you should remove the metrics keys.

I removed the metric keys and exported the font again, but I still do not get the glyphs that had exclamation marks before displayed

The color layers, done like this will never be supported directly in Indesign. Did you read the tutorial about layer fonts? You need to duplicate the text frames and assign the colors yourself.

How do you try to use the alternates? Did you update the features and made sure that they are active in Indesign. And make sure that you read this:
https://www.glyphsapp.com/tutorials/testing-your-fonts-in-adobe-apps
and
https://www.glyphsapp.com/tutorials/eliminating-font-cache-problems