Skip to content

Caused by: com.tickaroo.tikxml.TypeAdapterNotFoundException: No TypeAdapter for class found. #120

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
alex-podolian opened this issue Jan 4, 2019 · 23 comments

Comments

@alex-podolian
Copy link

Here is app build.gradle:

buildscript {
    repositories {
        maven { url 'https://maven.fabric.io/public' }
    }

    dependencies {
        classpath 'io.fabric.tools:gradle:1.27.0'
    }
}

apply plugin: 'com.android.application'
apply plugin: 'io.fabric'

repositories {
    maven { url 'https://maven.fabric.io/public' }
}

def versionMajor = 1 //up to 9
def versionMinor = 0 //up to 9
def versionBuild = 12 //up to 999

android {
    compileSdkVersion 28
    buildToolsVersion '28.0.3'
    defaultConfig {
        applicationId "com.myapp"
        minSdkVersion 21
        targetSdkVersion 28
        versionCode versionMajor * 10_000 + versionMinor * 1_000 + versionBuild
        versionName "${versionMajor}.${versionMinor}.${versionBuild}"
        multiDexEnabled true
    }

    android.applicationVariants.all { variant ->
        variant.outputs.all { output ->
            outputFileName = "${parent.name}-${variant.versionName}-${variant.versionCode}.apk"
        }
    }

    lintOptions {
        checkReleaseBuilds false
        abortOnError false
    }

    dataBinding {
        enabled = true
    }

    compileOptions {
        sourceCompatibility JavaVersion.VERSION_1_8
        targetCompatibility JavaVersion.VERSION_1_8
    }

    signingConfigs {
        debug {
            storeFile file("keys/debug.jks")
            storePassword "android"
            keyAlias "androiddebugkey"
            keyPassword "android"
        }
    }

    buildTypes {
        debug {
            minifyEnabled false
            debuggable true
            signingConfig signingConfigs.debug
            buildConfigField "String", "API_ENDPOINT", "\"https://my.api.endpoint/\""
            buildConfigField "String", "GOOGLE_MAP_API_ENDPOINT", "\"https://maps.googleapis.com/maps/api/\""
            buildConfigField "String", "GOOGLE_PLACE_API_KEY", "\"some_google_api_key\""
        }
    }
}

dependencies {
    implementation fileTree(include: ['*.jar'], dir: 'libs')
    implementation files('libs/mail.jar')
    implementation files('libs/activation.jar')
    implementation('com.crashlytics.sdk.android:crashlytics:2.6.7@aar') {
        transitive = true
    }
    implementation 'com.google.android.gms:play-services-maps:16.0.0'
    implementation 'com.google.android.gms:play-services-places:16.0.0'
    implementation 'com.google.android.gms:play-services-location:16.0.0'
    implementation 'com.android.support:appcompat-v7:28.0.0'
    implementation 'com.android.support:design:28.0.0'
    implementation 'com.android.support:multidex:1.0.3'
    implementation 'com.android.support:support-v4:28.0.0'
    implementation 'com.android.support:cardview-v7:28.0.0'
    implementation 'com.google.android:flexbox:0.1.2'
    implementation 'com.android.support.constraint:constraint-layout:1.1.3'
    implementation 'com.yqritc:recyclerview-flexibledivider:1.4.0'
    implementation 'com.jakewharton:butterknife:8.8.1'
    implementation 'com.squareup.retrofit2:retrofit:2.4.0'
    implementation 'com.squareup.retrofit2:converter-gson:2.4.0'
    implementation 'com.squareup.retrofit2:adapter-rxjava2:2.3.0'
    implementation 'com.squareup.okhttp3:okhttp:3.11.0'
    implementation 'com.squareup.okhttp3:logging-interceptor:3.11.0'
    implementation 'com.squareup.okhttp3:okhttp-urlconnection:3.11.0'
    implementation 'io.reactivex.rxjava2:rxandroid:2.0.1'
    implementation 'io.reactivex.rxjava2:rxjava:2.1.7'
    implementation 'com.facebook.stetho:stetho:1.5.0'
    implementation 'com.facebook.stetho:stetho-okhttp3:1.5.0'
    implementation 'me.ydcool.lib:qrmodule:1.0'
    implementation 'com.google.firebase:firebase-messaging:17.3.4'
    implementation 'com.google.firebase:firebase-core:16.0.6'
    implementation 'com.github.simbiose:Encryption:2.0.0'
    implementation 'org.greenrobot:eventbus:3.0.0'
    implementation 'com.github.bumptech.glide:glide:4.7.1'
    implementation 'q.rorbin:badgeview:1.1.2'
    implementation 'jp.wasabeef:recyclerview-animators:2.2.7'
    annotationProcessor 'com.github.bumptech.glide:compiler:4.6.1'
    annotationProcessor 'com.jakewharton:butterknife-compiler:8.8.1'

    implementation 'com.tickaroo.tikxml:retrofit-converter:0.8.16-SNAPSHOT'
    implementation 'com.tickaroo.tikxml:annotation:0.8.16-SNAPSHOT'
    implementation 'com.tickaroo.tikxml:core:0.8.16-SNAPSHOT'
    annotationProcessor 'com.tickaroo.tikxml:processor:0.8.16-SNAPSHOT'
}

apply plugin: 'com.google.gms.google-services'

Here is myApp build.gradle:


buildscript {
    repositories {
        jcenter()
        maven {
            url 'https://maven.google.com/'
            name 'Google'
        }
        mavenCentral()
        maven {
            url 'http://oss.sonatype.org/content/repositories/snapshots'
        }
    }
    dependencies {
        classpath 'com.android.tools.build:gradle:3.2.1'
        classpath 'com.google.gms:google-services:4.2.0'
    }
}

allprojects {
    repositories {
        google()
        jcenter()
        mavenCentral()
        maven {
            url 'http://oss.sonatype.org/content/repositories/snapshots'
        }
        maven { url 'https://jitpack.io' }
        maven {
            url "https://maven.google.com"
        }
        maven {
            url 'https://maven.google.com/'
            name 'Google'
        }
    }
}

task clean(type: Delete) {
    delete rootProject.buildDir
}

Here is my gradle.properties:

org.gradle.daemon=true
org.gradle.configureondemand=true
org.gradle.parallel=true
org.gradle.jvmargs=-Xmx2048m -XX:MaxPermSize=512m -XX:+HeapDumpOnOutOfMemoryError -Dfile.encoding=UTF-8
android.buildCacheDir=/home/alex/AndroidStudioProjects/myApp_cache

I'm trying to send request via Retrofit2 + RxJava2:

public interface SomeApi {
	@POST("SomeService")
	Observable<Response<PostAuthResponseEnvelope>> login(@Body PostAuthRequestEnvelope body);
}
@Xml(name="Envelope")
public class PostAuthRequestEnvelope {
	@PropertyElement (name = "Body")
	private String body;

	public String getBody() {
		return body;
	}
	public void setBody(String body) {
		this.body = body;
	}
}

Here is logcat:

