blackberry 出现 module xxx' has verification error 问题解决办法 -欧洲杯足彩官网

`
wuhua
  • 浏览: 2090681 次
  • 性别:
  • 来自: 广州
博主相关
  • 博客
  • 微博
  • 相册
  • 收藏
  • 社区版块
    • ( 84)
    • ( 634)
    • ( 15)
    存档分类
    最新评论

    blackberry 出现 module xxx' has verification error 问题解决办法

    如果是midlet请看官方的解释:

     

    我使用的不是midlet同样出现了问题,

     

    http://supportforums.blackberry.com/t5/java-development/verification-error-1756/td-p/125387

     

    那么引起verification error的原因是使用了xxx.class代码,

    比如:

     

     

    java代码  
    1. eventmanager.registerlistener(new eventtypefilter(thisnew class[]{  
    2.      myeventobject.class  
    3. }));  

     

     

    上面的代码就不行,虽然rim api说支持,但依然出现了问题,改写成下面的:

     

     

    java代码  
    1. eventmanager.registerlistener(new eventtypefilter(thisnew class[]{  
    2.     new myeventobject().getclass()  
    3. }));  

     就可以了。

     

    另外还有其他的的原因,我从csdn转来的,保存一下吧。

     

     

     

     

    when developing java applications for the blackberry smartphone, you may encounter any of the following verification errors or errors similar to the following:

    • verification error 3141
    • module 'mymidlet' has verification error (<###>) at offset <###>.
    • error starting mymidlet: module 'mymidlet' has verification error (<####>) at offset <###>."

    these errors often occur when creating midlets. they are inherently hard to debug because the same error message can apply to a number of problems.

    the following is a list of possible solutions to prevent or correct verification errors:

    1. if you started by building a java archive (jar) file and then used the rim application program compiler (rapc) to create .cod files, make sure you turn obfuscation off when building the jar file. the rapc compiler performs its own obfuscation and issues may occur if the code is already obfuscated.
    2. remove any system.out.* calls. these generally do nothing on the blackberry smartphone, but they might cause verification errors.
    3. remove unused import statements.
    4. explicitly specify the access for each function or variable. for example, make sure each one is specified as public , private , or protected .
    5. if you are working with a midlet, make sure the midlet class is declared as public .
    6. verification errors may occur if the cod file is corrupted or if it was not signed correctly. make sure that you perform a clean rebuild and that you re-sign your application. reinstall the application on the blackberry smartphone.
    7. comment out any non-executable code. verification errors might be related to the size of the main code file and the library files. if you comment out non-executable code, the file sizes change, which may correct the problem.
    8. if you have created any classes that inherit from rim classes, change the name of any custom methods and members that you created in those classes. this makes sure that you have not named any methods or members of the same name in the internal rim classes.
    9. if your application is using blackberry® device software 3.8 or later, verification errors occur when an application that implements the javax.microedition.rms.recordstore class is compiled using blackberry® java® development environment (blackberry jde) earlier than version 4.0. this occurs if the application uses either the addrecordlistener or removerecordlistener methods of the recordstore class. to resolve this issue, recompile the application using blackberry jde 4.0 or later.
    10. there is a problem with how the blackberry® java® virtual machine (blackberry jvm) handles the referencing of a class directly within the constructor of another class. the following is an example:
    11. class1 class1= new class1(class2.class.getname());

      to work around this issue, do not make the class call within a constructor as shown in the following example:

      class1 class1;
      string classname = class2.class.getname();
      class1 = new class1(classname);

    12. remove references to a static instance variable from an inner class. for example, the following code example could cause an error:
    13. public class myouterclass {
          static int var;
          class myinnerclass {
              public void dosomething() {
                  var = 7;
              }
          }
      }

      there are a few ways you can remove these references, such as creating get/set methods for var in the outer class or modifying the logic to pull myinnerclass out of myouterclass .

    14. the build procedure normally compiles from the java source file with the javac command, and then runs preverify.exe file and then rapc. add the following command line arguments to javac to help avoid issues in earlier versions of the rapc:
    15. javac.exe -source 1.3 -target 1.1

    16. some methods that are very long can cause verification errors. by breaking these methods into helper methods, you can reduce the likelihood of verification errors.
    17. although not as likely, some very long method definitions (with 10 or more parameters), and some very long constant definitions (long package structure and/or long names) can also cause verification errors.
    一般情况下将引用的jar包从build path里面remove,然后再重新add就可以了。

     

     

     

    分享到:
    评论

    相关推荐

      verification by error modeling

      主要介绍了jenkins host key verification failed问题解决,文中通过示例代码介绍的非常详细,对大家的学习或者工作具有一定的参考学习价值,需要的朋友可以参考下

      jenkins发版报错host key verification failed. jenkins发版报错host key verification failed. jenkins发版报错host key verification failed. jenkins发版报错host key verification failed. jenkins发版报错host ...

      verification with c

      system_verification_using_soundcheck

      新页面叫verification.html,在头部新加了一个链接入口。banner也改了一下。你看看

      hardware design verification simulation

      systemverilog for verification 2nd

      ansys workbench verification manual

      writting testbench verification plan,下载前请注意,自己翻译的,英语水平一般啊。

      basic of layout verification

      ansys mechanical apdl verification manual

      system verilog for verification

      关于verification plan的认识,如何写的总结,尚不完善,以后有空补充更新。

      formal verification in english

      实现:6位随机字符串,包括数字、大小写字母,颜色随机;随机干扰线条和小圆点;...判断验证码输入是否正确;区分字母大小写(感兴趣的可以加上不区分的功能)。可以加公众号【几行简码】(id:few_codes)免费下载。

      cluster verification utility (cvu) 是一个随 oracle grid infrastructure/oracle clusterware 发布的实用程序。开发此实用程序是为了帮助进行 oracle clusterware 和 oracle real application clusters (rac) 的...

      open verification methodology cookbook,ovm开发手册。

      standardized functional verification

      toward the verification of persive systems. you can find this paper is on a project supervisized by professor mark ryan atl. it is on the issue of verification of protocols.

    global site tag (gtag.js) - google analytics
    网站地图