English 中文(简体)
• 如何通过代谢法检索品牌和模型信息?
原标题:How to retrieve brand and model info by code on Android?

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. 我如何设法查阅:

String model = Build.MODEL;

我总是这样例外:

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

我无法发现任何需要特别安全许可的动因。

没有人会 go?

最佳回答

http://www.ohchr.org。 您不能从该公共静态数据成员获取<代码>VerificationError。 在<代码>Build上,有两条新版本(例如CPU_ABI),因此,如果你试图在旧装置/组件上查阅,将给你<代码>VerificationError——文件显示,在其中采用了各种数据成员的APIC级。

问题回答

暂无回答




相关问题
handling exceptions IN Action Filters

Is there a better way to handle exceptions that occur inside an Action Filter itself in ASP .NET MVC? There re 2 ways I can think of at the moment. Using a try catch and setting the HTTP Status ...

既可捕获,又可举出例外。

我有一种办法,可以进入亚洲开发银行,因此,我国的亚行在多瑙河航道中的所有 st子都位于一个试捕区。 它正在追捕Kexception

Cross compiler exception handling - Can it be done safely?

I am doing some maintenance on a C++ windows dll library that is required to work with different VC++ compilers (as I don’t want to address different mangling schemes). I have already eliminated any ...

File Handling Issue

I am developing a tool in c#, at one instance I start writing into a xml file continuously using my tool,when i suddenly restart my machine the particular xml file gets corrupted, what is the reason ...

Watch a memory location/install data breakpoint from code?

We have a memory overwrite problem. At some point, during the course of our program, a memory location is being overwritten and causing our program to crash. the problem happens only in release mode. ...

Unit Test for Exceptions Message

Is there a simple (Attribute-driven) way to have the following test fail on the message of the exception. [TestMethod()] [ExpectedException(typeof(ArgumentException))] public void ExceptionTestTest() ...

热门标签