कैसे बदलें मैं मार्कर आइकन बदलने की कोशिश कर रहा हूं। मुझे एक सर्वर निर्देशिका से छवि मिलती है।एंड्रॉइड Google मैप्स एपीआई v2 - मार्कर आइकन
जब मैं "बिट" परिणाम null
हर बार ब्रेक पॉइंट डालता हूं। और जब मैं ऐप चलाता हूं तो मुझे java.lang.NullPointerException
मिलता है।
File file = new File("J:\\!!! DOCUMENTS\\!Outsourcing\\AppStore\\Benzinostancii\\Petrol\\logo.png");
Bitmap bit = BitmapFactory.decodeFile(String.valueOf(file));
double Dlat = lat.get(index);
double Dlon = lon.get(index);
String info = Arrayinfo.get(index);
String name = Arrayname.get(index);
LatLng coordinate = new LatLng(Dlat, Dlon);
map.addMarker(new MarkerOptions()
.icon(BitmapDescriptorFactory.fromBitmap(bit))
.position(coordinate)
.title(info)
).setSnippet(name);
जम्मू निर्देशिका Android डिवाइस की आंतरिक मेमोरी में है? इसे ड्रॉबल्स में क्यों नहीं डालना? –
यह जे निर्देशिका पीसी सर्वर से है और मैं इस सर्वर से छवि लोड करना चाहता हूं। –
ओह मुझे लगता है कि इस तरह से संभव नहीं है। आप पहले सर्वर से छवि को डाउनलोड करना चाहते हैं, फिर इसका इस्तेमाल करें। –