kotlin-android-extensions

Error: Execution failed for task ':app:clean'. Unable to delete file

旧城冷巷雨未停 提交于 2019-11-27 06:14:44
I'm trying to rebuild my Android Studio Gradle project (containing mostly Kotlin code), but it started to throw an UnableToDeleteFileException during the cleaning/rebuilding process: Execution failed for task ':app:clean'. > Unable to delete file: C:\Users\User\KotlinGameEngine\app\build\intermediates\exploded-aar\com.android.support\appcompat-v7\23.0.1\jars\classes.jar This started happening after I tried to change my project's package structure. Unfortunately, I did it by renaming and moving the source folders rather than refactoring through Android Studio, which was a bad idea. I've been

Program type already present: org.intellij.lang.annotations.Flow

删除回忆录丶 提交于 2019-11-27 03:47:17
问题 I am getting this error whenever I try to run a program in Kotlin. My gradle files are like this: Project Level Gradle buildscript { ext.kotlin_version = '1.2.30' repositories { google() jcenter() } dependencies { classpath 'com.android.tools.build:gradle:3.1.1' classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version" classpath 'com.google.gms:google-services:3.2.0' } } allprojects { repositories { google() jcenter() } } task clean(type: Delete) { delete rootProject.buildDir }

How to pass the values from activity to another activity in kotlin

拈花ヽ惹草 提交于 2019-11-27 03:13:37
问题 As I'm learning Kotlin for Android development, I'm now trying the basic programs like hello world and how to navigate from one activity to another activity , there is no issue in this. My concern is when I move from one activity to another activity it works fine but I do not know how to pass the values between the activities. I tired to set the values in one activity and retrieved in another activity it does not work. Please see the code snippet below This is my main activity where I take

NullPointerException when trying to access views in a Kotlin fragment

可紊 提交于 2019-11-26 21:32:01
How to use Kotlin Android Extensions with Fragment s? If I use them inside onCreateView() , I get this NullPointerException exception: Caused by: java.lang.NullPointerException: Attempt to invoke virtual method 'android.view.View android.view.View.findViewById(int)' on a null object reference Here is the fragment code: package com.obaied.testrun.Fragment import android.os.Bundle import android.support.v4.app.Fragment import android.util.Log import android.view.LayoutInflater import android.view.View import android.view.ViewGroup import com.obaied.acaan.R import kotlinx.android.synthetic.main

Outdated Kotlin Runtime warning in Android Studio

喜你入骨 提交于 2019-11-26 17:30:38
问题 After downloaded and installed latest Kotlin plugin I have Outdated Kotlin Runtime warning from Android Studio that telling me: Your version of Kotlin runtime in 'kotlin-stdlib-1.1.2' library is 1.1.2, while plugin version is 1.1.2-release-Studio2.3-3. Runtime library should be updated to avoid compatibility problems. I tried to click Update Runtime button but getting another message: Automatic library version update for Gradle projects is currently unsupported. Please update your build

Unresolved reference: kotlinx

你。 提交于 2019-11-26 15:39:16
问题 I am trying to try out Kotlin and the Kotlin Android extensions in Android Studio. I have tried this both in Android Studio v 1.5.1 on Ubuntu 14.04, and in Android Studio v 1.5.1 on OS X El Capitan with the same result. Here is what I am doing: I install the Kotlin plugin 1.0.0-beta-35950-IJ141-11 Create a new blank Android project Convert the MainActivity file to Kotlin (via help->findaction->convert file to kotlin) Configure the project for Kotlin I then go into the generated content_main

Error: Execution failed for task ':app:clean'. Unable to delete file

≡放荡痞女 提交于 2019-11-26 11:54:48
问题 I\'m trying to rebuild my Android Studio Gradle project (containing mostly Kotlin code), but it started to throw an UnableToDeleteFileException during the cleaning/rebuilding process: Execution failed for task \':app:clean\'. > Unable to delete file: C:\\Users\\User\\KotlinGameEngine\\app\\build\\intermediates\\exploded-aar\\com.android.support\\appcompat-v7\\23.0.1\\jars\\classes.jar This started happening after I tried to change my project\'s package structure. Unfortunately, I did it by

NullPointerException when trying to access views in a Kotlin fragment

拟墨画扇 提交于 2019-11-26 06:20:08
问题 How to use Kotlin Android Extensions with Fragment s? If I use them inside onCreateView() , I get this NullPointerException exception: Caused by: java.lang.NullPointerException: Attempt to invoke virtual method \'android.view.View android.view.View.findViewById(int)\' on a null object reference Here is the fragment code: package com.obaied.testrun.Fragment import android.os.Bundle import android.support.v4.app.Fragment import android.util.Log import android.view.LayoutInflater import android