architecture-samples icon indicating copy to clipboard operation
architecture-samples copied to clipboard

Execution failed for task ':app:kaptMockDebugKotlin'.

Open 1abid opened this issue 6 years ago • 3 comments

branch : todo-mvvm-live-kotlin I have failed to build the project, probably it has failed to generate appropriate classes for data binding. I am quite curious about this line as well `/**

  • Immutable model class for a Task. In order to compile with Room, we can't use @JvmOverloads to
  • generate multiple constructors.
  • @param title title of the task
  • @param description description of the task
  • @param id id of the task */ @Entity(tableName = "tasks") data class Task @JvmOverloads constructor( @ColumnInfo(name = "title") var title: String = "", @ColumnInfo(name = "description") var description: String = "", @PrimaryKey @ColumnInfo(name = "entryid") var id: String = UUID.randomUUID().toString() ) {.....}`

if room doesn't work with jvmoverload then why this class is like this.

I am attaching log info below screenshot 2018-10-31 at 4 50 32 pm screenshot 2018-10-31 at 4 50 57 pm

1abid avatar Oct 31 '18 10:10 1abid

I had the same problem.

The solution for my case was to start the whole process from the repository project download until the project was opened ignoring all the requests for the update.

image

TelmoRodrigues avatar Nov 15 '18 11:11 TelmoRodrigues

I'm facing the same issue according to @TelmoRodrigues said that. Do not do any change to update the whole processes. it can work if you ignore it

SupakornIa avatar Feb 15 '19 11:02 SupakornIa

I've got the same error. "java.lang.NoClassDefFoundError: javax/xml/bind/JAXBException" My android studio version is:

Android Studio Chipmunk | 2021.2.1
Build #AI-212.5712.43.2112.8512546, built on April 29, 2022
Runtime version: 11.0.12+0-b1504.28-7817840 aarch64
VM: OpenJDK 64-Bit Server VM by JetBrains s.r.o.
macOS 12.3.1
GC: G1 Young Generation, G1 Old Generation
Memory: 2048M
Cores: 8
Registry: external.system.auto.import.disabled=true, ide.instant.shutdown=false
Non-Bundled Plugins: org.jetbrains.kotlin (212-1.6.21-release-334-AS5457.46)

I was able to solve the problem by downloading and changing the JDK version to 1.8. Hope it helps. :-)

dalcomdev avatar May 14 '22 05:05 dalcomdev