Search code examples
androidandroid-gradle-pluginbuild.gradleandroid-version

What should I set for compileSdkVersion, minSdkVersion, and targetSdkVersion to support from Marshmallow to Pie?


My android application is able to install in Oreo & Pie without any problem. If I tried to install the release build in Marshmallow & Nougat version of phone it is throwing an error "There is error while parsing the package" Please find my sdk version in gradle

compileSdkVersion 28
  minSdkVersion 21
  targetSdkVersion 28
  implementation com.android.support:appcompat-v7:28.0.0
  implementation com.android.support:support-v4:28.0.0
  implementation com.android.support:design:28.0.0

Suppose If I change my compile & target sdk version to 26 does it work in Marshmallow & Nougat devices? If I change to SDK version to 26 and support libraries to 26.0.0 am getting build error like android resource linking failed.

Please help me to resolve this issue and provide solution for my android application should support from marshmallow to pie[latest forward compatibility].

Thanks in Advance


Solution

  • Hi Everybody Thanks for the suggestion and comments. Finally I found what is the issue in Nougat 7.0 version.

    The issue not with the gradle. Issue due to my package name in project folder i.e Activities,Services,Utilities,Models all the package name has been starts with Capital letter so it throws an error saying that in android manifest file android:name is not defined[not able to recognize while trying to install in Nougat device].

    Found issue by installing the release apk in API Level 24 & 25 simulator and found out the error in LogCat.

    Once I modified all the package name in my project with small letter i.e activities,services,utilities, now I can able to install the release apk in Nougat version device.

    Now unable to install it in Marshmallow device 6.0. This time am getting App is not installed error

    Please let me know what am missing for version 6.0 devices.

    Thanks in Advance