can't call kotlin module from java module
<p>I want to have an android app in java, but one library module in kotlin. However when I try to run the app in my phone, there's an error saying that it can't find my Kotlin class. This is my kotlin class:</p>

<pre><code>    package com.example.mylibrary

    import android.util.Log

    class A {
        fun helloWorld(){
            Log.d("Kotlin", "Hello World!")
        }
    }
</code></pre>

<p>and gradle file for my kotlin module:</p>

<pre><code>apply plugin: 'com.android.library'

android {
    compileSdkVersion 23
    buildToolsVersion "23.0.1"

    defaultConfig {
        minSdkVersion 11
        targetSdkVersion 23
        versionCode 1
        versionName "1.0"
    }
    buildTypes {
        release {
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
        }
    }
    sourceSets {
        main.java.srcDirs += 'src/main/kotlin'
    }
}

dependencies {
    compile fileTree(dir: 'libs', include: ['*.jar'])
    testCompile 'junit:junit:4.12'
    compile 'com.android.support:appcompat-v7:23.2.1'
    compile "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version"
}
buildscript {
    ext.kotlin_version = '0.6.+'
    repositories {
        mavenCentral()
    }
    dependencies {
        classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
    }
}
repositories {
    mavenCentral()
}
</code></pre>

<p>Here's my main activity:</p>

<pre><code>package com.example.uisample;

import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;

import com.example.mylibrary.A;

public class MainActivity extends AppCompatActivity {

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_main);
        A obj = new A();
        obj.helloWorld();

    }

}
</code></pre>

<p>Notice how android studio imports <code>com.example.mylibrary.A</code> instead of <code>com.example.mylibrar.Akt</code> as the reference says. Android studio reports no errors before compiling.</p>

<p>Gradle file for app:</p>

<pre><code>apply plugin: 'com.android.application'

android {
    compileSdkVersion 23
    buildToolsVersion "23.0.1"

    defaultConfig {
        applicationId "com.example.uisample"
        minSdkVersion 11
        targetSdkVersion 23
        versionCode 1
        versionName "1.0"
    }
    buildTypes {
        release {
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
        }
    }
}

dependencies {
    compile fileTree(dir: 'libs', include: ['*.jar'])
    testCompile 'junit:junit:4.12'
    compile 'com.android.support:appcompat-v7:23.2.1'
    compile project(':mylibrary')
}
</code></pre>

<p>After running the project, gradle throws this error: "cannot find symbol class A". What am I doing wrong?</p>