1

I'm designing an android app with a minimum SDK version of 8. I have currently been testing it on a emulator running an about 4 inch phone...

I recently got a Nexus 7 and ran it on that. I thought it would just enlarge the screen (button and text including) so it was basically magnified... it wasn't

I thoroughly googled it and came up with using different layout sizes (I am using Eclipse by the way) so I made a 'layout-large' folder but I got the following error and no design view of the screen layout would show

'It looks like you are using a render target where the layout library does not support the tvdpi density.

Please try either updating to the latest available version (using the SDK manager), or if no updated version is available for this specific version of Android, try using a more recent render target version.

Exception raised during rendering: Index: 2, Size: 2
Exception details are logged in Window > Show View > Error Log'

How can I solve this? I don't want to change the minimum SDK from 8

E-Riz
  • 31,431
  • 9
  • 97
  • 134
Ryaller
  • 77
  • 3
  • 12
  • could you post, just as example, one of the layouts you said that works fine on a 4inch but doesn't on the Nexus 7? – Budius Jan 14 '13 at 15:29
  • ps.: to change the render target, on the layout editor at the top right there's a little green android with a number, just change that to the maximum and it should render properly. – Budius Jan 14 '13 at 15:31

2 Answers2

5

The tvdpi seems to have been implemented in Android 3.2 (meaning SDK level 13). If you want to target the Nexus 7 displays, with alternate resources, I suggest targeting large screens instead of tvdpi. You shouldn't have to change your minimum requirement of SDK level 8 as it doesn't make sense to target TV densities when aiming for Nexus 7, but maybe that's just me.

There is another similar question here on Stackoverflow with a great answer: How to create different layout for Galaxy S3 and Nexus 7?

Also visit the Android developers design guidelines and specifically Designing for Multiple Screens for more information. The Android guidlines is a very good website that I use consistently.

Community
  • 1
  • 1
Niklas Ekman
  • 943
  • 1
  • 9
  • 26
0

First thing first, there is great information at developer.android.com about programming for different screen sizes. Fragments are great for this. Did you get rid of the 'layout' folder. It sounds from your question you just renamed the layout folder. I would start by reading at a lot at the Android developer information center. Check the first link.

juicebyjustin
  • 434
  • 7
  • 16