Open manumuuv opened 1 month ago
I think obfuscation is causing the issue since you have mentioned this issue happens only in the release builds. You can try this configuration in proguard and check if the issue is resolved? -keep com.clevertap.android.sdk.**
Some of the gradle versions have an issue reported where similar thing is seen https://issuetracker.google.com/issues/133457361 -> please make sure you are not on these versions/use the workarounds if this is the issue.
You can check with these 2 things and see if things work for you?
Thanks for the quick reply.
I do have -keep class com.clevertap.android.sdk.**
and I don't think it's an obfuscation problem, as the issue is still there when I set minifyEnabled false
Upgrading gradle version doesn't help either, I have gradle-8.4, and upgrading to gradle-8.6 doesn't fix the issue. The workarounds don't work as they are deprecated in new versions of gradle
PLease let me know if you need more information from my side
I found this thread in list of issues on media3 repo -> https://github.com/google/ExoPlayer/issues/6801
Pointers from the thread : Did you try to invalidate caches and restart, some users have reported this might be android studio/gradle caching issue Did you try to include the dependency via an .aar file?
On a side note can you provide full build.gradle and possibly a min implementation to reproduce this issue, it seems to be stemming from media3 and packaging android bundle side and clevertap is merely the invocation site.
Kindly try out these things and help me with more information about a minimum viable app to reproduce this issue.
As mentioned in the ExoPLayer issue you share the problem is happening if generating signed builds.
gradle.properties:
android.defaults.buildfeatures.buildconfig=true
android.enableJetifier=true
android.jetifier.ignorelist=bcprov-jdk15on
android.nonFinalResIds=false
android.nonTransitiveRClass=false
android.useAndroidX=true
org.gradle.jvmargs=-Xmx4608m
build.gradle:
apply plugin: 'com.android.application'
apply plugin: 'kotlin-android'
apply plugin: 'com.google.devtools.ksp'
apply plugin: 'com.google.firebase.firebase-perf'
apply plugin: 'com.github.ben-manes.versions'
apply from: 'dependency_upgrade_plugin.gradle'
repositories {
maven {
url "https://jitpack.io"
}
maven { url 'https://oss.sonatype.org/content/repositories/snapshots' }
maven { url 'https://zendesk.jfrog.io/zendesk/repo' }
mavenCentral()
}
android {
namespace 'com.yourtrainer.android'
signingConfigs {
debug {
storeFile file("./debug.keystore")
}
release {
//key store file...
}
}
compileSdkVersion 34
buildToolsVersion '34.0.0'
defaultConfig {
minSdkVersion 21
targetSdkVersion 34
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
}
compileOptions {
// Flag to enable support for the new language APIs
coreLibraryDesugaringEnabled true
sourceCompatibility JavaVersion.VERSION_17
targetCompatibility JavaVersion.VERSION_17
}
kotlinOptions {
jvmTarget = '17'
}
buildTypes {
release {
signingConfig signingConfigs.release
minifyEnabled false
debuggable false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
viewBinding {
enabled = true
}
buildFeatures {
compose = true
}
composeOptions {
kotlinCompilerExtensionVersion = "1.5.11"
}
flavorDimensions "product", "env"
productFlavors {
_app {
dimension "product"
versionCode buildVersion
versionName buildName
// applicationId "..."
// manifestPlaceholders.appName = "..."
// buildConfigFields
//
}
develop {
dimension "env"
applicationIdSuffix ".dev"
manifestPlaceholders.appNameSuffix = " Dev"
manifestPlaceholders.branchTestMode = "true"
}
production {
dimension "env"
manifestPlaceholders.branchTestMode = "false"
}
}
lint {
abortOnError true
baseline file('lint-baseline.xml')
checkAllWarnings true
checkGeneratedSources true
disable 'GradleDependency', 'NewerVersionAvailable', 'NewApi', 'SyntheticAccessor', "JvmStaticProvidesInObjectDetector", "FieldSiteTargetOnQualifierAnnotation", "ModuleCompanionObjects", "ModuleCompanionObjectsNotInModuleParent"
warningsAsErrors true
}
}
configurations {
ktlint
}
tasks.register('ktlint', JavaExec) {
description = "Check Kotlin code style."
classpath = configurations.ktlint
mainClass.set("com.pinterest.ktlint.Main")
args "src/**/*.kt"
}
check.dependsOn ktlint
tasks.register('ktlintFormat', JavaExec) {
description = "Fix Kotlin code style deviations."
classpath = configurations.ktlint
mainClass.set("com.pinterest.ktlint.Main")
args "-F", "src/**/*.kt"
jvmArgs "--add-opens=java.base/java.lang=ALL-UNNAMED"
}
tasks.register('installGitHook', Copy) {
from new File(rootProject.rootDir, 'scripts/pre-commit') into { new File(rootProject.rootDir, '.git/hooks') }
fileMode 0777
from new File(rootProject.rootDir, 'scripts/pre-push') into { new File(rootProject.rootDir, '.git/hooks') }
fileMode 0777
}
tasks.getByPath('preBuild').dependsOn installGitHook
dependencies {
coreLibraryDesugaring "com.android.tools:desugar_jdk_libs:2.0.4"
implementation fileTree(dir: 'libs', include: ['*.jar'])
//Kotlin
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk8:1.9.23"
implementation "androidx.media3:media3-session:1.1.1"
implementation "androidx.media3:media3-exoplayer:1.1.1"
implementation "androidx.media3:media3-ui:1.1.1"
implementation "androidx.media3:media3-common:1.1.1"
implementation "androidx.media3:media3-exoplayer-hls:1.1.1"
implementation "com.clevertap.android:clevertap-segment-android:1.6.0"
implementation "com.clevertap.android:clevertap-android-sdk:7.0.1"
ktlint("com.pinterest:ktlint:$versions.ktlint") {
attributes {
attribute(Bundling.BUNDLING_ATTRIBUTE, getObjects().named(Bundling, Bundling.EXTERNAL))
}
}
}
apply plugin: 'com.google.gms.google-services'
apply plugin: 'com.google.firebase.crashlytics'
Trying to generate minimum implementation to reproduce the crash, I found out the issue is solved if I change the minSdk from minSdkVersion 21
to minSdkVersion 24
.
I don't know why, but I'll keep investigating
Describe the bug I've upgraded to v7.0.1, which doesn't have
Utils.haveVideoPlayerSupport
anymore, and the app crashes when I try to open the clevertap inbox.To Reproduce Steps to reproduce the behavior:
Expected behavior The clevertap inbox should open as it does when I use older clevertapSdk version with
Utils.haveVideoPlayerSupport
set tofalse
Screenshots/Logs Error stack trace:
Environment (please complete the following information):
Additional context I made sure I have the same media3 version (1.1.1) It only happens in release builds. I have this set as compile options
If it's possible to add a way to disable Video player support, as there were in previous versions
haveVideoPlayerSupport
) it would be great but if there is a way to fix it supporting Video player it would be even better.Let me know if you need more info.
Thank you