GCM : java.lang.noclassdeffounderror: com.google.android.gcm.GCMRegistrar

前端 未结 10 984
深忆病人
深忆病人 2020-12-29 06:50

I am trying to register a device onto GCM using the following code:

    public void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceSta         


        
10条回答
  •  时光说笑
    2020-12-29 07:31

    My gcm.jar was already in libs, so it wasn't a folder naming issue for me..

    I had to go to Right Click > Build Path > Configure Build path... for the project in question and I removed the following:

    • Any lingering files outside of a folder/bundle
    • Android Private Libraries
    • Any bundles with the word 'reference' in them (you may not have one)

    You might get a lot of "errors" in your project so restart Eclipse and let it clean. Once it cleans you'll have no errors. Run your project and viola.

    Thanks to DLew for this answer.

提交回复
热议问题