Why don't the app run under Android 4.x in Kotlin? - android

There is a very simple app made by Kotlin, it can work well under Android 8.0, Android 6.0 and Android 5.1 in Android Studio 3.0
but I get the error message "java.lang.RuntimeException: Unable to instantiate activity ComponentInfo{info.dodata.mirror/ui.UIMain}: java.lang.ClassNotFoundException: ui.UIMain" when I run the app under Android 4.1. 2 (This is a real mobile phone) and Android 4.2.2
You can test it by download the app at https://www.dropbox.com/s/9f0yxp5pqqxtcxq/Mirror.zip?dl=0
UIMain.kt
package ui
import android.os.Bundle
import android.support.v7.app.AppCompatActivity
import info.dodata.mirror.R
class UIMain : AppCompatActivity() {
override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState)
setContentView(R.layout.layout_main)
}
}
AndroidManifest.xml
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="info.dodata.mirror">
<application
android:allowBackup="true"
android:icon="#mipmap/ic_launcher"
android:label="#string/app_name"
android:roundIcon="#mipmap/ic_launcher_round"
android:supportsRtl="true"
android:theme="#style/AppTheme">
<activity android:name="ui.UIMain">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
</application>
</manifest>
build.gradle (Module:app)
apply plugin: 'com.android.application'
apply plugin: 'kotlin-android'
apply plugin: 'kotlin-android-extensions'
android {
compileSdkVersion 26
flavorDimensions "default"
defaultConfig {
// Enabling multidex support.
multiDexEnabled true
applicationId "info.dodata.mirror"
minSdkVersion 15
targetSdkVersion 26
versionCode 1
versionName "1.01"
archivesBaseName = "BackupSettings-V" + versionName
}
productFlavors {
free {
applicationId "info.dodata.mirror"
}
pro {
applicationId "info.dodata.mirror.pro"
}
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
buildConfigField "boolean", "IsDebugMode", "false"
}
debug {
buildConfigField "boolean", "IsDebugMode", "true"
}
}
}
dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])
implementation 'com.android.support:multidex:1.0.2'
implementation "org.jetbrains.kotlin:kotlin-stdlib-jre7:$kotlin_version"
implementation 'com.android.support:appcompat-v7:26.1.0'
implementation 'com.android.support.constraint:constraint-layout:1.0.2'
implementation "org.jetbrains.anko:anko-commons:$anko_version"
implementation "org.jetbrains.anko:anko-sqlite:$anko_version"
}
build.gradle (Top)
// Top-level build file where you can add configuration options common to all sub-projects/modules.
buildscript {
ext.kotlin_version = '1.1.51'
ext.anko_version = '0.10.2'
repositories {
google()
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:3.0.0'
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
}
}
allprojects {
repositories {
google()
jcenter()
}
}
task clean(type: Delete) {
delete rootProject.buildDir
}

On Android 5.0 and later, multiple .dex files are automatically loaded by ART together. However, on earlier Android versions, Dalvik starts the application with only the main classes.dex, and the application must load the secondary the .dex files before anything else is done.
This is handled by the multidex support library, but you did not follow the instructions. This means that some of your classes are not present when the system is trying to start your activity, leading to a crash.
Depending on whether you override the Application class, perform one of the following:
If you do not override the Application class, edit your manifest file to set android:name in the <application> tag as follows:
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.example.myapp">
<application
android:name="android.support.multidex.MultiDexApplication" >
...
</application>
</manifest>
If you do override the Application class, change it to extend MultiDexApplication (if possible) as follows:
public class MyApplication extends MultiDexApplication { ... }
Or if you do override the Application class but it's not possible to change the base class, then you can instead override the attachBaseContext() method and call MultiDex.install(this) to enable multidex:
public class MyApplication extends SomeOtherApplication {
#Override
protected void attachBaseContext(Context base) {
super.attachBaseContext(base);
MultiDex.install(this);
}
}
You are currently not overriding Application, so you should follow the first case.

Related

Simple Firebase notification not working on Android

