2014-10-01 59 views
-2

我想在eclipse中整合admob for android。 我跟着從 here集成admob android在android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:689)

指示,但我現在我還是堅持了運行時錯誤 在android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:689)

這是我的logcat

確定給予唯一的ID後,這是現在的logcat是

10-02 02:44:13.855: E/AndroidRuntime(1457): Caused by: java.lang.ClassNotFoundException: Didn't find class "com.skylite.ghanalivetv.Splash$PlaceholderFragment" on path: DexPathList[[zip file "/data/app/com.skylite.ghanalivetv-1.apk"],nativeLibraryDirectories=[/data/app-lib/com.skylite.ghanalivetv-1, /system/lib]] 

能否請你告訴我該怎麼解決呢

+0

您意外刪除了您的鏈接。 – Alex 2014-10-01 06:41:06

+0

你也可以發佈catlog嗎? – User12111111 2014-10-01 07:07:55

+0

交叉張貼在[Programmers.SE](http://programmers.stackexchange.com/questions/257779/integrating-admob-to-android-at-android-view-layoutinflater-createviewfromtagla)它可笑地脫離主題,但目前仍然有代碼鏈接。 – GlenH7 2014-10-01 18:00:04

回答

1

你真的需要學習如何讀取日誌文件,因爲日誌中的錯誤非常明顯。

看來你的類(PlaceholderFragment)不存在,不是公有的,缺少一個空的(默認)構造函數或它們的組合。

Caused by: android.app.Fragment$InstantiationException: Unable to instantiate fragment  com.skylite.ghanalivetv.Splash$PlaceholderFragment: make sure class name exists, is public, and has an empty constructor that is public. 

學會調試是一個必要的技能,你必須掌握當你開始開發一個應用程序,否則你將無法寫複雜(甚至簡單)的應用程序。你不能把調試外包給其他人:)。

+2

感謝以一種很好和有禮貌的方式意識到我應該做什麼:)。 – 2014-10-02 21:29:01

0

你的堆棧跟蹤爲您提供了答案:

Binary XML file line #13: Must specify unique android:id, android:tag, or have a parent with an id for com.skylite.ghanalivetv.Splash$PlaceholderFragment 

一個在佈局(在13號線)的元素有一個重複的android:ID或Android:標籤

+0

我已經設置了唯一的ID,現在上面是我的logcat的錯誤 – 2014-10-02 06:51:47