android : java.lang.NoClassDefFoundError: com.google.android.gms.R$styleable

后端 未结 3 478
醉酒成梦
醉酒成梦 2020-12-04 02:27

My activity code

package com.example.testmap;

import android.os.Bundle;
import android.support.v4.app.FragmentActivity;
import android.view.Menu;
import com         


        
相关标签:
3条回答
  • 2020-12-04 02:49

    1. Try to remove this line:

    class="com.google.android.gms.maps.SupportMapFragment"
    

    from the fragment in the XML file, it shouldn't be there.

    2. Change this permission:

    <permission
    android:name="android.os.Bundle.permission.MAPS_RECEIVE"
    android:protectionLevel="signature" />
    

    to this:

    <permission
    android:name="com.example.mapdemo.permission.MAPS_RECEIVE"
    android:protectionLevel="signature" />
    

    if com.example.mapdemo is your project package. if not change it to your project package in this permission and this:

    <uses-permission android:name="com.example.mapdemo.permission.MAPS_RECEIVE" />
    
    0 讨论(0)
  • 2020-12-04 02:51

    Have you copied google-play-services.jar instead of linking to google-play-services_lib project?

    Follow this carefully: https://developers.google.com/maps/documentation/android/start

    0 讨论(0)
  • 2020-12-04 03:11

    try importing the project from android sdk: /extras/google/google_play_services_libproject/google_play_services_lib into your workspace whithout add anyone lib in folder /lib at your app.

    after do this, add them in your: project>properties>android>libs add

    0 讨论(0)
提交回复
热议问题