Android, java.lang.NoSuchFieldError: ....R$layout.e
<p>App with several modules.
'prestaAdmin' include 'Controls' and 'eShop', 'eshop' include 'Licensing'.
settings.gradle:</p>

<pre><code>include ':app', ':Controls', ':Licensing', ':eShop'
</code></pre>

<p>In build.gradle(module eshop) put</p>

<pre><code>dependencies{
compile project(':Licensing')}
</code></pre>

<p>In build.gradle(module app) put</p>

<pre><code>apply plugin: 'com.android.application'
dependencies{
compile project(':Controls')
compile project(':eShop')}
</code></pre>

<p>AndroidManifest of eshop:</p>

<pre><code> &lt;?xml version="1.0" encoding="utf-8"?&gt;
&lt;manifest xmlns:android="http://schemas.android.com/apk/res/android"
    package="appmobile.biz.eshop"
    android:versionCode="1"
    android:versionName="1.0" &gt;

    &lt;uses-sdk android:minSdkVersion="14" /&gt;

    &lt;application
        android:icon="@drawable/icon"
        android:label="@string/app_name" &gt;
        &lt;activity android:name="appmobile.biz.eshop.ui.Start" android:label="@string/app_name" android:screenOrientation="portrait" android:theme="@android:style/Theme.NoTitleBar"&gt;
            &lt;intent-filter&gt;
                &lt;action android:name="android.intent.action.MAIN"&gt;&lt;/action&gt;
                &lt;category android:name="android.intent.category.LAUNCHER"&gt;&lt;/category&gt;
            &lt;/intent-filter&gt;
        &lt;/activity&gt;
        &lt;activity android:name="appmobile.biz.eshop.ui.Main" android:label="@string/main_title" android:screenOrientation="portrait" android:theme="@android:style/Theme.NoTitleBar"&gt;&lt;/activity&gt;
        &lt;activity android:name="appmobile.biz.eshop.ui.Catalog" android:label="@string/catalog_list_title" android:launchMode="singleTop"&gt;
            &lt;intent-filter&gt;
                &lt;action android:name="android.intent.action.SEARCH"&gt;&lt;/action&gt;
            &lt;/intent-filter&gt;
            &lt;meta-data android:resource="@xml/catalog_searchable" android:name="android.app.searchable"&gt;&lt;/meta-data&gt;
        &lt;/activity&gt;
        &lt;activity android:name="appmobile.biz.eshop.ui.PageView" &gt;&lt;/activity&gt;
        &lt;activity android:name="appmobile.biz.eshop.ui.EditField" &gt;&lt;/activity&gt;
        &lt;activity android:name="appmobile.biz.eshop.ui.ViewField" &gt;&lt;/activity&gt;
        &lt;activity android:name="appmobile.biz.eshop.ui.Orders"&gt;&lt;/activity&gt;
        &lt;activity android:name="appmobile.biz.eshop.ui.CategorySelector" android:label="@string/select_category"&gt;&lt;/activity&gt;
        &lt;activity android:name="appmobile.biz.eshop.ui.Statistics" android:theme="@android:style/Theme.NoTitleBar"&gt;&lt;/activity&gt;
        &lt;activity android:name="appmobile.biz.eshop.ui.StatViewed"&gt;&lt;/activity&gt;
        &lt;activity android:name="appmobile.biz.eshop.ui.StatPurchased"&gt;&lt;/activity&gt;
    &lt;/application&gt;
</code></pre>

<p></p>

<p>AndroidManifest of app</p>

<pre><code>    &lt;?xml version="1.0" encoding="utf-8"?&gt;
&lt;manifest xmlns:android="http://schemas.android.com/apk/res/android"
      package="appmobile.biz.prestaadmin"
      android:versionCode="3"
      android:versionName="1.1"&gt;
&lt;uses-sdk android:minSdkVersion="14"&gt;&lt;/uses-sdk&gt;
&lt;uses-permission android:name="android.permission.INTERNET"&gt;&lt;/uses-permission&gt;
&lt;uses-permission android:name="com.android.vending.CHECK_LICENSE" /&gt;
    &lt;application android:label="@string/app_name" android:icon="@drawable/icon"&gt;
    &lt;/application&gt;
&lt;/manifest&gt;
</code></pre>

<p>Start.java:</p>

<pre><code>public class Start extends Activity
{

    private TextView               krikTV;


public void onCreate( Bundle savedInstanceState )
    {
        super.onCreate( savedInstanceState );

        super.setContentView( R.layout.krikstartoncreate);



        krikTV = ( (TextView) super.findViewById( R.id.krikTV ) );
        krikTV.setText("krikstartoncreate text");
</code></pre>

<p>krikstartoncreate layout(in eShop/res/layout):</p>

<pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;
&lt;LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:orientation="vertical"
    android:layout_width="match_parent"
    android:layout_height="match_parent"&gt;


    &lt;TextView
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        android:id="@+id/krikTV" /&gt;

&lt;/LinearLayout&gt;
</code></pre>

<p>I have error:</p>

<pre><code>E/AndroidRuntime: FATAL EXCEPTION: main
                                                 java.lang.NoSuchFieldError: appmobile.biz.eshop.R$layout.e
                                                     at appmobile.biz.eshop.ui.Start.onCreate(Unknown Source)
                                                     at android.app.Activity.performCreate(Activity.java:5008)
                                                     at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1079)
                                                     at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2023)
                                                     at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2084)
                                                     at android.app.ActivityThread.access$600(ActivityThread.java:130)
                                                     at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1195)
                                                     at android.os.Handler.dispatchMessage(Handler.java:99)
                                                     at android.os.Looper.loop(Looper.java:137)
                                                     at android.app.ActivityThread.main(ActivityThread.java:4745)
                                                     at java.lang.reflect.Method.invokeNative(Native Method)
                                                     at java.lang.reflect.Method.invoke(Method.java:511)
                                                     at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:786)
                                                     at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:553)
                                                     at dalvik.system.NativeStart.main(Native Method)
</code></pre>

<p>If i debug,see this:</p>

<pre><code>krikTV = No such instance field: 'krikTV'
</code></pre>