-
Notifications
You must be signed in to change notification settings - Fork 346
Fix build errors due to library and tool updates #153
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
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -18,14 +18,14 @@ | |
| apply plugin: 'com.android.application' | ||
|
|
||
| // Wrap the relative path with file() since CMake requires an absolute path. | ||
| def PLAY_CORE_NATIVE_SDK_DIR = file('../play-core-native-sdk') | ||
| // def PLAY_CORE_NATIVE_SDK_DIR = file('../play-core-native-sdk') | ||
|
|
||
| android { | ||
| compileSdkVersion 28 | ||
| compileSdkVersion 34 | ||
|
|
||
| defaultConfig { | ||
| applicationId = 'com.google.android.samples.playassetdeliverynative' | ||
| minSdkVersion 16 | ||
| minSdkVersion 21 | ||
| targetSdkVersion 28 | ||
| versionCode 1 | ||
| versionName "1.0.0" | ||
|
|
@@ -42,8 +42,8 @@ android { | |
| release { | ||
| minifyEnabled false | ||
| proguardFile getDefaultProguardFile('proguard-android-optimize.txt') | ||
| proguardFile "$PLAY_CORE_NATIVE_SDK_DIR/proguard/asset_delivery.pgcfg" | ||
| proguardFile "$PLAY_CORE_NATIVE_SDK_DIR/proguard/common.pgcfg" | ||
| //proguardFile "$PLAY_CORE_NATIVE_SDK_DIR/proguard/asset_delivery.pgcfg" | ||
| //proguardFile "$PLAY_CORE_NATIVE_SDK_DIR/proguard/common.pgcfg" | ||
| } | ||
| debug { | ||
| minifyEnabled false | ||
|
|
@@ -55,6 +55,11 @@ android { | |
| } | ||
| } | ||
|
|
||
| compileOptions { | ||
| sourceCompatibility JavaVersion.VERSION_1_8 | ||
| targetCompatibility JavaVersion.VERSION_1_8 | ||
| } | ||
|
|
||
| //All asset packs listed here will be included in the final AppBundle | ||
| assetPacks = [":install_time_pack", ":on_demand_pack", ":fast_follow_pack"] | ||
|
|
||
|
|
@@ -64,7 +69,14 @@ android { | |
| } | ||
|
|
||
| dependencies { | ||
| // 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:asset-delivery:2.3.0' | ||
|
|
||
| // For Kotlin users also add the Kotlin extensions library for Play Asset Delivery: | ||
| implementation 'com.google.android.play:asset-delivery-ktx:2.3.0' | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This dependency adds the Kotlin extensions library for Play Asset Delivery. However, this project doesn't appear to use Kotlin (e.g., |
||
|
|
||
| implementation 'androidx.appcompat:appcompat:1.0.2' | ||
| implementation 'androidx.constraintlayout:constraintlayout:1.1.3' | ||
| implementation files("$PLAY_CORE_NATIVE_SDK_DIR/playcore.aar") | ||
| //implementation files("$PLAY_CORE_NATIVE_SDK_DIR/playcore.aar") | ||
| } | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -223,10 +223,10 @@ AssetPackDownloadStatus PrintDownloadState(struct android_app *app) { | |
| */ | ||
| void ShowCellularDataConfirmation(struct android_app *app) { | ||
| AssetPackErrorCode error_code1 = | ||
| AssetPackManager_showCellularDataConfirmation(app->activity->clazz); | ||
| ShowCellularDataConfirmationStatus status; | ||
| AssetPackManager_showConfirmationDialog(app->activity->clazz); | ||
| ShowConfirmationDialogStatus status; | ||
| AssetPackErrorCode error_code2 = | ||
| AssetPackManager_getShowCellularDataConfirmationStatus(&status); | ||
| AssetPackManager_getShowConfirmationDialogStatus(&status); | ||
|
Comment on lines
+226
to
+229
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The API calls here have been updated from |
||
| char log[1000] = ""; | ||
| sprintf(log, | ||
| "ShowCellularDataConfirmation, error_code=%d; Cellular data confirmation status=%d, error_code=%d", | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -21,7 +21,7 @@ buildscript { | |
| jcenter() | ||
| } | ||
| dependencies { | ||
| classpath 'com.android.tools.build:gradle:4.0.0-beta03' | ||
| classpath 'com.android.tools.build:gradle:4.0.2' | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. While updating the Android Gradle Plugin, it's a critical time to also address the use of |
||
| } | ||
| } | ||
|
|
||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,5 +1,6 @@ | ||
| #Wed Jan 07 10:37:12 SGT 2026 | ||
| distributionBase=GRADLE_USER_HOME | ||
| distributionPath=wrapper/dists | ||
| distributionUrl=https\://services.gradle.org/distributions/gradle-6.2.2-bin.zip | ||
| zipStoreBase=GRADLE_USER_HOME | ||
| zipStorePath=wrapper/dists | ||
| distributionUrl=https\://services.gradle.org/distributions/gradle-6.2.2-all.zip |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
While it's great that you've updated
compileSdkVersionto 34, thetargetSdkVersionis still set to 28 (on line 29). This is very outdated and does not meet current Google Play requirements, which mandate targeting a recent API level (e.g., 33 or higher). To ensure your app is compliant and can leverage the latest platform improvements, you should also updatetargetSdkVersionto 34 to matchcompileSdkVersion.