Closed javierbentez closed 2 years ago
Hi @elmundomusical4,
Can you share the following information please:
buildle.gradle
and your app/build.gradle
You can try deleting your gradle cache ~/.gradle/caches/
Also, may be worth trying these steps:
APP/BUILD.GRADLE:
plugins {
id 'com.onesignal.androidsdk.onesignal-gradle-plugin'
id 'com.android.application'
}
android {
compileSdkVersion 30
buildToolsVersion '30.0.2'
lintOptions {
checkReleaseBuilds false
// Or, if you prefer, you can continue to check for errors in release builds,
// but continue the build even when errors are found:
abortOnError false
}
defaultConfig {
applicationId "com.javir3tics"
minSdkVersion 23
targetSdkVersion 30
versionCode 34
versionName 'BETA 3.0 (4)'
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
def contentProviderAuthority = "com.javir3tics.provider.StickerContentProvider"
manifestPlaceholders contentProviderAuthority: contentProviderAuthority
// Adds a new field for the authority to the BuildConfig class.
buildConfigField("String", "CONTENT_PROVIDER_AUTHORITY", "\"${contentProviderAuthority}\"")
}
buildTypes {
release {
manifestPlaceholders contentProviderAuthority: 'contentProviderAuthority'
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
crunchPngs false
}
}
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
}
}
dependencies {
implementation 'androidx.appcompat:appcompat:1.3.1'
implementation 'com.google.android.material:material:1.4.0'
implementation 'androidx.constraintlayout:constraintlayout:2.1.1'
implementation 'androidx.navigation:navigation-fragment:2.3.5'
implementation 'androidx.navigation:navigation-ui:2.3.5'
implementation 'androidx.legacy:legacy-support-v4:1.0.0'
implementation 'androidx.cardview:cardview:1.0.0'
testImplementation 'junit:junit:4.13.2'
androidTestImplementation 'androidx.test.ext:junit:1.1.3'
androidTestImplementation 'androidx.test.espresso:espresso-core:3.4.0'
// Bottom Navigation
implementation 'com.github.ismaeldivita:chip-navigation-bar:1.3.4'
implementation 'org.jetbrains.kotlin:kotlin-stdlib:1.5.30'
implementation("com.squareup.okhttp3:okhttp:4.9.1")
implementation 'com.google.code.gson:gson:2.8.6'
implementation 'com.jayway.jsonpath:json-path:2.6.0'
implementation 'androidx.browser:browser:1.3.0'
implementation 'com.google.guava:listenablefuture:9999.0-empty-to-avoid-conflict-with-guava'
implementation "com.orhanobut:hawk:2.0.1"
implementation 'androidx.emoji:emoji:1.1.0'
implementation 'com.google.androidbrowserhelper:androidbrowserhelper:2.2.2'
implementation 'androidx.browser:browser:1.3.0'
implementation "com.airbnb.android:lottie:3.7.0"
implementation 'de.hdodenhof:circleimageview:3.1.0'
// Material Dialog Library
implementation 'dev.shreyaspatil.MaterialDialog:MaterialDialog:2.2.2'
implementation 'com.github.Spikeysanju:MotionToast:1.3.3.4'
// This dependency is downloaded from the Google’s Maven repository.
// So, make sure you also include that repository in your project's build.gradle file.
implementation 'com.google.android.play:core:1.10.2'
// For Kotlin users also add the Kotlin extensions library for Play Core:
implementation 'com.google.android.play:core-ktx:1.8.1'
implementation 'com.sun.mail:android-mail:1.6.0'
implementation 'com.sun.mail:android-activation:1.6.0'
implementation 'com.jcminarro:RoundKornerLayouts:0.4.0'
implementation 'com.github.angads25:toggle:1.1.0'
implementation 'com.onesignal:OneSignal:[4.0.0, 4.99.99]'
implementation 'com.scottyab:rootbeer-lib:0.1.0'
implementation "androidx.security:security-crypto:1.0.0-rc04"
implementation "androidx.work:work-runtime:2.2.0"
}
BUILD.GRADLE:
// Top-level build file where you can add configuration options common to all sub-projects/modules.
buildscript {
repositories {
google()
mavenCentral()
gradlePluginPortal()
maven { url 'https://jitpack.io' }
}
dependencies {
classpath 'com.android.tools.build:gradle:7.0.3'
classpath 'gradle.plugin.com.onesignal:onesignal-gradle-plugin:[0.12.10, 0.99.99]'
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
}
}
allprojects {
repositories {
google()
gradlePluginPortal()
mavenCentral()
maven { url 'https://jitpack.io' }
}
}
task clean(type: Delete) {
delete rootProject.buildDir
}
Hi @elmundomusical4,
It looks like this dependency implementation 'com.google.guava:listenablefuture:9999.0-empty-to-avoid-conflict-with-guava'
is causing the issue where it can't resolve ListenableFuture, which seems to be coming from com.google.guava:listenablefuture
when I look in Studio .
Remove that dependency and it should work.
So thanks!! It is now fixed!! 😃😃
Description:
When my app try to set onesignal app id, it crash and I get this error:
Environment
minSdkVersion 23 targetSdkVersion 30 (I've tried to change it to 31 also) I've added reproducing the steps in the android docs. Yesterday, with the same code, worked.
Steps to Reproduce Issue:
OneSignal.setAppId("HERE IS MY APP ID");