看板 AndroidDev 關於我們 聯絡資訊
大家好,最近上架了一個程式,今天看到一個 ANR 指出: java.lang.ClassNotFoundException: tw.darkk6.myapp.AppService 看到有點傻眼,明明就有這個 Class 在,而且也在 AndroidManifest 中 有宣告,居然會跑出 ClassNotFound.... 不過這個 Class 會需要用到手機韌體上廠商的 Lib 是在猜想會不會和這個有關,底下把相關的部分列出: AndroidManifest.xml <uses-permission android:name="com.a.b.permission.QQ" /> <!-- 底下的在 application 中 --> <uses-library android:name="com.a.b.framework" android:required="false" /> <service android:name="AppService"> <intent-filter> <action android:name="com.a.b.TheApplication" /> <action android:name="com.a.b.intent.action.MAIN" /> <category android:name="com.a.b.intent.category.LAUNCHER" /> </intent-filter> </service> 想請問的是,有沒有可能在哪種情況下,如: 手機系統韌體中並沒有 com.a.b.permission.QQ 這個權限 或者沒有 com.a.b.framework 這個 lib ? 會發生這種 ClassNotFound 的例外... 因為 AppServic 是 extends com.a.b.framework 中的某個 Class 所以想說,如果是沒有這個 Lib , 那錯誤應該也是 com.a.b.framework 的那個 class not found , 而不是寫我的 class not found 吧... 想請問有沒有人遇過這個問題~ 謝謝 -- ※ 發信站: 批踢踢實業坊(ptt.cc) ◆ From: 36.238.223.73