01-04 12:17:44.661 22973-22973/com.myapp W/System.err: java.lang.RuntimeException: Unable to convert com.myapp.data.net.rest.request.post_auth_request.PostAuthRequestEnvelope@237b3ad2 to RequestBody
01-04 12:17:44.661 22973-22973/com.myapp W/System.err:     at retrofit2.ParameterHandler$Body.apply(ParameterHandler.java:357)
01-04 12:17:44.661 22973-22973/com.myapp W/System.err:     at retrofit2.ServiceMethod.toCall(ServiceMethod.java:110)
01-04 12:17:44.661 22973-22973/com.myapp W/System.err:     at retrofit2.OkHttpCall.createRawCall(OkHttpCall.java:184)
01-04 12:17:44.661 22973-22973/com.myapp W/System.err:     at retrofit2.OkHttpCall.execute(OkHttpCall.java:167)
01-04 12:17:44.661 22973-22973/com.myapp W/System.err:     at retrofit2.adapter.rxjava2.CallExecuteObservable.subscribeActual(CallExecuteObservable.java:41)
01-04 12:17:44.661 22973-22973/com.myapp W/System.err:     at io.reactivex.Observable.subscribe(Observable.java:10981)
01-04 12:17:44.661 22973-22973/com.myapp W/System.err:     at io.reactivex.internal.operators.observable.ObservableSubscribeOn$SubscribeTask.run(ObservableSubscribeOn.java:96)
01-04 12:17:44.661 22973-22973/com.myapp W/System.err:     at io.reactivex.internal.schedulers.ScheduledDirectTask.call(ScheduledDirectTask.java:38)
01-04 12:17:44.661 22973-22973/com.myapp W/System.err:     at io.reactivex.internal.schedulers.ScheduledDirectTask.call(ScheduledDirectTask.java:26)
01-04 12:17:44.661 22973-22973/com.myapp W/System.err:     at java.util.concurrent.FutureTask.run(FutureTask.java:237)
01-04 12:17:44.661 22973-22973/com.myapp W/System.err:     at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1112)
01-04 12:17:44.661 22973-22973/com.myapp W/System.err:     at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:587)
01-04 12:17:44.661 22973-22973/com.myapp W/System.err:     at java.lang.Thread.run(Thread.java:818)
01-04 12:17:44.661 22973-22973/com.myapp W/System.err: Caused by: com.tickaroo.tikxml.TypeAdapterNotFoundException: No TypeAdapter for class com.myapp.data.net.rest.request.post_auth_request.PostAuthRequestEnvelope found. Expected name of the type adapter is com.myapp.data.net.rest.request.post_auth_request.PostAuthRequestEnvelope$$TypeAdapter
01-04 12:17:44.661 22973-22973/com.myapp W/System.err:     at com.tickaroo.tikxml.TypeAdapters.get(TypeAdapters.java:112)
01-04 12:17:44.661 22973-22973/com.myapp W/System.err:     at com.tickaroo.tikxml.TikXmlConfig.getTypeAdapter(TikXmlConfig.java:85)
01-04 12:17:44.661 22973-22973/com.myapp W/System.err:     at com.tickaroo.tikxml.TikXml.write(TikXml.java:128)
01-04 12:17:44.661 22973-22973/com.myapp W/System.err:     at com.tickaroo.tikxml.TikXml.write(TikXml.java:121)
01-04 12:17:44.661 22973-22973/com.myapp W/System.err:     at com.tickaroo.tikxml.retrofit.TikXmlRequestBodyConverter.convert(TikXmlRequestBodyConverter.java:45)
01-04 12:17:44.661 22973-22973/com.myapp W/System.err:     at com.tickaroo.tikxml.retrofit.TikXmlRequestBodyConverter.convert(TikXmlRequestBodyConverter.java:34)
01-04 12:17:44.661 22973-22973/com.myapp W/System.err:     at retrofit2.ParameterHandler$Body.apply(ParameterHandler.java:355)
01-04 12:17:44.661 22973-22973/com.myapp W/System.err: 	... 12 more
01-04 12:17:44.661 22973-22973/com.myapp W/System.err: Caused by: java.lang.ClassNotFoundException: com.myapp.data.net.rest.request.post_auth_request.PostAuthRequestEnvelope$$TypeAdapter
01-04 12:17:44.671 22973-22973/com.myapp W/System.err:     at java.lang.Class.classForName(Native Method)
01-04 12:17:44.671 22973-22973/com.myapp W/System.err:     at java.lang.Class.forName(Class.java:308)
01-04 12:17:44.671 22973-22973/com.myapp W/System.err:     at java.lang.Class.forName(Class.java:272)
01-04 12:17:44.671 22973-22973/com.myapp W/System.err:     at com.tickaroo.tikxml.TypeAdapters.get(TypeAdapters.java:88)
01-04 12:17:44.671 22973-22973/com.myapp W/System.err: 	... 18 more
01-04 12:17:44.671 22973-22973/com.myapp W/System.err: Caused by: java.lang.ClassNotFoundException: Didn't find class "com.myapp.data.net.rest.request.post_auth_request.PostAuthRequestEnvelope$$TypeAdapter" on path: DexPathList[[zip file "/data/app/com.myapp-2/base.apk", zip file "/data/app/com.myapp-2/split_lib_dependencies_apk.apk", zip file "/data/app/com.myapp-2/split_lib_slice_0_apk.apk", zip file "/data/app/com.myapp-2/split_lib_slice_1_apk.apk", zip file "/data/app/com.myapp-2/split_lib_slice_2_apk.apk", zip file "/data/app/com.myapp-2/split_lib_slice_3_apk.apk", zip file "/data/app/com.myapp-2/split_lib_slice_4_apk.apk", zip file "/data/app/com.myapp-2/split_lib_slice_5_apk.apk", zip file "/data/app/com.myapp-2/split_lib_slice_6_apk.apk", zip file "/data/app/com.myapp-2/split_lib_slice_7_apk.apk", zip file "/data/app/com.myapp-2/split_lib_slice_8_apk.apk", zip file "/data/app/com.myapp-2/split_lib_slice_9_apk.apk"],nativeLibraryDirectories=[/vendor/lib, /system/lib]]
01-04 12:17:44.671 22973-22973/com.myapp W/System.err:     at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:56)
01-04 12:17:44.671 22973-22973/com.myapp W/System.err:     at java.lang.ClassLoader.loadClass(ClassLoader.java:511)
01-04 12:17:44.671 22973-22973/com.myapp W/System.err:     at java.lang.ClassLoader.loadClass(ClassLoader.java:469)
01-04 12:17:44.671 22973-22973/com.myapp W/System.err: 	... 22 more
01-04 12:17:44.671 22973-22973/com.myapp W/System.err: 	Suppressed: java.lang.ClassNotFoundException: com.myapp.data.net.rest.request.post_auth_request.PostAuthRequestEnvelope$$TypeAdapter
01-04 12:17:44.671 22973-22973/com.myapp W/System.err:     at java.lang.Class.classForName(Native Method)
01-04 12:17:44.671 22973-22973/com.myapp W/System.err:     at java.lang.BootClassLoader.findClass(ClassLoader.java:781)
01-04 12:17:44.671 22973-22973/com.myapp W/System.err:     at java.lang.BootClassLoader.loadClass(ClassLoader.java:841)
01-04 12:17:44.671 22973-22973/com.myapp W/System.err:     at java.lang.ClassLoader.loadClass(ClassLoader.java:504)
01-04 12:17:44.671 22973-22973/com.myapp W/System.err: 		... 23 more
01-04 12:17:44.671 22973-22973/com.myapp W/System.err: 	Caused by: java.lang.NoClassDefFoundError: Class not found using the boot class loader; no stack available
01-04 12:17:44.671 22973-22973/com.myapp E/<-- myappApp -->: Unable to convert com.myapp.data.net.rest.request.post_auth_request.PostAuthRequestEnvelope@237b3ad2 to RequestBody
    java.lang.RuntimeException: Unable to convert com.myapp.data.net.rest.request.post_auth_request.PostAuthRequestEnvelope@237b3ad2 to RequestBody
        at retrofit2.ParameterHandler$Body.apply(ParameterHandler.java:357)
        at retrofit2.ServiceMethod.toCall(ServiceMethod.java:110)
        at retrofit2.OkHttpCall.createRawCall(OkHttpCall.java:184)
        at retrofit2.OkHttpCall.execute(OkHttpCall.java:167)
        at retrofit2.adapter.rxjava2.CallExecuteObservable.subscribeActual(CallExecuteObservable.java:41)
        at io.reactivex.Observable.subscribe(Observable.java:10981)
        at io.reactivex.internal.operators.observable.ObservableSubscribeOn$SubscribeTask.run(ObservableSubscribeOn.java:96)
        at io.reactivex.internal.schedulers.ScheduledDirectTask.call(ScheduledDirectTask.java:38)
        at io.reactivex.internal.schedulers.ScheduledDirectTask.call(ScheduledDirectTask.java:26)
        at java.util.concurrent.FutureTask.run(FutureTask.java:237)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1112)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:587)
        at java.lang.Thread.run(Thread.java:818)
     Caused by: com.tickaroo.tikxml.TypeAdapterNotFoundException: No TypeAdapter for class com.myapp.data.net.rest.request.post_auth_request.PostAuthRequestEnvelope found. Expected name of the type adapter is com.myapp.data.net.rest.request.post_auth_request.PostAuthRequestEnvelope$$TypeAdapter
        at com.tickaroo.tikxml.TypeAdapters.get(TypeAdapters.java:112)
        at com.tickaroo.tikxml.TikXmlConfig.getTypeAdapter(TikXmlConfig.java:85)
        at com.tickaroo.tikxml.TikXml.write(TikXml.java:128)
        at com.tickaroo.tikxml.TikXml.write(TikXml.java:121)
        at com.tickaroo.tikxml.retrofit.TikXmlRequestBodyConverter.convert(TikXmlRequestBodyConverter.java:45)
        at com.tickaroo.tikxml.retrofit.TikXmlRequestBodyConverter.convert(TikXmlRequestBodyConverter.java:34)
        at retrofit2.ParameterHandler$Body.apply(ParameterHandler.java:355)
        at retrofit2.ServiceMethod.toCall(ServiceMethod.java:110) 
        at retrofit2.OkHttpCall.createRawCall(OkHttpCall.java:184) 
        at retrofit2.OkHttpCall.execute(OkHttpCall.java:167) 
        at retrofit2.adapter.rxjava2.CallExecuteObservable.subscribeActual(CallExecuteObservable.java:41) 
        at io.reactivex.Observable.subscribe(Observable.java:10981) 
        at io.reactivex.internal.operators.observable.ObservableSubscribeOn$SubscribeTask.run(ObservableSubscribeOn.java:96) 
        at io.reactivex.internal.schedulers.ScheduledDirectTask.call(ScheduledDirectTask.java:38) 
        at io.reactivex.internal.schedulers.ScheduledDirectTask.call(ScheduledDirectTask.java:26) 
        at java.util.concurrent.FutureTask.run(FutureTask.java:237) 
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1112) 
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:587) 
        at java.lang.Thread.run(Thread.java:818) 
     Caused by: java.lang.ClassNotFoundException: com.myapp.data.net.rest.request.post_auth_request.PostAuthRequestEnvelope$$TypeAdapter
        at java.lang.Class.classForName(Native Method)
        at java.lang.Class.forName(Class.java:308)
        at java.lang.Class.forName(Class.java:272)
        at com.tickaroo.tikxml.TypeAdapters.get(TypeAdapters.java:88)
        at com.tickaroo.tikxml.TikXmlConfig.getTypeAdapter(TikXmlConfig.java:85) 
        at com.tickaroo.tikxml.TikXml.write(TikXml.java:128) 
        at com.tickaroo.tikxml.TikXml.write(TikXml.java:121) 
        at com.tickaroo.tikxml.retrofit.TikXmlRequestBodyConverter.convert(TikXmlRequestBodyConverter.java:45) 
        at com.tickaroo.tikxml.retrofit.TikXmlRequestBodyConverter.convert(TikXmlRequestBodyConverter.java:34) 
        at retrofit2.ParameterHandler$Body.apply(ParameterHandler.java:355) 
        at retrofit2.ServiceMethod.toCall(ServiceMethod.java:110) 
        at retrofit2.OkHttpCall.createRawCall(OkHttpCall.java:184) 
        at retrofit2.OkHttpCall.execute(OkHttpCall.java:167) 
        at retrofit2.adapter.rxjava2.CallExecuteObservable.subscribeActual(CallExecuteObservable.java:41) 
        at io.reactivex.Observable.subscribe(Observable.java:10981) 
        at io.reactivex.internal.operators.observable.ObservableSubscribeOn$SubscribeTask.run(ObservableSubscribeOn.java:96) 
        at io.reactivex.internal.schedulers.ScheduledDirectTask.call(ScheduledDirectTask.java:38) 
        at io.reactivex.internal.schedulers.ScheduledDirectTask.call(ScheduledDirectTask.java:26) 
        at java.util.concurrent.FutureTask.run(FutureTask.java:237) 
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1112) 
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:587) 
        at java.lang.Thread.run(Thread.java:818) 
     Caused by: java.lang.ClassNotFoundException: Didn't find class "com.myapp.data.net.rest.request.post_auth_request.PostAuthRequestEnvelope$$TypeAdapter" on path: DexPathList[[zip file "/data/app/com.myapp-2/base.apk", zip file "/data/app/com.myapp-2/split_lib_dependencies_apk.apk", zip file "/data/app/com.myapp-2/split_lib_slice_0_apk.apk", zip file "/data/app/com.myapp-2/split_lib_slice_1_apk.apk", zip file "/data/app/com.myapp-2/split_lib_slice_2_apk.apk", zip file "/data/app/com.myapp-2/split_lib_slice_3_apk.apk", zip file "/data/app/com.myapp-2/split_lib_slice_4_apk.apk", zip file "/data/app/com.myapp-2/split_lib_slice_5_apk.apk", zip file "/data/app/com.myapp-2/split_lib_slice_6_apk.apk", zip file "/data/app/com.myapp-2/split_lib_slice_7_apk.apk", zip file "/data/app/com.myapp-2/split_lib_slice_8_apk.apk", zip file "/data/app/com.myapp-2/split_lib_slice_9_apk.apk"],nativeLibraryDirectories=[/vendor/lib, /system/lib]]
        at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:56)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:511)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:469)
        at java.lang.Class.classForName(Native Method) 
        at java.lang.Class.forName(Class.java:308) 
        at java.lang.Class.forName(Class.java:272) 
        at com.tickaroo.tikxml.TypeAdapters.get(TypeAdapters.java:88) 
        at com.tickaroo.tikxml.TikXmlConfig.getTypeAdapter(TikXmlConfig.java:85) 
        at com.tickaroo.tikxml.TikXml.write(TikXml.java:128) 
        at com.tickaroo.tikxml.TikXml.write(TikXml.java:121) 
        at com.tickaroo.tikxml.retrofit.TikXmlRequestBodyConverter.convert(TikXmlRequestBodyConverter.java:45) 
        at com.tickaroo.tikxml.retrofit.TikXmlRequestBodyConverter.convert(TikXmlRequestBodyConverter.java:34) 
        at retrofit2.ParameterHandler$Body.apply(ParameterHandler.java:355) 
        at retrofit2.ServiceMethod.toCall(ServiceMethod.java:110) 
        at retrofit2.OkHttpCall.createRawCall(OkHttpCall.java:184) 
        at retrofit2.OkHttpCall.execute(OkHttpCall.java:167) 
        at retrofit2.adapter.rxjava2.CallExecuteObservable.subscribeActual(CallExecuteObservable.java:41) 
        at io.reactivex.Observable.subscribe(Observable.java:10981) 
        at io.reactivex.internal.operators.observable.ObservableSubscribeOn$SubscribeTask.run(ObservableSubscribeOn.java:96) 
        at io.reactivex.internal.schedulers.ScheduledDirectTask.call(ScheduledDirectTask.java:38) 
        at io.reactivex.internal.schedulers.ScheduledDirectTask.call(ScheduledDirectTask.java:26) 
        at java.util.concurrent.FutureTask.run(FutureTask.java:237) 
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1112) 
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:587) 
        at java.lang.Thread.run(Thread.java:818) 
    	Suppressed: java.lang.ClassNotFoundException: com.myapp.data.net.rest.request.post_auth_request.PostAuthRequestEnvelope$$TypeAdapter
        at java.lang.Class.classForName(Native Method)
        at java.lang.BootClassLoader.findClass(ClassLoader.java:781)
        at java.lang.BootClassLoader.loadClass(ClassLoader.java:841)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:504)
        		... 23 more
     Caused by: java.lang.NoClassDefFoundError: Class not found using the boot class loader; no stack available

