0

I need to set the target SDK version of an Android project to API 14. But I do not have the same version available to compile the project. I know that the project can be compiled with a different version but I need to know whether it will cause any issue.

I received the error "Android manifest file is missing" even though it exists. When I cleaned and then built the project it was compiled but the application crashed. What am I doing wrong here?

These were my settings. enter image description here

Ishara Amarasekera
  • 1,387
  • 1
  • 20
  • 34

3 Answers3

1

There should be no issues introduced when compiling with a higher version, it is even encouraged to do so. You can find more on that topic in this Medium article.

I would also like to bring your attention to the following blog, which contains some important information regarding SDK targeting in the near future.

Unfortunately I do not use Eclipse so I fear cannot provide any verified insight on that matter. However the suggestions I have found so far include:

  • Cleaning the project
  • Getting rid of characters such as ö,ë, etc.
  • Deleting the file and recreating it

The manifest issue was probably due to creating a project with the same name over and over again. However clean -> build the project helped me get rid of it.

Yeah. Android compile version can be higher than the target version. Android compile version and target version do not have to be the same.

Ishara Amarasekera
  • 1,387
  • 1
  • 20
  • 34
0

compileSdkVersion
The compileSdkVersion is the version of the API the app is compiled against. This means you can use Android API features included in that version of the API (as well as all previous versions, obviously). If you try and use API 16 features but set compileSdkVersion to 15, you will get a compilation error. If you set compileSdkVersion to 16 you can still run the app on a API 15 device as long as your app's execution paths do not attempt to invoke any APIs specific to API 16.

targetSdkVersion
The targetSdkVersion has nothing to do with how your app is compiled or what APIs you can utilize. The targetSdkVersion is supposed to indicate that you have tested your app on (presumably up to and including) the version you specify. This is more like a certification or sign off you are giving the Android OS as a hint to how it should handle your app in terms of OS features.

As for the manifest error, you could try (if you are using android studio) clicking File > Invalidate Caches / Restart or force a gradle sync

Loz
  • 41
  • 6
  • I am using Eclipse.I got rid of the error but the application crashes. It is just a blank application. I think it is caused due to a discrepancy in the SDK versions. – Ishara Amarasekera Apr 01 '18 at 21:09
  • Ideally you would set target & min SDK to 14 or the Lowest API you want to deploy to – Loz Apr 01 '18 at 21:32
0

Thank you for your answers.

I think the manifest issue was due to creating a project with the same name over and over again. However clean -> build the project helped me get rid of it.

Yeah. Android compile version can be higher than the target version. Those two do not have to be the same.

Ishara Amarasekera
  • 1,387
  • 1
  • 20
  • 34