So, I've been trying for hours to make notification works but without success.
My goal is to send a notification from the Firebase console and receive it on the phone. This means that I should only add the library to my application and configure a project on Firebase.
In my app I'm already using firebase for storage, analytics and ads without problem.
I've followed the official tutorial and also this video
I've not added the service in the manifest because I don't need to do any particular message handling
This is my manifest:
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.domain.myapp">
<uses-permission android:name="android.permission.INTERNET"/>
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE"/>
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />
<application
android:name=".App"
android:allowBackup="true"
android:icon="#mipmap/ic_launcher"
android:label="#string/app_name"
android:roundIcon="#mipmap/ic_launcher_round"
android:supportsRtl="true"
android:theme="#style/Theme.myapp">
<activity android:name="com.domain.myapp.MainActivity"
android:screenOrientation="portrait">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<provider
android:name="androidx.core.content.FileProvider"
android:authorities="${applicationId}.provider"
android:exported="false"
android:requestLegacyExternalStorage="true"
android:grantUriPermissions="true">
<meta-data
android:name="android.support.FILE_PROVIDER_PATHS"
android:resource="#xml/provider_paths"/>
</provider>
<meta-data
android:name="com.google.android.gms.ads.APPLICATION_ID"
android:value="myid"/>
</application>
</manifest>
root level build.gradle
// Top-level build file where you can add configuration options common to all sub-projects/modules.
buildscript {
ext.kotlin_version = "1.4.20"
repositories {
google()
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:4.1.3'
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
classpath 'com.google.gms:google-services:4.3.5'
def nav_version = "2.3.4"
classpath "androidx.navigation:navigation-safe-args-gradle-plugin:$nav_version"
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
}
}
allprojects {
repositories {
google()
jcenter()
}
}
task clean(type: Delete) {
delete rootProject.buildDir
}
Application level build file
plugins {
id 'com.android.application'
id 'kotlin-android'
id 'kotlin-android-extensions'
id 'androidx.navigation.safeargs.kotlin'
id 'kotlin-kapt'
id 'com.google.gms.google-services'
}
android {
signingConfigs {
release {
storeFile file('keystore')
storePassword 'psw'
keyAlias 'key0'
keyPassword 'psw'
}
}
compileSdkVersion 30
buildToolsVersion "29.0.3"
defaultConfig {
applicationId "com.domain.myapp"
minSdkVersion 22
targetSdkVersion 30
versionCode 1
versionName "1.0"
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
}
buildTypes {
def AD_UNIT_ID = "AD_UNIT_ID"
debug {
buildConfigField "String", AD_UNIT_ID, AD_UNIT_ID_TEST
}
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
buildConfigField "String", AD_UNIT_ID, AD_UNIT_ID_PROD
signingConfig signingConfigs.release
}
}
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
}
kotlinOptions {
jvmTarget = '1.8'
}
}
dependencies {
implementation 'androidx.legacy:legacy-support-v4:1.0.0'
implementation 'com.google.firebase:firebase-storage:19.2.1'
implementation 'com.google.firebase:firebase-messaging-ktx:21.0.1'
implementation 'com.google.firebase:firebase-analytics-ktx:18.0.2'
def nav_version = "2.3.4"
implementation "androidx.navigation:navigation-fragment-ktx:$nav_version"
implementation "androidx.navigation:navigation-ui-ktx:$nav_version"
implementation "androidx.navigation:navigation-dynamic-features-fragment:$nav_version"
implementation "androidx.navigation:navigation-compose:1.0.0-alpha09"
implementation "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version"
implementation 'androidx.core:core-ktx:1.3.2'
implementation 'androidx.appcompat:appcompat:1.2.0'
implementation 'com.google.android.material:material:1.3.0'
implementation 'androidx.constraintlayout:constraintlayout:2.0.4'
implementation("com.github.bumptech.glide:glide:4.12.0")
implementation("com.github.bumptech.glide:recyclerview-integration:4.11.0")
kapt 'com.github.bumptech.glide:compiler:4.12.0'
implementation 'com.firebaseui:firebase-ui-storage:7.1.1'
implementation 'com.github.smarteist:autoimageslider:1.4.0'
implementation 'com.google.android.gms:play-services-ads:19.8.0'
testImplementation 'junit:junit:4.+'
androidTestImplementation 'androidx.test.ext:junit:1.1.2'
androidTestImplementation 'androidx.test.espresso:espresso-core:3.3.0'
}
This is my App class:
class App: Application() {
override fun onCreate() {
super.onCreate()
MobileAds.initialize(this)
}
}
And this is my main activity:
class MainActivity : AppCompatActivity() {
override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState)
setContentView(R.layout.activity_main)
setupAdViewInto(adContainer)
}
private fun setupAdViewInto(adContainer: LinearLayout, adSize: AdSize = SMART_BANNER) {
val adView = AdView(this)
adView.adSize = adSize
adView.adUnitId = AD_UNIT_ID
adContainer.addView(adView)
adView.loadAd(AdRequest.Builder().build())
}
}
On the firebase console I see this:
Note: I've tried crating a new app from scratch and to do the same operation and that it's working!
I got it working, but I don't know how... I'm thinking is Android Studio's fault.
I've done these steps
created a new project on firebase
downloaded and imported the new google-services.json
cleaned cache data and reinstalled the app on the emulator using the button Run 'app' from Android Studio
the app is still showing stuff from the old firebase application, like it's using the old google-services.json
deleted gradle's build folder from Android Studio
reinstalled the app as before using the old configuration
notifications are now working
WTF!??
I'm thinking that the problem was due to gralde/android studio.
I've lost like 5 hours on this... I love programming :) :)

