1

When I upload the app in the play store its throws an error to change the target version to 28 if I changed I got a lot of error.So anyone helps me to solve this problem. I tried but nothing is working for me.

I changed all the libraries to updated version but in my code, I am data binding I am getting a lot of errors in data binding generated class I shared the Gradle file.

I expect the correct solution to solve this issue

Abraham Mathew
  • 2,029
  • 3
  • 21
  • 42
jeya chitra
  • 73
  • 1
  • 5

2 Answers2

1

You need to change minSdkVersion, targetSdkVersion and buildToolsVersion. BuildTools should be targeting targetSdkVersion e.g:

android {
    defaultConfig {
        minSdkVersion 23
        targetSdkVersion 28
    }
    buildToolsVersion '28.0.3'
}

and you should match the com.android.support implementations to the buildToolsVersion

Phash
  • 428
  • 2
  • 7
  • I am already trying this solution is not working, please give any other solution for this problem – jeya chitra Aug 09 '19 at 07:13
  • does it build locally? – Phash Aug 09 '19 at 08:16
  • yes, its build locally but when I run the app I got an error like this. org.gradle.api.internal.tasks.compile.CompilationFailedException: Compilation failed; see the compiler error output for details – jeya chitra Aug 09 '19 at 09:20
  • could you run the gradle build and run the app afterwards? Please post the StackTrace / Errorlog – Phash Aug 09 '19 at 09:51
  • error: cannot find symbol class FirebaseInstanceIdService I got this error please advise me to solve this – jeya chitra Aug 09 '19 at 10:02
  • please look at this article: https://firebase.google.com/docs/reference/android/com/google/firebase/iid/FirebaseInstanceIdService - you will need to use a newer implementation – Phash Aug 09 '19 at 10:20
  • please give any example about the link – jeya chitra Aug 09 '19 at 10:29
  • it states, that your FirebaseInstanceIdService is deprecated and soon to be removed. So, go with the newer implementation – Phash Aug 09 '19 at 11:58
  • I got another issue like Inconvertible type:cannot cast android.fragment.app.Fragment to com.google.android.gms.map.SupportMapFragment how can I solve this issue please advise me – jeya chitra Aug 09 '19 at 12:16
  • without code, this is difficult, but you try to cast a false types – Phash Aug 09 '19 at 14:01
1

When I upload the app in the play store its throws an error to change the target version to 28 if I changed I got a lot of error.

This is because the minimum requirement for Google play is api 28, see Meet Google Play's target API level requirement. Here the excerpt:

When you upload an APK, it needs to meet Google Play’s target API level requirements. Starting August 1, 2019, Google Play requires that new apps target at least Android 9.0 (API level 28), and that app updates target Android 9.0 from November 1, 2019. Until these dates, new apps and app updates must target at least Android 8.0 (API level 26).

Hence, the Play Store is rejecting your application if target version is < 28.

I changed all the libraries to updated version but in my code, I am data binding I am getting a lot of errors in data binding generated class I shared the Gradle file.

You need to make sure that compileSdkVersion, buildToolsVersion, targetSdkVersion, and support libraries dependencies use the same version. So, make sure your build.gradle something like the following:

apply plugin: 'com.android.application'

android {
    compileSdkVersion 28
    buildToolsVersion '28.0.3'

    defaultConfig {
      ...
      minSdkVersion 15
      targetSdkVersion 28

      ...
    }
}


dependencies {

   implementation 'com.android.support:appcompat-v7.28.0.0'

   ...
}
ישו אוהב אותך
  • 28,609
  • 11
  • 78
  • 96