views:

45

answers:

1

There is an class android.os.Build that got static variables cointaining device info, but when i try to access it I allways get a runtime exception.

E.x on how I try to access it:

String model = Build.MODEL;

I always get an Exception like this:

04-14 14:57:45.266: ERROR/AndroidRuntime(770): java.lang.VerifyError: com.mypackage.Main

I cant find any info about needing any special security permission on this.

Anyone got a clue?

+4  A: 

Build.MODEL has been there since the beginning. You should not get a VerifyError from accessing that public static data member. There are a couple of ones on Build that are newer (e.g., CPU_ABI) and therefore will give you a VerifyError if you are trying to access them on older devices/emulators -- the documentation indicates in which API levels the various data members were introduced.

CommonsWare
Perfect! Thanks alot. I was trying to print out all on an HTC Hero....
PHP_Jedi