1.å¦ä½å¶ä½Jarå
并å¨androidä¸è°ç¨jarå
2.androidç³»ç»ç¼è¯jarå
ç»app使ç¨
å¦ä½å¶ä½Jarå 并å¨androidä¸è°ç¨jarå
æ°å»ºandroidå·¥ç¨ï¼ç¶åå³å»ï¼ç¹å»å¯¼åºï¼éæ©å¯¼åºç±»å为Javaä¸çJAR fileï¼å¨java file specification ä¸ä¸è¦éæ©androidmanifest.xmlåresæ件夹ï¼å°±å¯ä»¥äºã
å¦åå¨è°ç¨jarå çæ¶åä¼åºç°âError generating final archive: Found duplicate file for APK: AndroidManifesâè¿ä¸ªé误ã
è°ç¨jarå 大åå°å¼ç两个æ¹æ³ï¼
æ¹æ³ä¸ï¼
å¦æå¨androidç¨è°ç¨jarå ï¼éè¦å¨å·¥ç¨çå±æ§çJava build pathä¸ç¹å»Add external JARSï¼ä¹å¯ä»¥éæ©Add Libraryï¼æ·»å jarå ï¼å¨ç¨åºä¸è°ç¨è°ç¨jarå ä¸çå½æ°å³å¯ã
æ¹æ³äºï¼
Android项ç®å¸¸å¸¸éè¦å¼ç¨èªå®ä¹çæè å¤é¨çjarå ï¼è¿éæä¾ä¸äºç»éªï¼ä¾åèã
1. é常æ åµä¸ï¼ç´æ¥å°jarå copyå¨Eclipseå·¥ç¨ä¸çlibsç®å½ä¸ï¼å°±å¯ä»¥äºï¼Eclipseå°±ä¼èªå¨å¼ç¨è¿æ¥ï¼ä»£ç ä¸æ红åçå°æ¹ä¹å°±ä¼æ¶å¤±äºã
2. æ¥çbuild pathä¸order and exportä¸çprivate LibariesåDependenciesæ¯å¦å¾éï¼æ£ç¡®çåæ³æ¯å¾éã
åcleanæ´ä¸ªå·¥ç¨ï¼åè¿è¡å¯å¦ã
3. ä½ çjaræä»¶å¿ é¡»ä¹æ¯ç±Androidå·¥ç¨å建çï¼å¦åï¼ä¼åçâ"java.lang.NoClassDefFoundErrorâçé误ï¼ä¸é¢æ¯ä¸ä¸ªé误ï¼
- ::.: E/dalvikvm(): Could not find class
'com.example.test4androidjar2.Jar4Android',包源mt4 源码 referenced from method
com.example.filemanagertest4android.MainActivity$1.onClick
4. ä½ çjarå å¿ é¡»æ¯å¨Androidä¸é¢ç¼è¾åç¼è¯ï¼æå ï¼ä¸è½å¨javaä¸è¿è¡æå ã
androidç³»ç»ç¼è¯jarå ç»app使ç¨
æè¿å¨android Oç¼è¯ç³»ç»jarå ç»åºç¨ä½¿ç¨éå°äºç¹é®é¢ï¼ç½ä¸ä¹æ²¡ææ¾å°è§£å³æ¹æ¡ï¼è¿éè®°å½ä¸ã
ç¼è¯æ¹æ³åèç½ä¸å客就å¯ä»¥ï¼ androidæºç ç¼è¯jarå
æç»çæäºjavalib.jarï¼æ¹å为 tvManager.jarå³å¯ã注æï¼å¦æ没ææå®LACAL_JACK_ENABLEDé项ï¼åé»è®¤æ¯enabledï¼å°ä¼çæclasses.jackæ件ï¼ä¸ä¼äº§çclasses.jarå ï¼
æ£å¸¸æç §ä¸é¢æ¹æ¡å°±å¯ä»¥ç¼è¯åºjarå ï¼å¯¼å ¥å°ASéé¢å°±å¯ä»¥ä½¿ç¨ï¼ä¸é¢è¯´ä¸æéå°çé®é¢
éå°classes.jar.toc被ä¾èµï¼ ä½æ¯æä¹ç¼è¯é½æ²¡æç¼è¯åºæ¥ï¼ç½ä¸ä¹æ²¡ææ¾å°å¯¹åºçæ¹æ³ï¼ç¼è¯é误å¦ä¸:
blogs.com/wangqiang9/p/.html
/questions//how-to-generate-classes-dex-toc-files