Skip to content
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

com.google.android.play:core:1.10.0 incompatibility with Android 14 #10

Open
jdupuis opened this issue Jun 19, 2024 · 5 comments
Open

Comments

@jdupuis
Copy link

jdupuis commented Jun 19, 2024

Your Environment

  • Plugin version: 2.0.0
  • Platform: Android
  • OS version: 14
  • Device manufacturer / model: Any
  • Cordova version (cordova -v): 12.0.0
  • Cordova platform version (cordova platform ls): 13.0.0

Actual Behavior

Google Play Store not finding an incompatibility in the SDK with Android API 34 by updating to the latest Play Core library version dependency to avoid app crashes : https://developer.android.com/guide/playcore#playcore-migration

Expected Behavior

Google Play Store finding an incompatibility in the SDK with Android API 34 because of com.google.android.play:core:1.10.0 defined in the build.gradle file.

Steps to Reproduce

  1. Create a cordova app with this plugin
  2. Build and upload an Android app to Google Play Store
  3. Be shown below warning when trying to release the app.
error-play-store

Context

Create and upload Android app with this plugin to the Google Play Store.

@BenLaKnet
Copy link

BenLaKnet commented Jun 23, 2024

If it helps, I updated build.gradle of the plugin:

android {
	compileOptions {
        sourceCompatibility JavaVersion.VERSION_20
        targetCompatibility JavaVersion.VERSION_20
    }
}

dependencies {
    // Load the google play core library
    //implementation 'com.google.android.play:core:1.10.3'
	implementation 'com.google.android.play:review:2.0.1'
	implementation 'com.google.android.play:app-update:2.1.0'
    implementation 'com.android.volley:volley:1.2.1'
}

And updated:
plugins\cordova-plugin-native-app-update\src\android\CDVAppUpdate.java

import com.google.android.gms.appupdate.AppUpdateInfo;
import com.google.android.gms.appupdate.AppUpdateManager;
import com.google.android.gms.appupdate.AppUpdateManagerFactory;
import com.google.android.gms.install.model.AppUpdateType;
import com.google.android.gms.install.model.UpdateAvailability;
import com.google.android.gms.tasks.Task;

@BenLaKnet
Copy link

BenLaKnet commented Jun 25, 2024

I updated only the files in directory plugins.
But, I have always the same message from Google Play.

And if I tried to update different files manually, I have other errors.

Please... a new version is needed.

@BenLaKnet
Copy link

BenLaKnet commented Jun 26, 2024

That is compiling and runing with:

Modify gradle files like wrote before:

project\plugins\cordova-plugin-native-app-update\src\android\build.gradle
project\node_modules\cordova-plugin-native-app-update\src\android\build.gradle
project\platforms\android\cordova-plugin-native-app-update\app-build.gradle

And

project\node_modules\cordova-plugin-native-app-update\src\android\CDVAppUpdate.java
project\platforms\android\app\src\main\java\com\apache\cordova\appupdate\CDVAppUpdate.java
project\plugins\cordova-plugin-native-app-update\src\android\CDVAppUpdate.java

With:

/* Class imports for In-App Updates */
import com.android.volley.Request;
import com.android.volley.toolbox.JsonObjectRequest;
import com.android.volley.toolbox.Volley;
import com.google.android.play.core.appupdate.AppUpdateInfo;
import com.google.android.play.core.appupdate.AppUpdateManager;
import com.google.android.play.core.appupdate.AppUpdateManagerFactory;
import com.google.android.play.core.install.model.AppUpdateType;
import com.google.android.play.core.install.model.UpdateAvailability;
import com.google.android.gms.tasks.Task;

@BenLaKnet
Copy link

BenLaKnet commented Jun 28, 2024

Hi @kungfu-king-betty,

I posted a fork with files updated. Could you please try it.
And accept the pull request.

@BenLaKnet
Copy link

@kungfu-king-betty , please check the pull request.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants