Custom ImageViews disappearing when changing from SDK 8 to 7

Go To StackoverFlow.com

0

I have been creating an app for Android SDK 8 and it works fine. Since most users are using SDK 7 and above I tried to switch to SDK 7, but then my custom ImageViews disappear from my RelativeLayout. The app does not chrash. Is this likely happening because I am using some of the framework from SDK 8? If so: is there an easy way to find out which part of my code that makes use of SDK 8 (i.e. not checking the API level of each and every method against the developer docs)?

There is really too much code to post it here. My manifest file includes

<uses-sdk   android:minSdkVersion="7"
            android:targetSdkVersion="7">

and my project.properties file has the line

target=android-7

Until now they used to be 8, but I changed them all to 7.

2012-04-05 17:20
by Krøllebølle
Are you using eclipse - Squonk 2012-04-05 17:33
Please post source. 'Too much' is better than 'none' - Jason Robinson 2012-04-05 17:35
better if you post your code and xml file and manifeast fil - Shankar Agarwal 2012-04-05 17:37
Your manifest is targeting api level 7 but make sure you are building against api level 7 as well. If you make the change to build against api level 7 you should see compile errors for anything that is not compatible with api level 7 - Bobbake4 2012-04-05 17:38
Yes, I am using Eclipse. I'll look into some code extracts - Krøllebølle 2012-04-05 17:39


0

Not sure if that's your issue, but to answer the general question of finding which APIs you're using that are above the minimum API version:

Update to the newest version of the Android Developer tools, and from the command line, run lint from the root folder of your project. Among other things, it checks for "API accesses to APIs that are not supported in all targeted API".

Helpful resources:

Developer tools page for lint
Complete list of Lint checks

2012-04-05 18:15
by Alexander Lucas
Thanks, this is exactly what I was looking for. It seems that I use methods only up until API 4 which suggests that I am doing something else wrong. Have to look into that in another way then - Krøllebølle 2012-04-08 09:42
Ads