I have been trying to figure out what is going wrong for a couple days, but still no result=((

@sockeqwe
Copy link
Contributor

sockeqwe commented Jan 4, 2019 via email

@alex-podolian
Copy link
Author

alex-podolian commented Jan 4, 2019

I suppose yes.

import com.tickaroo.tikxml.annotation.PropertyElement;
import com.tickaroo.tikxml.annotation.Xml;

@Xml(name="Envelope")
public class PostAuthRequestEnvelope {
	@PropertyElement (name = "Body")
	private String body;

	public String getBody() {
		return body;
	}
	public void setBody(String body) {
		this.body = body;
	}
}

I have been doing everything according to documentation: https://github.com/Tickaroo/tikxml/blob/master/docs/AnnotatingModelClasses.md

@sockeqwe
Copy link
Contributor

sockeqwe commented Jan 4, 2019 via email

@alex-podolian
Copy link
Author

alex-podolian commented Jan 4, 2019

Produard runs only in release mode. I don't use it in debug mode. Even though all rules for TikXml added to proguard in right manner.

Here is my rules in proguard:

# Add project specific ProGuard rules here.
# By default, the flags in this file are appended to flags specified
# in C:\android\sdk/tools/proguard/proguard-android.txt
# You can edit the include path and order by changing the proguardFiles
# directive in build.gradle.
#
# For more details, see
#   http://developer.android.com/guide/developing/tools/proguard.html

# Add any project specific keep options here:

# If your project uses WebView with JS, uncomment the following
# and specify the fully qualified class name to the JavaScript interface
# class:
#-keepclassmembers class fqcn.of.javascript.interface.for.webview {
#   public *;
#}

# Obfuscation
-repackageclasses ''
-renamesourcefileattribute SourceFile
-keepattributes SourceFile,LineNumberTable

# SDK
-dontwarn com.google.**
-keepclassmembers enum * {
    public static **[] values();
    public static ** valueOf(java.lang.String);
}
-keepclassmembers class **.R$* {
    public static <fields>;
}
-keepclassmembers class * {
    native <methods>;
}

# Support
-dontwarn android.support.**
-keep class android.support.** { *; }
-keep interface android.support.** { *; }

# Play services
-keep class com.google.android.gms.** { *; }
-dontwarn com.google.android.gms.**

# Butterknife
-keep public class * implements butterknife.Unbinder { public <init>(...); }
-keep class butterknife.*
-keepclasseswithmembernames class * { @butterknife.* <methods>; }
-keepclasseswithmembernames class * { @butterknife.* <fields>; }

# Stetho
-keep class com.facebook.stetho.** { *; }

# Retrofit 2
-dontwarn retrofit.**
-keep class retrofit.** { *; }
-keepclasseswithmembers class * {
    @retrofit.http.* <methods>;
}
-dontnote retrofit2.Platform
-dontnote retrofit2.Platform$IOS$MainThreadExecutor
-dontwarn retrofit2.Platform$Java8
-keepattributes Signature
-keepattributes Exceptions

# Okhttp
-dontwarn okio.**
-dontwarn okhttp3.**
-keep class okhttp3.** { *;}
-dontwarn com.squareup.okhttp.**

# GSON
-keep class com.google.gson.** { *; }
-keep class com.google.inject.** { *; }
-keep class org.apache.http.** { *; }

-keep @interface android.support.annotation.Keep
-keep @android.support.annotation.Keep class *

# Etc
-keep class com.justsafe.justsafe.notification.** {*;}
-dontwarn sun.misc.**
-dontwarn sun.misc.Unsafe
-dontwarn android.security.NetworkSecurityPolicy
-keepclasseswithmembers class * {
  @android.support.annotation.Keep <fields>;
}
-keepclasseswithmembers class * {
  @android.support.annotation.Keep <methods>;
}

-keepclassmembers class * implements android.os.Parcelable {
  public static final *** CREATOR;
}

-dontwarn rx.internal.util.**
-dontwarn com.squareup.okhttp.**

# Glide
-keep public class * implements com.bumptech.glide.module.GlideModule
-keep public class * extends com.bumptech.glide.AppGlideModule
-keep public enum com.bumptech.glide.load.resource.bitmap.ImageHeaderParser$** {
  **[] $VALUES;
  public *;
}

# TikXML
-keep class com.tickaroo.tikxml.** { *; }
-keep @com.tickaroo.tikxml.annotation.Xml public class *
-keep class **$$TypeAdapter { *; }

-keepclasseswithmembernames class * {
    @com.tickaroo.tikxml.* <fields>;
}

-keepclasseswithmembernames class * {
    @com.tickaroo.tikxml.* <methods>;
}

@alex-podolian
Copy link
Author

alex-podolian commented Jan 4, 2019

Here is my Retrofit builder:

    @NonNull 
    public static Retrofit createRetrofit() {
        final OkHttpClient.Builder okHttpClientBuilder = new OkHttpClient.Builder();
        setOkHttpClientBuilderLogging(okHttpClientBuilder);
        okHttpClientBuilder.addInterceptor(new BasicAuthInterceptor(USERNAME, PASSWORD));
        okHttpClientBuilder.addInterceptor(getLocaleInterceptor());
        return new Retrofit.Builder()
            .baseUrl(BuildConfig.API_ENDPOINT)
            .client(okHttpClientBuilder.build())
            .addConverterFactory(TikXmlConverterFactory.create(new TikXml.Builder().exceptionOnUnreadXml(false).build()))
	    .addCallAdapterFactory(RxJava2CallAdapterFactory.create())
            .build();
    }

Maybe I have missed something...

@alex-podolian
Copy link
Author

There is no &&TypeAdapter class in generated folder.
If I change implementations to 0.8.13 version than it doesn't want to compile due to annotationProcessors conflict, as I mentioned here #116

I use retrofit2 and RxJava in my project. And for sending xml requests and parsing xml responses I tried to use TikXml, cause it has a lot of benefits comparing with SimpleXML, and it works with Retrofit2. But I still can't make it work. Damn((

What is going wrong here? Please help...

@iNoles
Copy link
Contributor

iNoles commented Jan 4, 2019

I am noticed that you uses android build cache. Maybe, you should clear it then build again

@alex-podolian
Copy link
Author

alex-podolian commented Jan 4, 2019

I have just made next actions:

  1. I have commented android.buildCacheDir=/home/alex/AndroidStudioProjects/Rodnik_android_cache
  2. I have invalidated caches and have restarted android studio.
  3. I have cleaned project and rebuild it again.

As a result - nothing have changed at all. Same problem - No TypeAdapter.

I am noticed that you uses android build cache. Maybe, you should clear it then build again

@sockeqwe
Copy link
Contributor

sockeqwe commented Jan 5, 2019

Please check if the following directoy contains the generated TypeAdapter Files:

app/build/generated/source/kapt/debug

Are there files in this directory that end with $$TypeAdapter?

@alex-podolian
Copy link
Author

alex-podolian commented Jan 7, 2019

I have no $$TypeAdapter Files in generated directory on path app/build/generated/source/kapt/debug.
I have already told that before. And I don't understand why it doesn't generate $$TypeAdapter files.
What can be the reason?

Please check if the following directoy contains the generated TypeAdapter Files:

app/build/generated/source/kapt/debug

Are there files in this directory that end with $$TypeAdapter?

@sockeqwe
Copy link
Contributor

sockeqwe commented Jan 7, 2019

Sorry, the folder should be app/build/generated/source/apt if you use java (not kapt which is for kotlin)

As you also use butterknife, do you see generated butterknife classes somewhere in this folder?

@alex-podolian
Copy link
Author

alex-podolian commented Jan 8, 2019

I have made a double-check and didn't find any $$TypeAdapter in all generated folders including app/build/generated/source/apt.
And yes, I have a lot of generated classes by butterknife and also databinding.
Here is some of it's names:

MainActivity_ViewBinding
RegisterFragment_ViewBinding
ActivityProfileEditBindingImpl
ActivityProfileEditBinding

and so on...
Everything works fine except tikxml=(((

Sorry, the folder should be app/build/generated/source/apt if you use java (not kapt which is for kotlin)

As you also use butterknife, do you see generated butterknife classes somewhere in this folder?

@sockeqwe
Copy link
Contributor

sockeqwe commented Jan 8, 2019 via email

@alex-podolian
Copy link
Author

alex-podolian commented Jan 8, 2019

Build from command line:

./gradlew build --stacktrace
Parallel execution with configuration on demand is an incubating feature.

> Configure project :app 
registerResGeneratingTask is deprecated, use registerGeneratedResFolders(FileCollection)
registerResGeneratingTask is deprecated, use registerGeneratedResFolders(FileCollection)
registerResGeneratingTask is deprecated, use registerGeneratedResFolders(FileCollection)

> Task :app:processDebugGoogleServices 
Parsing json file: /home/some_user/AndroidStudioProjects/myApp/app/google-services.json

> Task :app:compileDebugJavaWithJavac 
warning: checkType is a boxed field but needs to be un-boxed to execute (check,checkType). This may cause NPE so Data Binding will safely unbox it. You can change the expression and explicitly wrap checkType with safeUnbox() to prevent the warning
  file:///home/some_user/AndroidStudioProjects/myApp/app/src/main/res/layout/item_purchase2.xml Line:72
warning: isShowEmptyFieldError is a boxed field but needs to be un-boxed to execute app:errorEmptyFieldVisibility. This may cause NPE so Data Binding will safely unbox it. You can change the expression and explicitly wrap isShowEmptyFieldError with safeUnbox() to prevent the warning
  file:///home/some_user/AndroidStudioProjects/myApp/app/src/main/res/layout/fragment_first_step_reset_password.xml Line:31
warning: bonusType is a boxed field but needs to be un-boxed to execute (checkItem,bonusType). This may cause NPE so Data Binding will safely unbox it. You can change the expression and explicitly wrap bonusType with safeUnbox() to prevent the warning
  file:///home/some_user/AndroidStudioProjects/myApp/app/src/main/res/layout/item_check_purchase2.xml Line:93
warning: isShowEmptyFieldError is a boxed field but needs to be un-boxed to execute app:errorEmptyFieldVisibility. This may cause NPE so Data Binding will safely unbox it. You can change the expression and explicitly wrap isShowEmptyFieldError with safeUnbox() to prevent the warning
  file:///home/some_user/AndroidStudioProjects/myApp/app/src/main/res/layout/fragment_third_step_reset_password.xml Line:23
warning: isShowEmptyFieldError is a boxed field but needs to be un-boxed to execute app:errorEmptyFieldVisibility. This may cause NPE so Data Binding will safely unbox it. You can change the expression and explicitly wrap isShowEmptyFieldError with safeUnbox() to prevent the warning
  file:///home/some_user/AndroidStudioProjects/myApp/app/src/main/res/layout/fragment_second_step_reset_password.xml Line:31
warning: isBottomSpaceVisible is a boxed field but needs to be un-boxed to execute isBottomSpaceVisible ? View.VISIBLE : View.GONE. This may cause NPE so Data Binding will safely unbox it. You can change the expression and explicitly wrap isBottomSpaceVisible with safeUnbox() to prevent the warning
warning: isOnlyFuelShow is a boxed field but needs to be un-boxed to execute isOnlyFuelShow ? checkStatistics.fuelsSpentSum : checkStatistics.totalSpentSum. This may cause NPE so Data Binding will safely unbox it. You can change the expression and explicitly wrap isOnlyFuelShow with safeUnbox() to prevent the warning
warning: isFirstItem is a boxed field but needs to be un-boxed to execute isFirstItem ? View.VISIBLE : View.GONE. This may cause NPE so Data Binding will safely unbox it. You can change the expression and explicitly wrap isFirstItem with safeUnbox() to prevent the warning
warning: isFirstElement is a boxed field but needs to be un-boxed to execute isFirstElement ? View.VISIBLE : View.GONE. This may cause NPE so Data Binding will safely unbox it. You can change the expression and explicitly wrap isFirstElement with safeUnbox() to prevent the warning
Note: Some input files use or override a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
Note: /home/some_user/AndroidStudioProjects/myApp/app/src/main/java/com/myapp/ui/billings/billing/BillingPresenter.java uses unchecked or unsafe operations.
Note: Recompile with -Xlint:unchecked for details.
9 warnings

/home/some_user/AndroidStudioProjects/myApp/app/libs/additionnal.jar: D8: Type `java.awt.datatransfer.DataFlavor` was not found, it is required for default or static interface methods desugaring of `int org.apache.harmony.awt.datatransfer.FlavorsComparator.compare(java.awt.datatransfer.DataFlavor, java.awt.datatransfer.DataFlavor)`
/home/some_user/AndroidStudioProjects/myApp/app/libs/additionnal.jar: D8: Type `java.awt.datatransfer.SystemFlavorMap` was not found, it is required for default or static interface methods desugaring of `java.util.List org.apache.harmony.awt.datatransfer.DataSource.getNativesForFlavors(java.awt.datatransfer.DataFlavor[])`
/home/some_user/AndroidStudioProjects/myApp/app/libs/additionnal.jar: D8: Type `java.awt.datatransfer.SystemFlavorMap` was not found, it is required for default or static interface methods desugaring of `void org.apache.harmony.awt.datatransfer.DataProxy.<init>(org.apache.harmony.awt.datatransfer.DataProvider)`
/home/some_user/AndroidStudioProjects/myApp/app/libs/additionnal.jar: D8: Type `java.awt.image.Raster` was not found, it is required for default or static interface methods desugaring of `java.awt.image.BufferedImage org.apache.harmony.awt.datatransfer.DataProxy.createBufferedImage(org.apache.harmony.awt.datatransfer.RawBitmap)`
/home/some_user/AndroidStudioProjects/myApp/app/libs/additionnal.jar: D8: Type `java.awt.color.ColorSpace` was not found, it is required for default or static interface methods desugaring of `java.awt.image.BufferedImage org.apache.harmony.awt.datatransfer.DataProxy.createBufferedImage(org.apache.harmony.awt.datatransfer.RawBitmap)`
/home/some_user/AndroidStudioProjects/myApp/app/libs/additionnal.jar: D8: Interface `java.awt.datatransfer.Transferable` not found. It's needed to make sure desugaring of `org.apache.harmony.awt.datatransfer.DataProxy` is correct. Desugaring will assume that this interface has no default method.
/home/some_user/AndroidStudioProjects/myApp/app/libs/activation.jar: D8: Type `java.beans.Beans` was not found, it is required for default or static interface methods desugaring of `java.lang.Object javax.activation.CommandInfo.getCommandObject(javax.activation.DataHandler, java.lang.ClassLoader)`
/home/some_user/.gradle/caches/modules-2/files-2.1/com.tickaroo.tikxml/processor/0.8.16-SNAPSHOT/e54e1016d009a894044b9d080de570543ec84d51/processor-0.8.16-SNAPSHOT.jar: D8: Type `javax.lang.model.type.TypeKind` was not found, it is required for default or static interface methods desugaring of `void com.tickaroo.tikxml.processor.utils.TypeMirrorExtensionKt$WhenMappings.<clinit>()`
/home/some_user/AndroidStudioProjects/myApp/app/libs/mail.jar: D8: Type `javax.security.sasl.Sasl` was not found, it is required for default or static interface methods desugaring of `boolean com.sun.mail.imap.protocol.IMAPSaslAuthenticator.authenticate(java.lang.String[], java.lang.String, java.lang.String, java.lang.String, java.lang.String)`

> Task :app:processReleaseGoogleServices 
Parsing json file: /home/some_user/AndroidStudioProjects/myApp/app/google-services.json

> Task :app:compileReleaseJavaWithJavac 
warning: checkType is a boxed field but needs to be un-boxed to execute (check,checkType). This may cause NPE so Data Binding will safely unbox it. You can change the expression and explicitly wrap checkType with safeUnbox() to prevent the warning
  file:///home/some_user/AndroidStudioProjects/myApp/app/src/main/res/layout/item_purchase2.xml Line:72
warning: isShowEmptyFieldError is a boxed field but needs to be un-boxed to execute app:errorEmptyFieldVisibility. This may cause NPE so Data Binding will safely unbox it. You can change the expression and explicitly wrap isShowEmptyFieldError with safeUnbox() to prevent the warning
  file:///home/some_user/AndroidStudioProjects/myApp/app/src/main/res/layout/fragment_first_step_reset_password.xml Line:31
warning: bonusType is a boxed field but needs to be un-boxed to execute (checkItem,bonusType). This may cause NPE so Data Binding will safely unbox it. You can change the expression and explicitly wrap bonusType with safeUnbox() to prevent the warning
  file:///home/some_user/AndroidStudioProjects/myApp/app/src/main/res/layout/item_check_purchase2.xml Line:93
warning: isShowEmptyFieldError is a boxed field but needs to be un-boxed to execute app:errorEmptyFieldVisibility. This may cause NPE so Data Binding will safely unbox it. You can change the expression and explicitly wrap isShowEmptyFieldError with safeUnbox() to prevent the warning
  file:///home/some_user/AndroidStudioProjects/myApp/app/src/main/res/layout/fragment_third_step_reset_password.xml Line:23
warning: isShowEmptyFieldError is a boxed field but needs to be un-boxed to execute app:errorEmptyFieldVisibility. This may cause NPE so Data Binding will safely unbox it. You can change the expression and explicitly wrap isShowEmptyFieldError with safeUnbox() to prevent the warning
  file:///home/some_user/AndroidStudioProjects/myApp/app/src/main/res/layout/fragment_second_step_reset_password.xml Line:31
warning: isBottomSpaceVisible is a boxed field but needs to be un-boxed to execute isBottomSpaceVisible ? View.VISIBLE : View.GONE. This may cause NPE so Data Binding will safely unbox it. You can change the expression and explicitly wrap isBottomSpaceVisible with safeUnbox() to prevent the warning
warning: isOnlyFuelShow is a boxed field but needs to be un-boxed to execute isOnlyFuelShow ? checkStatistics.fuelsSpentSum : checkStatistics.totalSpentSum. This may cause NPE so Data Binding will safely unbox it. You can change the expression and explicitly wrap isOnlyFuelShow with safeUnbox() to prevent the warning
warning: isFirstItem is a boxed field but needs to be un-boxed to execute isFirstItem ? View.VISIBLE : View.GONE. This may cause NPE so Data Binding will safely unbox it. You can change the expression and explicitly wrap isFirstItem with safeUnbox() to prevent the warning
warning: isFirstElement is a boxed field but needs to be un-boxed to execute isFirstElement ? View.VISIBLE : View.GONE. This may cause NPE so Data Binding will safely unbox it. You can change the expression and explicitly wrap isFirstElement with safeUnbox() to prevent the warning
Note: Some input files use or override a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
Note: /home/some_user/AndroidStudioProjects/myApp/app/src/main/java/com/myapp/ui/billings/billing/BillingPresenter.java uses unchecked or unsafe operations.
Note: Recompile with -Xlint:unchecked for details.
9 warnings

/home/some_user/AndroidStudioProjects/myApp/app/libs/additionnal.jar: D8: Type `java.awt.datatransfer.DataFlavor` was not found, it is required for default or static interface methods desugaring of `int org.apache.harmony.awt.datatransfer.FlavorsComparator.compare(java.awt.datatransfer.DataFlavor, java.awt.datatransfer.DataFlavor)`
/home/some_user/AndroidStudioProjects/myApp/app/libs/additionnal.jar: D8: Type `java.awt.datatransfer.SystemFlavorMap` was not found, it is required for default or static interface methods desugaring of `java.util.List org.apache.harmony.awt.datatransfer.DataSource.getNativesForFlavors(java.awt.datatransfer.DataFlavor[])`
/home/some_user/AndroidStudioProjects/myApp/app/libs/additionnal.jar: D8: Type `java.awt.datatransfer.SystemFlavorMap` was not found, it is required for default or static interface methods desugaring of `void org.apache.harmony.awt.datatransfer.DataProxy.<init>(org.apache.harmony.awt.datatransfer.DataProvider)`
/home/some_user/AndroidStudioProjects/myApp/app/libs/additionnal.jar: D8: Type `java.awt.image.Raster` was not found, it is required for default or static interface methods desugaring of `java.awt.image.BufferedImage org.apache.harmony.awt.datatransfer.DataProxy.createBufferedImage(org.apache.harmony.awt.datatransfer.RawBitmap)`
/home/some_user/AndroidStudioProjects/myApp/app/libs/additionnal.jar: D8: Type `java.awt.color.ColorSpace` was not found, it is required for default or static interface methods desugaring of `java.awt.image.BufferedImage org.apache.harmony.awt.datatransfer.DataProxy.createBufferedImage(org.apache.harmony.awt.datatransfer.RawBitmap)`
/home/some_user/AndroidStudioProjects/myApp/app/libs/additionnal.jar: D8: Interface `java.awt.datatransfer.Transferable` not found. It's needed to make sure desugaring of `org.apache.harmony.awt.datatransfer.DataProxy` is correct. Desugaring will assume that this interface has no default method.
/home/some_user/AndroidStudioProjects/myApp/app/libs/activation.jar: D8: Type `java.beans.Beans` was not found, it is required for default or static interface methods desugaring of `java.lang.Object javax.activation.CommandInfo.getCommandObject(javax.activation.DataHandler, java.lang.ClassLoader)`
/home/some_user/AndroidStudioProjects/myApp/app/libs/mail.jar: D8: Type `javax.security.sasl.Sasl` was not found, it is required for default or static interface methods desugaring of `boolean com.sun.mail.imap.protocol.IMAPSaslAuthenticator.authenticate(java.lang.String[], java.lang.String, java.lang.String, java.lang.String, java.lang.String)`
/home/some_user/.gradle/caches/modules-2/files-2.1/com.tickaroo.tikxml/processor/0.8.16-SNAPSHOT/e54e1016d009a894044b9d080de570543ec84d51/processor-0.8.16-SNAPSHOT.jar: D8: Type `javax.lang.model.type.TypeKind` was not found, it is required for default or static interface methods desugaring of `void com.tickaroo.tikxml.processor.utils.TypeMirrorExtensionKt$WhenMappings.<clinit>()`

> Task :app:processSandboxGoogleServices 
Parsing json file: /home/some_user/AndroidStudioProjects/myApp/app/google-services.json

> Task :app:lint 
Ran lint on variant release: 792 issues found
Ran lint on variant debug: 792 issues found
Wrote HTML report to file:///home/some_user/AndroidStudioProjects/myApp/app/build/reports/lint-results.html
Wrote XML report to file:///home/some_user/AndroidStudioProjects/myApp/app/build/reports/lint-results.xml


BUILD SUCCESSFUL in 1m 9s
107 actionable tasks: 106 executed, 1 up-to-date

And if build from command line (run grandlew build) you don't see any error? Alex Podolian [email protected] schrieb am Di., 8. Jan. 2019, 02:20:

I have made a double-check and didn't find any $$TypeAdapter in all generated folders including app/build/generated/source/apt . And yes, I have a lot of generated classes by butterknife and also databinding. Here is some of it's names: MainActivity_ViewBinding RegisterFragment_ViewBinding ActivityProfileEditBindingImpl ActivityProfileEditBinding and so on... Everything works fine except tikxml=((( Sorry, the folder should be app/build/generated/source/apt if you use java (not kapt which is for kotlin) As you also use butterknife, do you see generated butterknife classes somewhere in this folder? — You are receiving this because you commented. Reply to this email directly, view it on GitHub <#120 (comment)>, or mute the thread https://github.com/notifications/unsubscribe-auth/AAjnrv_p4NzJsYramZIPNAfu_dRDvWmjks5vA_J2gaJpZM4ZpeEj .

@alex-podolian
Copy link
Author

alex-podolian commented Jan 8, 2019

I suppose problem is here:

/home/some_user/AndroidStudioProjects/myApp/app/libs/additionnal.jar: D8: Type `java.awt.datatransfer.DataFlavor` was not found, it is required for default or static interface methods desugaring of `int org.apache.harmony.awt.datatransfer.FlavorsComparator.compare(java.awt.datatransfer.DataFlavor, java.awt.datatransfer.DataFlavor)`
/home/some_user/AndroidStudioProjects/myApp/app/libs/additionnal.jar: D8: Type `java.awt.datatransfer.SystemFlavorMap` was not found, it is required for default or static interface methods desugaring of `java.util.List org.apache.harmony.awt.datatransfer.DataSource.getNativesForFlavors(java.awt.datatransfer.DataFlavor[])`
/home/some_user/AndroidStudioProjects/myApp/app/libs/additionnal.jar: D8: Type `java.awt.datatransfer.SystemFlavorMap` was not found, it is required for default or static interface methods desugaring of `void org.apache.harmony.awt.datatransfer.DataProxy.<init>(org.apache.harmony.awt.datatransfer.DataProvider)`
/home/some_user/AndroidStudioProjects/myApp/app/libs/additionnal.jar: D8: Type `java.awt.image.Raster` was not found, it is required for default or static interface methods desugaring of `java.awt.image.BufferedImage org.apache.harmony.awt.datatransfer.DataProxy.createBufferedImage(org.apache.harmony.awt.datatransfer.RawBitmap)`
/home/some_user/AndroidStudioProjects/myApp/app/libs/additionnal.jar: D8: Type `java.awt.color.ColorSpace` was not found, it is required for default or static interface methods desugaring of `java.awt.image.BufferedImage org.apache.harmony.awt.datatransfer.DataProxy.createBufferedImage(org.apache.harmony.awt.datatransfer.RawBitmap)`
/home/some_user/AndroidStudioProjects/myApp/app/libs/additionnal.jar: D8: Interface `java.awt.datatransfer.Transferable` not found. It's needed to make sure desugaring of `org.apache.harmony.awt.datatransfer.DataProxy` is correct. Desugaring will assume that this interface has no default method.
/home/some_user/AndroidStudioProjects/myApp/app/libs/activation.jar: D8: Type `java.beans.Beans` was not found, it is required for default or static interface methods desugaring of `java.lang.Object javax.activation.CommandInfo.getCommandObject(javax.activation.DataHandler, java.lang.ClassLoader)`
/home/some_user/.gradle/caches/modules-2/files-2.1/com.tickaroo.tikxml/processor/0.8.16-SNAPSHOT/e54e1016d009a894044b9d080de570543ec84d51/processor-0.8.16-SNAPSHOT.jar: D8: Type `javax.lang.model.type.TypeKind` was not found, it is required for default or static interface methods desugaring of `void com.tickaroo.tikxml.processor.utils.TypeMirrorExtensionKt$WhenMappings.<clinit>()`
/home/some_user/AndroidStudioProjects/myApp/app/libs/mail.jar: D8: Type `javax.security.sasl.Sasl` was not found, it is required for default or static interface methods desugaring of `boolean com.sun.mail.imap.protocol.IMAPSaslAuthenticator.authenticate(java.lang.String[], java.lang.String, java.lang.String, java.lang.String, java.lang.String)`

What can I do with that?

@sockeqwe
Copy link
Contributor

sockeqwe commented Jan 8, 2019

Hm, interesting ...

/home/some_user/.gradle/caches/modules-2/files-2.1/com.tickaroo.tikxml/processor/0.8.16-SNAPSHOT/e54e1016d009a894044b9d080de570543ec84d51/processor-0.8.16-SNAPSHOT.jar: D8: > Type javax.lang.model.type.TypeKind was not found, it is required for default or static interface methods desugaring of `void com.tickaroo.tikxml.processor.utils.TypeMirrorExtensionKt$WhenMappings.()

What this message basically says is that D8 compiles the processor into your APK. This should not happen because you have not an implementation 'com.tickaroo.tikxml:processor:0.8.16-SNAPSHOT' in you build.gradle file. However, it is not failing your build, so this messages is a Warning.

Could you please write the following to your command line and write the output:
./gradlew :app:dependencies

Is your project somewhere available so that I can try to debug it on my machine?

Does it work by using 0.8.13 version?

@alex-podolian
Copy link
Author

alex-podolian commented Jan 9, 2019

Here is dependencies from running ./gradlew :app:dependencies command:
dependencies.txt

If set:

implementation 'com.tickaroo.tikxml:retrofit-converter:0.8.13'
implementation 'com.tickaroo.tikxml:annotation:0.8.13'
implementation 'com.tickaroo.tikxml:core:0.8.13'
annotationProcessor 'com.tickaroo.tikxml:processor:0.8.13'

Output from 0.8.13 build fails:
0.8.13_build_output.txt

If building without annotationProcessor 'com.tickaroo.tikxml:processor:0.8.13' build success.

Unfortunately I can't provide U access to that project for now(( But I will try to provide U access to code if we don't manage this issue.

Hm, interesting ...

/home/some_user/.gradle/caches/modules-2/files-2.1/com.tickaroo.tikxml/processor/0.8.16-SNAPSHOT/e54e1016d009a894044b9d080de570543ec84d51/processor-0.8.16-SNAPSHOT.jar: D8: > Type javax.lang.model.type.TypeKind was not found, it is required for default or static interface methods desugaring of `void com.tickaroo.tikxml.processor.utils.TypeMirrorExtensionKt$WhenMappings.()

What this message basically says is that D8 compiles the processor into your APK. This should not happen because you have not an implementation 'com.tickaroo.tikxml:processor:0.8.16-SNAPSHOT' in you build.gradle file. However, it is not failing your build, so this messages is a Warning.

Could you please write the following to your command line and write the output:
./gradlew :app:dependencies

Is your project somewhere available so that I can try to debug it on my machine?

Does it work by using 0.8.13 version?

@alex-podolian
Copy link
Author

alex-podolian commented Jan 10, 2019

Any ideas how to figure out this problem?

@gswierczynski
Copy link

Using Kotlin and:

implementation "com.tickaroo.tikxml:annotation:0.8.16-SNAPSHOT"
implementation "com.tickaroo.tikxml:core:0.8.16-SNAPSHOT"
kapt "com.tickaroo.tikxml:processor:0.8.16-SNAPSHOT"
implementation "com.tickaroo.tikxml:retrofit-converter:0.8.16-SNAPSHOT"

does NOT generate TypeAdapter classes for me.

Using:

implementation "com.tickaroo.tikxml:annotation:0.8.13"
implementation "com.tickaroo.tikxml:core:0.8.13"
kapt "com.tickaroo.tikxml:processor:0.8.13"
implementation "com.tickaroo.tikxml:retrofit-converter:0.8.13"

does generate TypeAdapter classes, but naturally there are some features missing in 0.8.13.
I also found a suggestion to use:

implementation "com.tickaroo.tikxml:annotation:0.8.13"
implementation "com.tickaroo.tikxml:core:0.8.15"
kapt "com.tickaroo.tikxml:processor:0.8.15"
implementation "com.tickaroo.tikxml:retrofit-converter:0.8.15"

notice that only annotation artifact is in version 0.8.13.
I have not tried it myself, but it should be fine according to the @sockeqwe in this issue

@mateovalencia
Copy link

Hello, sorry I am having the same problem. Did you find a solution?

@iNoles
Copy link
Contributor

iNoles commented Sep 20, 2019

Using Kotlin and:

implementation "com.tickaroo.tikxml:annotation:0.8.16-SNAPSHOT"
implementation "com.tickaroo.tikxml:core:0.8.16-SNAPSHOT"
kapt "com.tickaroo.tikxml:processor:0.8.16-SNAPSHOT"
implementation "com.tickaroo.tikxml:retrofit-converter:0.8.16-SNAPSHOT"

does NOT generate TypeAdapter classes for me.

Using:

implementation "com.tickaroo.tikxml:annotation:0.8.13"
implementation "com.tickaroo.tikxml:core:0.8.13"
kapt "com.tickaroo.tikxml:processor:0.8.13"
implementation "com.tickaroo.tikxml:retrofit-converter:0.8.13"

does generate TypeAdapter classes, but naturally there are some features missing in 0.8.13.
I also found a suggestion to use:

implementation "com.tickaroo.tikxml:annotation:0.8.13"
implementation "com.tickaroo.tikxml:core:0.8.15"
kapt "com.tickaroo.tikxml:processor:0.8.15"
implementation "com.tickaroo.tikxml:retrofit-converter:0.8.15"

notice that only annotation artifact is in version 0.8.13.
I have not tried it myself, but it should be fine according to the @sockeqwe in this issue

The Snapshot builds should be fixed now over recent changes

@mateovalencia
Copy link

Using Kotlin and:

implementation "com.tickaroo.tikxml:annotation:0.8.16-SNAPSHOT"
implementation "com.tickaroo.tikxml:core:0.8.16-SNAPSHOT"
kapt "com.tickaroo.tikxml:processor:0.8.16-SNAPSHOT"
implementation "com.tickaroo.tikxml:retrofit-converter:0.8.16-SNAPSHOT"

does NOT generate TypeAdapter classes for me.
Using:

implementation "com.tickaroo.tikxml:annotation:0.8.13"
implementation "com.tickaroo.tikxml:core:0.8.13"
kapt "com.tickaroo.tikxml:processor:0.8.13"
implementation "com.tickaroo.tikxml:retrofit-converter:0.8.13"

does generate TypeAdapter classes, but naturally there are some features missing in 0.8.13.
I also found a suggestion to use:

implementation "com.tickaroo.tikxml:annotation:0.8.13"
implementation "com.tickaroo.tikxml:core:0.8.15"
kapt "com.tickaroo.tikxml:processor:0.8.15"
implementation "com.tickaroo.tikxml:retrofit-converter:0.8.15"

notice that only annotation artifact is in version 0.8.13.
I have not tried it myself, but it should be fine according to the @sockeqwe in this issue

The Snapshot builds should be fixed now over recent changes

I tried with this: (I am doing the app in Java)
implementation "com.tickaroo.tikxml:annotation:0.8.13"
implementation "com.tickaroo.tikxml:core:0.8.15"
annotationProcessor "com.tickaroo.tikxml:processor:0.8.15"
implementation "com.tickaroo.tikxml:retrofit-converter:0.8.15"

And I am getting this error when I sync the project:
ERROR: Failed to resolve: com.tickaroo.tikxml:annotation:0.8.15
Show in Project Structure dialog
Affected Modules: app

@reline
Copy link
Contributor

reline commented Sep 25, 2019

As mentioned here, you'll need to use com.github.Tickaroo.tikxml instead for 0.8.15

implementation 'com.github.Tickaroo.tikxml:annotation:0.8.15'
implementation 'com.github.Tickaroo.tikxml:core:0.8.15'
implementation "com.github.Tickaroo.tikxml:retrofit-converter:0.8.15"
kapt 'com.github.Tickaroo.tikxml:processor-common:0.8.15'
kapt 'com.github.Tickaroo.tikxml:processor:0.8.15'

I haven't tested pulling retrofit-converter, but the rest should work. If you need to use 0.8.13 with any of these, exclude core.

e.g.

implementation ('com.tickaroo.tikxml:converter-date-rfc3339:0.8.13') {
    exclude group: "com.tickaroo.tikxml", module: "core"
}

@sockeqwe sockeqwe closed this as completed Jan 9, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants