title: Android: layout-land error
body: <p>I am trying to add separate portrait-landscape layouts to an older project of mine (basically I display 2 <code>Fragments</code>: one with a google-map and the other one contains some OpenGL drawings). I created a layout resource folder named <code>layout-land</code> that includes my landscape layout and I get an error in Android Studio:</p>
  
  <pre><code>Error:Execution failed for task ':MapDemoActivity:mergeDebugResources'.
  &gt; java.lang.NullPointerException (no error message)
  </code></pre>
  
  <p>in my Gradle Console:</p>
  
  <pre><code>FAILURE: Build failed with an exception.
  
  * What went wrong:
  Execution failed for task ':MapDemoActivity:mergeDebugResources'.
  &gt; java.lang.NullPointerException (no error message)
  
  * Try:
  Run with --stacktrace option to get the stack trace. Run with --info or --debug option
  to get more log output.
  </code></pre>
  
  <p>I am a beginner and I don't know how to <code>Run with --stacktrace option to get the stack trace</code> or anything similar.</p>
  
  <p>here's my portrait layout (<code>activity_main.XML</code>) that works fine when I don't have the <code>layout-land</code> folder:</p>
  
  <pre><code>&lt;RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
  xmlns:tools="http://schemas.android.com/tools"
  android:layout_width="match_parent"
  android:layout_height="match_parent"
  tools:context=".MainActivity"
  android:animateLayoutChanges="true"
  &gt;
  
  &lt;fragment
      android:id="@+id/map"
      class="com.google.android.gms.maps.SupportMapFragment"
      android:layout_width="wrap_content"
      android:layout_height="350dp"
      android:layout_alignParentBottom="true"/&gt;
  &lt;fragment
      android:id="@+id/openGL"
      android:layout_width="wrap_content"
      android:layout_height="wrap_content"
      class="com.example.mapdemo.OpenGLES20ActivityFrag"
      android:layout_above="@id/map"/&gt;
  
  &lt;/RelativeLayout&gt;
  </code></pre>
  
  <p>the layout with the same name in my <code>layout-land</code> folder (when I add  this folder I get the above-mentioned error, I tried with a simple HelloWorld-style layout and it still didn't work so I don't think it has anything to do with what it contains):</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;
  &lt;LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
  xmlns:tools="http://schemas.android.com/tools"
  android:layout_width="match_parent"
  android:layout_height="match_parent"
  android:animateLayoutChanges="true"
  android:baselineAligned="false"
  android:orientation="horizontal"
  tools:context=".MainActivity"&gt;
  
  &lt;fragment
      android:id="@+id/map"
      android:layout_width="400dp"
      android:layout_height="match_parent"
  
      class="com.google.android.gms.maps.SupportMapFragment" /&gt;
  
  &lt;fragment
      android:id="@+id/openGL"
      android:layout_width="wrap_content"
      android:layout_height="wrap_content"
      class="com.example.mapdemo.OpenGLES20ActivityFrag" /&gt;
  
  &lt;/LinearLayout&gt;
  </code></pre>
  
  <p>If aditional code is required I will post it, however I don't think it is necesary. I do have the latest SDK and IDE versions.</p>
  
  <p>I think if could just find out where the <code>NullPointerException</code> error is in my code, I could solve it, but I don't know how to find it </p>