Skip to content

make example run on my pixel 8 pro with new android studio install #2276

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

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
31 changes: 17 additions & 14 deletions Examples/OneSignalDemo/app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,15 @@ plugins {
}

android {
compileSdkVersion 34
namespace = "com.onesignal.sdktest"

buildFeatures {
buildConfig = true
}

compileSdkVersion 35
defaultConfig {
minSdkVersion 21
minSdkVersion 24
targetSdkVersion 34
versionCode 1
versionName "1.0"
Expand Down Expand Up @@ -50,16 +56,13 @@ android {
}
}

// Forced downgrade to Java 1.8 for compiling the application due to Android N error when building
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
}

packagingOptions {
exclude 'androidsupportmultidexversion.txt'
resources {
excludes += ['androidsupportmultidexversion.txt']
}
}


task flavorSelection() {
if (getGradle().getStartParameter().getTaskRequests().toString().contains("Gms")) {
apply plugin: 'com.google.gms.google-services'
Expand All @@ -71,14 +74,14 @@ android {
}

dependencies {
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk8:$kotlinVersion"
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk8:2.1.0"
implementation 'androidx.multidex:multidex:2.0.1'
implementation 'androidx.cardview:cardview:1.0.0'
implementation 'androidx.appcompat:appcompat:1.5.1'
implementation 'androidx.vectordrawable:vectordrawable:1.1.0'
implementation 'androidx.appcompat:appcompat:1.7.0'
implementation 'androidx.vectordrawable:vectordrawable:1.2.0'

implementation 'com.google.android.material:material:1.7.0'
implementation 'com.google.android.gms:play-services-location:21.0.0'
implementation 'com.google.android.material:material:1.12.0'
implementation 'com.google.android.gms:play-services-location:21.3.0'

implementation 'com.github.bumptech.glide:glide:4.12.0'

Expand Down
13 changes: 3 additions & 10 deletions Examples/OneSignalDemo/build.gradle
Original file line number Diff line number Diff line change
@@ -1,9 +1,6 @@
// Top-level build file where you can add configuration options common to all sub-projects/modules.

buildscript {
ext {
kotlinVersion = '1.7.10'
}
repositories {
google()
mavenCentral()
Expand All @@ -12,8 +9,8 @@ buildscript {
maven { url 'https://developer.huawei.com/repo/' }
}
dependencies {
classpath 'com.android.tools.build:gradle:7.2.2'
classpath 'com.google.gms:google-services:4.3.10'
classpath 'com.android.tools.build:gradle:8.9.1'
classpath 'com.google.gms:google-services:4.4.2'
classpath 'com.huawei.agconnect:agcp:1.6.2.300'

// TODO: Do not place your application dependencies here; they belong
Expand All @@ -28,8 +25,4 @@ allprojects {
// Huawei maven
maven { url 'https://developer.huawei.com/repo/' }
}
}

task clean(type: Delete) {
delete rootProject.buildDir
}
}
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
#Wed Mar 26 09:51:07 PDT 2025
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-7.3.3-all.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-8.11.1-bin.zip
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
4 changes: 2 additions & 2 deletions Examples/OneSignalDemo/local.properties
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,6 @@
# Location of the SDK. This is only used by Gradle.
# For customization when using a Version Control System, please read the
# header note.
#Tue Jul 23 19:22:28 PDT 2019
#Wed Mar 26 09:47:42 PDT 2025
ndk.dir=/Users/mikechoch/Library/Android/sdk/ndk-bundle
sdk.dir=/Users/mikechoch/Library/Android/sdk
sdk.dir=/Users/emory/Library/Android/sdk
2 changes: 1 addition & 1 deletion OneSignalSDK/gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-7.3.3-all.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-7.3.3-bin.zip
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
Loading