kapt

how to use kapt in androidTest scope

淺唱寂寞╮ 提交于 2019-12-03 22:21:11
Is there a way to use kapt for the androidtest scope? Currently I am migrating from com.neenbedankt.gradle.plugins android-apt to kapt - which works fine - but I am not sure how to do it for the androidTest scope - so replacing: apt "com.github.hotchemi:permissionsdispatcher-processor:$permissiondispatcher_version" apt "com.google.dagger:dagger-compiler:$dagger_version" with kapt "com.github.hotchemi:permissionsdispatcher-processor:$permissiondispatcher_version" kapt "com.google.dagger:dagger-compiler:$dagger_version" works fine - but I found no way to migrate: androidTestApt "com.google

Room “Not sure how to convert a Cursor to this method's return type”: which method?

无人久伴 提交于 2019-12-03 19:17:15
问题 Error:Not sure how to convert a Cursor to this method's return type Error:Execution failed for task ':app:compileDebugJavaWithJavac'. Compilation failed; see the compiler error output for details. Using Room I'm getting this error and I'd like to find out which method causes it. I have multiple DAO s, with approximately 60 methods in total, and this error just popped up after adding a method (copy&pasted from another one that worked perfectly, just changed the field to set). I could post the

Gradle DSL method not found: 'kapt()'

烂漫一生 提交于 2019-12-03 04:14:13
Gradle DSL method not found: 'kapt()' Possible causes: The project 'jetpacklearn' may be using a version of the Android Gradle plug-in that does not contain the method (e.g. 'testCompile' was added in 1.1.0). Upgrade plugin to version 3.4.0 and sync project The project 'jetpacklearn' may be using a version of Gradle that does not contain the method. Open Gradle wrapper file My gradleVersion is '3.4.0', but can not deal with it , ask me the same question classpath "com.android.tools.build:gradle:$gradleVersion" classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlinVersion" classpath

Is kapt supported in maven?

我是研究僧i 提交于 2019-12-01 22:18:50
问题 Is it possible to run kapt (kotlin annotation processing) in a maven based project? If yes how do I integrate kapt in maven build system? 回答1: Since Kotlin 1.1.2 there is now support for both Gradle and Maven to run the KAPT plugins. This is documented in Using Kotlin annotation processing tool where it says to: Add an execution of the kapt goal from kotlin-maven-plugin before compile: <execution> <id>kapt</id> <goals> <goal>kapt</goal> </goals> <configuration> <sourceDirs> <sourceDir>src

Is kapt supported in maven?

怎甘沉沦 提交于 2019-12-01 19:24:11
Is it possible to run kapt (kotlin annotation processing) in a maven based project? If yes how do I integrate kapt in maven build system? Since Kotlin 1.1.2 there is now support for both Gradle and Maven to run the KAPT plugins. This is documented in Using Kotlin annotation processing tool where it says to: Add an execution of the kapt goal from kotlin-maven-plugin before compile: <execution> <id>kapt</id> <goals> <goal>kapt</goal> </goals> <configuration> <sourceDirs> <sourceDir>src/main/kotlin</sourceDir> <sourceDir>src/main/java</sourceDir> </sourceDirs> <annotationProcessorPaths> <!--

Dagger 2 on Android, missing error messages

廉价感情. 提交于 2019-12-01 15:20:35
I'm using Dagger 2 in my Android project and I'm having trouble debugging it. I know that the compilation fails because of an error in my dagger 2 setup (had it before) but it's almost impossible to track it down because I don't get a proper error message telling me where the problem lies. All I get are messages that show that the annotation processing failed. Along the lines of: Error:Execution failed for task ':app:compileDebugJavaWithJavac'. > Compilation failed; see the compiler error output for details. Error:(14, 28) error: cannot find symbol class BR Error:(17, 40) error: package com

Dagger 2 on Android, missing error messages

早过忘川 提交于 2019-12-01 14:11:52
问题 I'm using Dagger 2 in my Android project and I'm having trouble debugging it. I know that the compilation fails because of an error in my dagger 2 setup (had it before) but it's almost impossible to track it down because I don't get a proper error message telling me where the problem lies. All I get are messages that show that the annotation processing failed. Along the lines of: Error:Execution failed for task ':app:compileDebugJavaWithJavac'. > Compilation failed; see the compiler error

Android Room Persistences library and Kotlin

元气小坏坏 提交于 2019-11-27 13:24:33
I am trying to write a simple app using Kotlin and Room Persistance Library . I followed the tutorial in the Android Persistance codelab. Here is my AppDatabase class in Kotlin: @Database(entities = arrayOf(User::class), version = 1) abstract class AppDatabase : RoomDatabase() { abstract fun userModel(): UserDao companion object { private var INSTANCE: AppDatabase? = null @JvmStatic fun getInMemoryDatabase(context: Context): AppDatabase { if (INSTANCE == null) { INSTANCE = Room.inMemoryDatabaseBuilder(context.applicationContext, AppDatabase::class.java).allowMainThreadQueries().build() }

Android Room Persistences library and Kotlin

廉价感情. 提交于 2019-11-26 16:19:47
问题 I am trying to write a simple app using Kotlin and Room Persistance Library. I followed the tutorial in the Android Persistance codelab. Here is my AppDatabase class in Kotlin: @Database(entities = arrayOf(User::class), version = 1) abstract class AppDatabase : RoomDatabase() { abstract fun userModel(): UserDao companion object { private var INSTANCE: AppDatabase? = null @JvmStatic fun getInMemoryDatabase(context: Context): AppDatabase { if (INSTANCE == null) { INSTANCE = Room