AndroidÏîÄ¿ÀïÈçºÎ»ìÏý×Ô¼º´òµÄjar°ü»òÕß±ÜÃâ±»·´±àÒ룿

ÒѾٱ¨ »Ø´ð
AndroidÏîÄ¿ÀïÈçºÎ»ìÏý×Ô¼º´òµÄjar°ü»òÕß±ÜÃâ±»·´±àÒ룿
ÎÊÔÚÏß¿Í·þ
ɨÂëÎÊÔÚÏß¿Í·þ

Ä¿Ç°ÔÚAndroidÏîÄ¿ÀïÏë´ò°üÒ»¸ö¹¦ÄÜÀàµÄjar°ü¹©µÚÈý·½ÈËԱʹÓ㬵«ÊÇÖ±½ÓÓÃeclipseÀïµÄExport´ò°üºÃÏñ²»Ì«°²È«£¬²»Ïë±»µÚÈý·½ÈËÔ±·´±àÒë¿´¼û´úÂ룬ÇëÎʸßÈË... ²é¿´È«²¿

  • »Ø´ðÊý

    4

  • ä¯ÀÀÊý

    5,121

4¸ö»Ø´ð ĬÈÏÅÅÐò
  • ĬÈÏÅÅÐò
  • °´Ê±¼äÅÅÐò

ÒѲÉÄÉ
»ìÏýAPKÎļþµÄÔ­ÒòÊǶ෽ÃæµÄ¡£Ê×ÏÈ£¬´úÂëÐèÒª±àÒë³ÉclassÎļþ£¬²¢½«jar°ü´ò°ü¡£Æä´Î£¬¸Ãjar°üÐèÒª½øÐлìÏý´¦ÀíÒÔ±£»¤ÆäÄÚ²¿½á¹¹¡£È»ºó£¬Ê¹ÓÃjar°üÉú³Éclasses.dexÎļþ£¬²¢½«resources.apkºÍÇ©ÃûÎļþÌí¼Óµ½ÆäÖС£×îºó£¬½«Éú³ÉµÄapkÎļþ½øÐÐÇ©Ãû¡£ÕâЩ²½Öè¿ÉÒÔͨ¹ýÅú´¦ÀíµÈ·½Ê½ÊµÏÖ£¬µ«¾ßÌåʵÏÖ·½Ê½È¡¾öÓÚËùʹÓõŤ¾ßºÍ·½·¨¡£
È¡Ïû ÆÀÂÛ
ÄãÕâ¸öÎÊÌâ½â¾öÁËÂð£¿
ÎÒÒ²Åöµ½ÕâÖÖÇé¿ö¡£
Ò»Ìí¼Ó°ü¾Í»á³öÏÖ̾ºÅ¡£
°´ÕÕ¥ϸøµÄ½âÊÍÊDz»Ðеġ£
È¡Ïû ÆÀÂÛ
ÓÒ¼üÏîÄ¿Ãû³Æ BuildPath --- Configure Build Paht...ÖУ¬È»ºóÉÏÃæÓм¸¸öÑ¡ÏÕÒµ½ LibrariesÖгöÏÖºìÉ«²æºÅµÄ°üΪ·¾¶´íÎóµÄ°ü¡£µ½classpathÖÐÐÞ¸ÄÏàÓ¦°üµÄµ±Ç°Â·¾¶¡£È»ºó»Øµ½eclipseÖÐF5ˢй¤³Ì¡£
È¡Ïû ÆÀÂÛ
Ó¦ÓÃÄÚ²¿×Ô¼ºÐ´ClassLoader£¬ÊÔÊÔ¿´£º
ClassLoader loaderA = new MyClassLoader(libPathOne);
ClassLoader loaderB = new MyClassLoader(libPathTwo);
Object1 obj1 = loaderA.loadClass(first.class.binary.name, true)
Object2 obj2 = loaderB.loadClass(second.class.binary.name, true);

¾ßÌå¿ÉÒԲο¼StackOverflow£º
http://stackoverflow.com/questions/6105124/java-classpath-classloading-multiple-versions-of-the-same-jar-project
È¡Ïû ÆÀÂÛ
ZOLÎÊ´ð > ÊÖ»ú > ÆäËû·ÖÀà > AndroidÏîÄ¿ÀïÈçºÎ»ìÏý×Ô¼º´òµÄjar°ü»òÕß±ÜÃâ±»·´±àÒ룿

¾Ù±¨

¸ÐлÄúΪÉçÇøµÄºÍг¹±Ï×Á¦Á¿ÇëÑ¡Ôñ¾Ù±¨ÀàÐÍ

¾Ù±¨³É¹¦

¾­¹ýºËʵºó½«»á×ö³ö´¦Àí
¸ÐлÄúΪÉçÇøºÍг×ö³ö¹±Ï×

ɨÂë²ÎÓëÐÂÆ·0ÔªÊÔÓÃ
ɹµ¥¡¢¶¥Â¥ºÀÀñµÈÄãÄÃ

ɨһɨ£¬¹Ø×¢ÎÒÃÇ
Ìáʾ

È·¶¨ÒªÈ¡Ïû´Ë´Î±¨Ãû£¬Í˳ö¸Ã»î¶¯£¿