Open azharsprinting opened 7 months ago
Hello, Thank you for reaching out. Can you please confirm the following: -What version are you using? -Are you using a custom view? -If you are using your custom view, and you are adding switchComponent, what UI library are you using? -Also, is the attached for the full stack?
Thanks Hanna
Hello, I have created a new project and successfully implemented this SDK as mentioned in the sample, but on implementing the same in my current project, It again gives me this error.
1 - I am using latest version 2.0.7
2 - No, I am not using a custom view.
3 - No, the Full stack is as follows,
Fatal Exception: java.lang.NullPointerException: Attempt to invoke virtual method 'void android.graphics.drawable.Drawable.setTintList(android.content.res.ColorStateList)' on a null object reference
at com.cookieinformation.mobileconsents.ui.PreferenceItemViewHolder.
is this conflicting with any library in our project?
@HannahShulman We are using the following libraries implementation "androidx.core:core-ktx:1.12.0" implementation "androidx.appcompat:appcompat:1.6.1" implementation "com.google.android.material:material:1.11.0" implementation "androidx.constraintlayout:constraintlayout:2.1.4"
implementation "androidx.lifecycle:lifecycle-viewmodel-ktx:2.7.0" implementation "androidx.lifecycle:lifecycle-runtime-ktx:2.7.0" implementation "androidx.lifecycle:lifecycle-livedata-ktx:2.7.0"
implementation "androidx.cardview:cardview:1.0.0" implementation "org.jetbrains.kotlinx:kotlinx-coroutines-android:1.7.3" implementation "androidx.fragment:fragment-ktx:1.6.2" implementation "com.android.support:multidex:1.0.1"
implementation "org.jetbrains.anko:anko:0.10.8" implementation "org.koin:koin-android:2.0.1" implementation "com.squareup.moshi:moshi-kotlin:1.8.0" kapt("com.squareup.moshi:moshi-kotlin-codegen:1.8.0")
implementation "com.google.android.gms:play-services-location:21.0.1" implementation "com.google.android.gms:play-services-maps:18.1.0" implementation "com.google.android.gms:play-services-vision:20.1.3" implementation "com.google.android.gms:play-services-vision-common:19.1.3" implementation "com.google.android.gms:play-services-vision-image-label:18.1.1"
implementation "com.google.firebase:firebase-analytics-ktx:21.2.0" implementation "com.google.firebase:firebase-firestore:21.0.0" implementation "com.google.firebase:firebase-firestore-ktx:21.0.0" implementation "com.google.firebase:firebase-crashlytics-ktx:18.3.1" implementation "com.google.firebase:firebase-dynamic-links:19.1.0" implementation "com.google.firebase:firebase-ml-vision:24.1.0" implementation "com.google.firebase:firebase-ml-model-interpreter:22.0.4"
implementation "io.grpc:grpc-okhttp:1.32.2"
implementation "com.asosyalbebe:moment4j:1.0.0"
implementation("com.squareup.retrofit2:retrofit:2.9.0") { exclude module: 'okhttp' exclude module: 'okhttp3' } implementation "com.squareup.retrofit2:converter-gson:2.9.0" implementation "com.squareup.retrofit2:converter-scalars:2.9.0" implementation "com.squareup.okhttp3:okhttp:4.10.0" implementation "com.squareup.okhttp3:logging-interceptor:4.10.0" implementation "io.jsonwebtoken:jjwt:0.9.1" implementation "com.squareup.retrofit2:converter-moshi:2.9.0"
implementation "com.github.bumptech.glide:glide:4.13.2" kapt "com.github.bumptech.glide:compiler:4.11.0" implementation "com.github.bumptech.glide:okhttp3-integration:4.5.0" implementation("com.github.bumptech.glide:recyclerview-integration:4.5.0") { transitive = false }
implementation "org.permissionsdispatcher:permissionsdispatcher:4.3.0" kapt "org.permissionsdispatcher:permissionsdispatcher-processor:4.3.0"
implementation "com.github.moxy-community:moxy:2.2.1" kapt "com.github.moxy-community:moxy-compiler:2.2.1" implementation "com.github.moxy-community:moxy-androidx:2.2.1" implementation "com.github.moxy-community:moxy-material:2.2.1" implementation "com.github.moxy-community:moxy-ktx:2.2.1"
implementation "eu.davidea:flexible-adapter:5.1.0"
implementation "com.afollestad.material-dialogs:core:3.3.0"
implementation "com.github.arimorty:floatingsearchview:2.1.1" implementation "com.github.ybq:Android-SpinKit:1.2.0" implementation "com.yqritc:recyclerview-flexibledivider:1.4.0"
implementation "com.andkulikov:transitionseverywhere:2.0.0" implementation "ru.tinkoff.scrollingpagerindicator:scrollingpagerindicator:1.0.6" implementation "com.airbnb.android:lottie:6.4.0"
implementation "com.google.maps.android:android-maps-utils:2.2.0"
implementation "com.google.android.gms:play-services-flags:18.0.1" implementation "com.otaliastudios:cameraview:2.7.2"
implementation "com.google.android.play:app-update:2.1.0" implementation "com.google.android.play:app-update-ktx:2.1.0"
implementation "com.tjek.sdk:android-sdk:6.0.2"
implementation "zendesk.messaging:messaging-android:2.13.0" implementation("com.zendesk:support:5.1.0") { exclude group: 'com.zendesk', module: 'messaging' } implementation("com.zendesk:answerbot:3.0.9") { exclude group: 'com.zendesk', module: 'messaging' }
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk8:1.8.20" implementation "org.jetbrains.kotlin:kotlin-reflect:1.8.20"
implementation "com.google.code.gson:gson:2.10.1" implementation "com.android.support:support-annotations:28.0.0"
implementation "com.google.zxing:core:3.4.1" implementation "com.journeyapps:zxing-android-embedded:3.4.0@aar"
implementation "com.facebook.android:facebook-android-sdk:9.0.0"
implementation "com.algolia:algoliasearch-android:3.27.0" implementation "com.algolia.instantsearch-android:insights:3.0.0"
implementation "net.yslibrary.keyboardvisibilityevent:keyboardvisibilityevent:3.0.0-RC3"
dImplementation "com.github.chuckerteam.chucker:library:3.5.2" pImplementation "com.github.chuckerteam.chucker:library-no-op:3.5.2"
implementation 'com.pierfrancescosoffritti.androidyoutubeplayer:core:11.0.1'
implementation "androidx.datastore:datastore-preferences:1.0.0"
implementation "androidx.work:work-runtime-ktx:2.9.0"
implementation "com.emarsys:emarsys-sdk:3.7.3" implementation "com.emarsys:emarsys-firebase:3.7.3"
@azharsprinting Thank you for your info, I will look into this. Can I assume you are setting the SDK color?
Yes I am using the default color that is used in sample for testing
@HannahShulman please comment on this
I had successfully run the sample project with my credentials, and Then I Implemented this into my project, it is initialized successfully, but when clicking the button to show consent it gives me this error.
Fatal Exception: java.lang.NullPointerException: Attempt to invoke virtual method 'void android.graphics.drawable.Drawable.setTintList(android.content.res.ColorStateList)' on a null object reference at com.cookieinformation.mobileconsents.ui.PreferenceItemViewHolder.(PrivacyPreferencesListAdapter.kt:113)
at com.cookieinformation.mobileconsents.ui.PrivacyPreferencesListAdapter.onCreateViewHolder(PrivacyPreferencesListAdapter.kt:52)
at com.cookieinformation.mobileconsents.ui.PrivacyPreferencesListAdapter.onCreateViewHolder(PrivacyPreferencesListAdapter.kt:24)
I copied everything from the sample app to my project, it is working in sample app but not in my project.