Android Studio generated apk installs but doesn't open

I have installed my apk bundle that I created via Build APK(s) and it installs but won't let me open it, and it doesn't show in the menu.
I've already checked Project/App/src/main/AndroidManifest.xml and Project/build.gradle and settings.gradle as well but I don't find anything odd.
android:protectionLevel="signature" is not in any of the previous files.
minifyEnabled is FALSE
I've read somewhere to edit my manifest and add or something (I can't find the post right now). I did it, and the app began to have gradle errors, and showed me another manifest that had those lines written.
Here's my Project/App/src/main/AndroidManifest.xml
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.example.multicobertura">
<application
android:allowBackup="true"
android:icon="#mipmap/ic_launcher"
android:label="#string/app_name"
android:roundIcon="#mipmap/ic_launcher_round"
android:supportsRtl="true"
android:theme="#style/Theme.Multicobertura" />
</manifest>
build.gradle
// Top-level build file where you can add configuration options common to all sub-projects/modules.
buildscript {
repositories {
google()
jcenter()
}
dependencies {
classpath "com.android.tools.build:gradle:4.1.0"
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
}
}
allprojects {
repositories {
google()
jcenter()
}
}
task clean(type: Delete) {
delete rootProject.buildDir
}
settings.gradle
include ':app'
rootProject.name = "multicobertura"
I am clueless
EDIT: I tried adding "entry points"
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.example.multicobertura">
<application
android:allowBackup="true"
android:icon="#mipmap/ic_launcher"
android:label="#string/app_name"
android:roundIcon="#mipmap/ic_launcher_round"
android:supportsRtl="true"
android:theme="#style/Theme.Multicobertura" />
<activity
android:name=".NewEntryPoint"
android:label="#string/title_activity_second" >
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
</manifest>
But
build.gradle
// Top-level build file where you can add configuration options common to all sub-projects/modules.
buildscript {
repositories {
google()
jcenter()
}
dependencies {
classpath "com.android.tools.build:gradle:4.1.0"
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
}
}
allprojects {
repositories {
google()
jcenter()
}
}
task clean(type: Delete) {
delete rootProject.buildDir
}
app build.gradle
plugins {
id 'com.android.application'
}
android {
compileSdkVersion 30
buildToolsVersion "30.0.2"
defaultConfig {
applicationId "com.example.multicobertura"
minSdkVersion 16
targetSdkVersion 30
versionCode 1
versionName "1.0"
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
}
}
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
}
}
dependencies {
implementation 'androidx.appcompat:appcompat:1.2.0'
implementation 'com.google.android.material:material:1.2.1'
testImplementation 'junit:junit:4.+'
androidTestImplementation 'androidx.test.ext:junit:1.1.2'
androidTestImplementation 'androidx.test.espresso:espresso-core:3.3.0'
}
EDIT2: I've already created a new android studio project, copied the files and yarn insalled the modules, built the app and failed as well. Anyone?

I can't see the elements by their id in Android Studio

I'm a new Kotlin Programmer. I tried to change the app icon by deleting the ic_launcher.png files and replacing my own images. As i see that is ridiculous what i'm trying to do, i copied the "Main Activity.kt" and "main_activity.xml" files and created a new project. As i tried to copy the files into the new project, the program throws a lot of errors:
It didn't imported the "kotlinx" packet and didn't perceive the elements in the xml file. As i tried to create an another new project to try whether the problem is only for this project, i realized that Android Studio doesn't perceive the xml elements anymore.
Here are some important infos about my project:
The Android Manifest XML File
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.ihdovanay.myapplication">
<application
android:allowBackup="true"
android:icon="#mipmap/ic_launcher"
android:label="#string/app_name"
android:roundIcon="#mipmap/ic_launcher_round"
android:supportsRtl="true"
android:theme="#style/Theme.MyApplication">
<activity android:name=".MainActivity">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
</application>
</manifest>
The Build Gradle File of The Project
buildscript {
ext.kotlin_version = "1.4.10"
repositories {
google()
jcenter()
}
dependencies {
classpath "com.android.tools.build:gradle:4.1.0"
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
}
}
allprojects {
repositories {
google()
jcenter()
}
}
task clean(type: Delete) {
delete rootProject.buildDir
}
The Build Gradle File of the Module
plugins {
id 'com.android.application'
id 'kotlin-android'
}
android {
compileSdkVersion 30
buildToolsVersion "30.0.2"
defaultConfig {
applicationId "com.ihdovanay.myapplication"
minSdkVersion 21
targetSdkVersion 30
versionCode 1
versionName "1.0"
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
}
}
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
}
kotlinOptions {
jvmTarget = '1.8'
}
}
dependencies {
implementation "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version"
implementation 'androidx.core:core-ktx:1.3.2'
implementation 'androidx.appcompat:appcompat:1.2.0'
implementation 'com.google.android.material:material:1.2.1'
implementation 'androidx.constraintlayout:constraintlayout:2.0.2'
testImplementation 'junit:junit:4.+'
androidTestImplementation 'androidx.test.ext:junit:1.1.2'
androidTestImplementation 'androidx.test.espresso:espresso-core:3.3.0'
}
I would be very happy if you could solve my problem.
Revised answer after the deprecation of view synthetics.
You're missing the kotlin-android-extensions plugin in your build.gradle. It's responsible for generating synthetic view references.
kotlin-android-extensions is now deprecated, so it is no longer included by default and should no longer be added to projects. You should use findViewById or View Binding.
You can make it work by doing the following, but I don't recommend adding and relying on a deprecated library. Add the line to your plugins block at the top:
plugins {
id 'com.android.application'
id 'kotlin-android'
id 'kotlin-android-extensions'
}
In Android Studio 4.1.1, the following code is missing in build.gradle (module: yourAppName)
id 'kotlin-android-extensions'

How to fix VectorDrawableCompat configuration error in Android Studio?

I created a project in Android studio. Even without modifying any single character in the project I cannot run it. It gives following error.
java.lang.RuntimeException: Unable to start activity
ComponentInfo{com.kk.myapplication/com.kk.myapplication.MainActivity}:
java.lang.IllegalStateException: This app has been built with an
incorrect configuration. Please configure your build for
VectorDrawableCompat.
These are the codes.
MainActivity.java :
package com.kk.myapplication;
import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;
public class MainActivity extends AppCompatActivity {
#Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
}
}
Manifest.xml :
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.kk.myapplication">
<application
android:allowBackup="true"
android:icon="#mipmap/ic_launcher"
android:label="#string/app_name"
android:supportsRtl="true"
android:theme="#style/AppTheme">
<activity android:name=".MainActivity">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
</application>
</manifest>
build.gradle :
apply plugin: 'com.android.application'
android {
compileSdkVersion 24
buildToolsVersion "24.0.0"
defaultConfig {
applicationId "com.kk.myapplication"
minSdkVersion 19
targetSdkVersion 24
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:24.2.0'
}
build.gradle(Top Level)
// Top-level build file where you can add configuration options common to all sub-projects/modules.
buildscript {
repositories {
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:1.5.0'
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
}
}
allprojects {
repositories {
jcenter()
}
}
task clean(type: Delete) {
delete rootProject.buildDir
}
How can I fix this issue? I did not change anything in the project Any Help be Appreciated.
Here you will get this issue.
https://code.google.com/p/android/issues/detail?id=214182
Solution was to upgrade the gradle plugin to v2.0+ (upgraded to 2.1.0)
add this in your dependency.
{
classpath 'com.android.tools.build:gradle:2.1.0'
}
and sync the project.
Edit :
change this
dependencies {
classpath 'com.android.tools.build:gradle:1.5.0'
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
}
to this
dependencies {
classpath 'com.android.tools.build:gradle:2.1.0'
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
}
This is old, but another option might be for your activity to inherit from Activity instead of AppCompatActivity. There's probably a variety of other considerations that might come into play, but that worked for me.
Seems this is an issue with incompatible gradle version reported here.. Google issue
Updatating gradle version may fix this -
buildscript {
...
dependencies {
classpath 'com.android.tools.build:gradle:2.1.0'
}
}
Add into your build.gradle files
defaultConfig {
applicationId "com.example.myApp"
minSdkVersion 14
targetSdkVersion 24
versionCode 1
versionName "1.0"
generatedDensities = []
}
// This is handled for you by the 2.0+ Gradle Plugin
aaptOptions {
additionalParameters "--no-version-vectors"
}

Kotlin RC NoClassDefFoundError

After updating kotlin to RC-1036 i'm facing a weird issue: my code is not even compiled and packed.
When build passes and the app is launched i'm getting ClassNotFoundException: Didn't find class "example.myapplication.MainActivity".
I have tried to decompile apk with apktool and didn't find my classes inside the archive. There are no classes in build/intermediates dir either.
This is my project:
app/build.gradle:
apply plugin: 'com.android.application'
apply plugin: 'kotlin-android-extensions'
buildscript {
ext.kotlin_version = '1.0.0-rc-1036'
repositories {
mavenCentral()
}
dependencies {
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
}
}
repositories {
mavenCentral()
}
android {
compileSdkVersion 23
buildToolsVersion "23.0.2"
defaultConfig {
applicationId "example.myapplication"
minSdkVersion 21
targetSdkVersion 23
versionCode 1
versionName "1.0"
}
buildTypes {
release {
minifyEnabled false
}
}
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.1.1'
compile "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version"
}
Manifest:
<?xml version="1.0" encoding="utf-8"?>
<manifest package="example.myapplication"
xmlns:android="http://schemas.android.com/apk/res/android">
<application
android:allowBackup="true"
android:icon="#mipmap/ic_launcher"
android:label="#string/app_name"
android:supportsRtl="true"
android:theme="#style/AppTheme">
<activity android:name=".MainActivity">
<intent-filter>
<action android:name="android.intent.action.MAIN"/>
<category android:name="android.intent.category.LAUNCHER"/>
</intent-filter>
</activity>
</application>
And MainActivity:
package example.myapplication
import android.support.v7.app.AppCompatActivity
import android.os.Bundle
import kotlinx.android.synthetic.main.activity_main.*
class MainActivity : AppCompatActivity() {
override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState)
setContentView(R.layout.activity_main)
hello.text = "New text"
}
}
Build tools version is 2.0.0-beta2;
Might be something wrong with sourseSets, though nothing works if i try to reconfigure it somehow. Appreciate any help.
You should have both these plugins:
apply plugin: 'kotlin-android'
apply plugin: 'kotlin-android-extensions'
The first makes sure the Kotlin code compiles, the second is for the UI imports.

Categories

Resources