{"action":"created","issue":{"url":"https://api.github.com/repos/yandexmobile/yandexmapkit-android/issues/217","repository_url":"https://api.github.com/repos/yandexmobile/yandexmapkit-android","labels_url":"https://api.github.com/repos/yandexmobile/yandexmapkit-android/issues/217/labels{/name}","comments_url":"https://api.github.com/repos/yandexmobile/yandexmapkit-android/issues/217/comments","events_url":"https://api.github.com/repos/yandexmobile/yandexmapkit-android/issues/217/events","html_url":"https://github.com/yandexmobile/yandexmapkit-android/issues/217","id":151573204,"number":217,"title":"android.view.InflateException: Binary XML file line #10: Error inflating class ru.yandex.yandexmapkit.MapView","user":{"login":"crescent7272","id":4727982,"avatar_url":"https://avatars.githubusercontent.com/u/4727982?v=3","gravatar_id":"","url":"https://api.github.com/users/crescent7272","html_url":"https://github.com/crescent7272","followers_url":"https://api.github.com/users/crescent7272/followers","following_url":"https://api.github.com/users/crescent7272/following{/other_user}","gists_url":"https://api.github.com/users/crescent7272/gists{/gist_id}","starred_url":"https://api.github.com/users/crescent7272/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/crescent7272/subscriptions","organizations_url":"https://api.github.com/users/crescent7272/orgs","repos_url":"https://api.github.com/users/crescent7272/repos","events_url":"https://api.github.com/users/crescent7272/events{/privacy}","received_events_url":"https://api.github.com/users/crescent7272/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":4,"created_at":"2016-04-28T08:00:57Z","updated_at":"2016-05-06T08:08:01Z","closed_at":"2016-05-06T08:08:01Z","body":"Hi,\r\n\r\nI have used this yandex map in my previous android application. But now the same code does not work. Probably I am missing something but I cant find where it is. Any help would be greately appreciated. This is error lines:\r\n\r\n\r\n`FATAL EXCEPTION: main\r\n                                                                            java.lang.RuntimeException: Unable to start activity ComponentInfo{gcm.b4deploy.com.zimmetler/gcm.b4deploy.com.zimmetler.PersonMap.myapplication.Map.YandexMap}: android.view.InflateException: Binary XML file line #10: Error inflating class ru.yandex.yandexmapkit.MapView\r\n                                                                                at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2234)\r\n                                                                                at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2261)\r\n                                                                                at android.app.ActivityThread.access$600(ActivityThread.java:181)\r\n                                                                                at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1332)\r\n                                                                                at android.os.Handler.dispatchMessage(Handler.java:99)\r\n                                                                                at android.os.Looper.loop(Looper.java:153)\r\n                                                                                at android.app.ActivityThread.main(ActivityThread.java:5037)\r\n                                                                                at java.lang.reflect.Method.invokeNative(Native Method)\r\n                                                                                at java.lang.reflect.Method.invoke(Method.java:511)\r\n                                                                                at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:821)\r\n                                                                                at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:584)\r\n                                                                                at dalvik.system.NativeStart.main(Native Method)\r\n                                                                             Caused by: android.view.InflateException: Binary XML file line #10: Error inflating class ru.yandex.yandexmapkit.MapView\r\n                                                                                at android.view.LayoutInflater.createView(LayoutInflater.java:613)\r\n                                                                                at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:687)\r\n                                                                                at android.view.LayoutInflater.rInflate(LayoutInflater.java:746)\r\n                                                                                at android.view.LayoutInflater.inflate(LayoutInflater.java:489)\r\n                                                                                at android.view.LayoutInflater.inflate(LayoutInflater.java:396)\r\n                                                                                at android.view.LayoutInflater.inflate(LayoutInflater.java:352)\r\n                                                                                at android.support.v7.app.AppCompatDelegateImplV7.setContentView(AppCompatDelegateImplV7.java:276)\r\n                                                                                at android.support.v7.app.AppCompatActivity.setContentView(AppCompatActivity.java:139)\r\n                                                                                at gcm.b4deploy.com.zimmetler.PersonMap.myapplication.Map.YandexMap.onCreate(YandexMap.java:38)\r\n                                                                                at android.app.Activity.performCreate(Activity.java:5020)\r\n                                                                                at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1080)\r\n                                                                                at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2198)\r\n                                                                                at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2261) \r\n                                                                                at android.app.ActivityThread.access$600(ActivityThread.java:181) \r\n                                                                                at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1332) \r\n                                                                                at android.os.Handler.dispatchMessage(Handler.java:99) \r\n                                                                                at android.os.Looper.loop(Looper.java:153) \r\n                                                                                at android.app.ActivityThread.main(ActivityThread.java:5037) \r\n                                                                                at java.lang.reflect.Method.invokeNative(Native Method) \r\n                                                                                at java.lang.reflect.Method.invoke(Method.java:511) \r\n                                                                                at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:821) \r\n                                                                                at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:584) \r\n                                                                                at dalvik.system.NativeStart.main(Native Method) \r\n                                                                             Caused by: java.lang.reflect.InvocationTargetException\r\n                                                                                at java.lang.reflect.Constructor.constructNative(Native Method)\r\n                                                                                at java.lang.reflect.Constructor.newInstance(Constructor.java:417)\r\n                                                                                at android.view.LayoutInflater.createView(LayoutInflater.java:587)\r\n                                                                                at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:687) \r\n                                                                                at android.view.LayoutInflater.rInflate(LayoutInflater.java:746) \r\n                                                                                at android.view.LayoutInflater.inflate(LayoutInflater.java:489) \r\n                                                                                at android.view.LayoutInflater.inflate(LayoutInflater.java:396) \r\n                                                                                at android.view.LayoutInflater.inflate(LayoutInflater.java:352) \r\n                                                                                at android.support.v7.app.AppCompatDelegateImplV7.setContentView(AppCompatDelegateImplV7.java:276) \r\n                                                                                at android.support.v7.app.AppCompatActivity.setContentView(AppCompatActivity.java:139) \r\n                                                                                at gcm.b4deploy.com.zimmetler.PersonMap.myapplication.Map.YandexMap.onCreate(YandexMap.java:38) \r\n                                                                                at android.app.Activity.performCreate(Activity.java:5020) \r\n                                                                                at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1080) \r\n                                                                                at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2198) \r\n                                                                                at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2261) \r\n                                                                                at android.app.ActivityThread.access$600(ActivityThread.java:181) \r\n                                                                                at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1332) \r\n                                                                                at android.os.Handler.dispatchMessage(Handler.java:99) \r\n                                                                                at android.os.Looper.loop(Looper.java:153) \r\n                                                                                at android.app.ActivityThread.main(ActivityThread.java:5037) \r\n                                                                                at java.lang.reflect.Method.invokeNative(Native Method) \r\n                                                                                at java.lang.reflect.Method.invoke(Method.java:511) \r\n                                                                                at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:821) \r\n                                                                                at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:584) \r\n                                                                                at dalvik.system.NativeStart.main(Native Method) \r\n                                                                             Caused by: java.lang.NoClassDefFoundError: ru.yandex.yandexmapkit.MapSurfaceView\r\n                                                                                at ru.yandex.yandexmapkit.MapView.<init>(Unknown Source)\r\n                                                                                at java.lang.reflect.Constructor.constructNative(Native Method) \r\n                                                                                at java.lang.reflect.Constructor.newInstance(Constructor.java:417) \r\n                                                                                at android.view.LayoutInflater.createView(LayoutInflater.java:587) \r\n                                                                                at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:687) \r\n                                                                                at android.view.LayoutInflater.rInflate(LayoutInflater.java:746) \r\n                                                                                at android.view.LayoutInflater.inflate(LayoutInflater.java:489) \r\n                                                                                at android.view.LayoutInflater.inflate(LayoutInflater.java:396) \r\n                                                                                at android.view.LayoutInflater.inflate(LayoutInflater.java:352) \r\n                                                                                at android.support.v7.app.AppCompatDelegateImplV7.setContentView(AppCompatDelegateImplV7.java:276) \r\n                                                                                at android.support.v7.app.AppCompatActivity.setContentView(AppCompatActivity.java:139) \r\n                                                                                at gcm.b4deploy.com.zimmetler.PersonMap.myapplication.Map.YandexMap.onCreate(YandexMap.java:38) \r\n                                                                                at android.app.Activity.performCreate(Activity.java:5020) \r\n                                                                                at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1080) \r\n                                                                                at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2198) \r\n                                                                                at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2261) \r\n                                                                                at android.app.ActivityThread.access$600(ActivityThread.java:181) \r\n                                                                                at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1332) \r\n                                                                                at android.os.Handler.dispatchMessage(Handler.java:99) \r\n                                                                                at android.os.Looper.loop(Looper.java:153) \r\n                                                                                at android.app.ActivityThread.main(ActivityThread.java:5037) \r\n                                                                                at java.lang.reflect.Method.invokeNative(Native Method) \r\n                                                                                at java.lang.reflect.Method.invoke(Method.java:511) \r\n                                                                                at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:821) \r\n                                                                                at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:584) \r\n                                                                                at dalvik.system.NativeStart.main(Native Method) `\r\n\r\n\r\nThe error shows the line in my YandexMap.java activity which is:\r\n\r\n`        setContentView(R.layout.content_yandex_map); `\r\n\r\nAnd in that layout **at line 10** there is  this line : \r\n\r\n`    <ru.yandex.yandexmapkit.MapView`\r\n\r\n\r\nThese are my **permissions in android manifest**:\r\n\r\n`    <uses-permission android:name=\"android.permission.ACCESS_GPS\" />\r\n    <uses-permission android:name=\"android.permission.ACCESS_LOCATION\" />\r\n    <uses-permission android:name=\"android.permission.ACCESS_COARSE_LOCATION\" />\r\n    <uses-permission android:name=\"android.permission.ACCESS_FINE_LOCATION\" />\r\n    <uses-permission android:name=\"android.permission.INTERNET\" />\r\n    <uses-permission android:name=\"android.permission.ACCESS_NETWORK_STATE\" />\r\n    <uses-permission android:name=\"android.permission.WRITE_EXTERNAL_STORAGE\" />\r\n    <uses-permission android:name=\"android.permission.ACCESS_WIFI_STATE\" />\r\n    <uses-permission android:name=\"android.permission.CHANGE_WIFI_STATE\" />\r\n    <uses-permission android:name=\"android.permission.READ_PHONE_STATE\" />\r\n    <uses-permission android:name=\"android.permission.VIBRATE\" />\r\n    <uses-permission android:name=\"android.permission.WRITE_SETTINGS\" />`\r\n\r\nThis is my **activity definition in manifest:**\r\n`<activity\r\n            android:name=\".PersonMap.myapplication.Map.YandexMap\"\r\n            android:label=\"@string/title_activity_yandex_map\"\r\n            android:theme=\"@style/AppTheme.NoActionBar\">`\r\n\r\nThis is my **layout file** which I create **yandex map view**:\r\n\r\n`<?xml version=\"1.0\" encoding=\"utf-8\"?>\r\n<LinearLayout xmlns:android=\"http://schemas.android.com/apk/res/android\"\r\n    xmlns:tools=\"http://schemas.android.com/tools\"\r\n    android:layout_width=\"match_parent\"\r\n    android:layout_height=\"match_parent\"\r\n    android:orientation=\"vertical\"\r\n    tools:context=\"gcm.b4deploy.com.zimmetler.PersonMap.myapplication.Map.YandexMap\"\r\n    >\r\n    <ru.yandex.yandexmapkit.MapView\r\n        android:id=\"@+id/map\"\r\n        android:layout_width=\"fill_parent\"\r\n        android:layout_height=\"300dp\"\r\nandroid:apiKey=\"9b2hjqmGFyP1GLs6hiX26arwHrlKyLoJGpNdhz3UEN9jR6TPPjbHiNe2rC4caPBdYd~qnG80AGwk2Dhjf6qJE~RGdMc3J9EAEliCb5Ss0U4=\" />\r\n</LinearLayout>`\r\n\r\nI also added yandex lib into my app **build.gradle** file which is:\r\n\r\n`    compile 'ru.yandex:yandexmapkit:2.4.2@aar' `\r\n\r\nAnd I added following lines into my **outer build.gradle** file: \r\n\r\n`allprojects {\r\n    repositories {\r\n        jcenter()\r\n        maven { url 'https://github.com/yandexmobile/yandexmapkit-android/raw/maven/' }\r\n\r\n    }\r\n}`\r\n\r\nI used the same api key with my previous android application because I couldnt find where to get the api key.\r\n\r\nIn my first project I sent email to yandex support and they gave me the api key. But now I dont know where to find. When I search in google, I find some documentations which is in Russian and I dont understand any thing unfortunately. But I dont think that api key is the reason because in my previous project first I did not write anything for my android:apiKey line and it did not give me this error. \r\n\r\nAny idea? Thanks in advance.\r\n\r\n\r\n\r\n"},"comment":{"url":"https://api.github.com/repos/yandexmobile/yandexmapkit-android/issues/comments/217376462","html_url":"https://github.com/yandexmobile/yandexmapkit-android/issues/217#issuecomment-217376462","issue_url":"https://api.github.com/repos/yandexmobile/yandexmapkit-android/issues/217","id":217376462,"user":{"login":"mksaint13","id":1098347,"avatar_url":"https://avatars.githubusercontent.com/u/1098347?v=3","gravatar_id":"","url":"https://api.github.com/users/mksaint13","html_url":"https://github.com/mksaint13","followers_url":"https://api.github.com/users/mksaint13/followers","following_url":"https://api.github.com/users/mksaint13/following{/other_user}","gists_url":"https://api.github.com/users/mksaint13/gists{/gist_id}","starred_url":"https://api.github.com/users/mksaint13/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mksaint13/subscriptions","organizations_url":"https://api.github.com/users/mksaint13/orgs","repos_url":"https://api.github.com/users/mksaint13/repos","events_url":"https://api.github.com/users/mksaint13/events{/privacy}","received_events_url":"https://api.github.com/users/mksaint13/received_events","type":"User","site_admin":false},"created_at":"2016-05-06T08:08:01Z","updated_at":"2016-05-06T08:08:01Z","body":"Thank"}}