5

नहीं मिल सका मैं पूरी सफलता के साथ एक SupportMapFragment का उपयोग कर रहा हूं। मुझे कोई समस्या नहीं है।एंड्रॉइड मैपफ्रैगमेंट रनटाइम त्रुटि - कक्षा 'maps.j.k'

हालांकि मुझे अपने ऐप के रनटाइम के दौरान कोई त्रुटि मिल रही है। मैं एक जिंजरब्रेड फोन पर चल रहा हूं और इसमें नवीनतम Google Play है। यह भी ध्यान रखें कि मैं प्री-हनीकॉम को पूरा करने के लिए SupportMapFragment और अन्य समर्थन वर्गों का उपयोग कर रहा हूं।

Could not find class 'maps.j.k', referenced from method maps.y.ae.a` 

त्रुटि जैसे ही मैं अपना विचार बढ़ाता हूं।

inflater.inflate(R.layout.fragment_map, container, false); 

मेरे लेआउट फ़ाइल (fragment_map.xml):

<fragment 
    xmlns:android="http://schemas.android.com/apk/res/android" 
    xmlns:map="http://schemas.android.com/apk/res-auto" 
    android:id="@+id/map" 
    android:name="com.google.android.gms.maps.SupportMapFragment" 
    android:layout_width="match_parent" 
    android:layout_height="wrap_content" 
    android:layout_weight="1" /> 

स्टैक ट्रेस (त्रुटि के समय):

Thread [<1> main] (Suspended) 
<VM does not provide monitor information> 
PhoneLayoutInflater(LayoutInflater).inflate(int, ViewGroup, boolean) line: 322 
MapsFragment.onCreateView(LayoutInflater, ViewGroup, Bundle) line: 90 
MapsFragment(Fragment).performCreateView(LayoutInflater, ViewGroup, Bundle) line: 1460 
FragmentManagerImpl.moveToState(Fragment, int, int, int, boolean) line: 911 
FragmentManagerImpl.moveToState(int, int, int, boolean) line: 1088 
BackStackRecord.run() line: 682 
FragmentManagerImpl.execPendingActions() line: 1444 
FragmentManagerImpl$1.run() line: 429 
FragmentActivity$1(Handler).handleCallback(Message) line: 587 
FragmentActivity$1(Handler).dispatchMessage(Message) line: 92 
Looper.loop() line: 150 
ActivityThread.main(String[]) line: 4277  
Method.invokeNative(Object, Object[], Class, Class[], Class, int, boolean) line: not available [native method] 
Method.invoke(Object, Object...) line: 507 
ZygoteInit$MethodAndArgsCaller.run() line: 839 
ZygoteInit.main(String[]) line: 597 
NativeStart.main(String[]) line: not available [native method] 

मेरे टुकड़ा वर्ग (शामिल SupportMapFragment)

@Override 
public View onCreateView(LayoutInflater inflater, ViewGroup container, 
    Bundle savedInstanceState) { 
    super.onCreateView(inflater, container, savedInstanceState); 

    View v = inflater.inflate(R.layout.fragment_maps, container, false); 
    return v; 
} 

मेरे पास है here वर्णित मेरे मैनिफेस्ट में सभी आवश्यक अनुमतियां।

यह कोई समस्या नहीं पैदा कर रहा है, लेकिन मैं इसका क्या अर्थ है इसके बारे में उत्सुक हूं। मैं कोई जवाब

+3

प्रोगुआर्ड समस्या हो सकती है - आप कोड को खराब कर सकते हैं। –

+0

हम्म, लेकिन मेरे प्रोजेक्ट में। प्रॉपर्टीज में मेरे पास # proguard.config = है ... टिप्पणी की गई। इसका मतलब यह नहीं है कि यह अक्षम है? –

+0

इसका मतलब यह होना चाहिए कि यह अक्षम, रोचक मुद्दा है। –

उत्तर

0

यहाँ गूगल मैप्स एपीआई V2 पर एक त्वरित आरंभ गाइड समर्थन टुकड़ा https://docs.google.com/document/pub?id=19nQzvKP-CVLd7_VrpwnHfl-AE9fjbJySowONZZtNHzw

का उपयोग कर इस मुसीबत शूटिंग Unable instantiate android.gms.maps.MapFragment

आशा है कि ये मदद करता है के लिए आपकी मदद कर सकते है नहीं मिली है। :-)

0
android:name="com.google.android.gms.maps.SupportMapFragment" 

आप SupportMapfragment अधिभावी और, अपने स्वयं के टुकड़ा वर्ग बनाने क्यों आप अपनी गतिविधि एक्सएमएल में android:name="com.google.android.gms.maps.SupportMapFragment" का उपयोग कर रहे हैं, तो

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

कोई भाग्य मैं डरता हूँ। मैंने यह भी देखा है कि नक्शा लोड होने पर पहली बार ऐसा होता है। यदि आप ऐप को कम करते हैं या गतिविधियों को बदलते हैं तो मानचित्र पर वापस जाएं त्रुटि को उठाया नहीं जाता है। –

0

के साथ बदलें।

इसके बजाय com.your.package.your.supportmapfragment का उपयोग करें। आपको class="com.google.android.gms.maps.SupportMapFragment"