приложение отлично работает на всех android версиях, я тестировал его на android 5 и 6 и 9, но эта ошибка sh случается только на устройствах с android версией 7 и 7.1 вот cra sh отчет:
--------- beginning of crash
E/AndroidRuntime: FATAL EXCEPTION: main
Process: com.allsafe.mapbook, PID: 9133
java.lang.RuntimeException: Unable to start activity ComponentInfo{com.allsafe.mapbook/com.allsafe.mapbook.MapsActivity}: android.view.InflateException: Binary XML file line #345: Binary XML file line #345: Error inflating class <unknown>
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2724)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2789)
at android.app.ActivityThread.-wrap12(ActivityThread.java)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1527)
at android.os.Handler.dispatchMessage(Handler.java:110)
at android.os.Looper.loop(Looper.java:203)
at android.app.ActivityThread.main(ActivityThread.java:6259)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1063)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:924)
Caused by: android.view.InflateException: Binary XML file line #345: Binary XML file line #345: Error inflating class <unknown>
Caused by: android.view.InflateException: Binary XML file line #345: Error inflating class <unknown>
Caused by: java.lang.reflect.InvocationTargetException
at java.lang.reflect.Constructor.newInstance0(Native Method)
at java.lang.reflect.Constructor.newInstance(Constructor.java:430)
at android.view.LayoutInflater.createView(LayoutInflater.java:645)
at com.android.internal.policy.PhoneLayoutInflater.onCreateView(PhoneLayoutInflater.java:58)
at android.view.LayoutInflater.onCreateView(LayoutInflater.java:717)
at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:785)
at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:727)
at android.view.LayoutInflater.rInflate(LayoutInflater.java:858)
at android.view.LayoutInflater.rInflateChildren(LayoutInflater.java:821)
at android.view.LayoutInflater.rInflate(LayoutInflater.java:861)
at android.view.LayoutInflater.rInflateChildren(LayoutInflater.java:821)
at android.view.LayoutInflater.rInflate(LayoutInflater.java:861)
at android.view.LayoutInflater.rInflateChildren(LayoutInflater.java:821)
at android.view.LayoutInflater.rInflate(LayoutInflater.java:861)
at android.view.LayoutInflater.rInflateChildren(LayoutInflater.java:821)
at android.view.LayoutInflater.rInflate(LayoutInflater.java:861)
at android.view.LayoutInflater.rInflateChildren(LayoutInflater.java:821)
at android.view.LayoutInflater.rInflate(LayoutInflater.java:861)
at android.view.LayoutInflater.rInflateChildren(LayoutInflater.java:821)
at android.view.LayoutInflater.inflate(LayoutInflater.java:518)
at android.view.LayoutInflater.inflate(LayoutInflater.java:426)
at android.view.LayoutInflater.inflate(LayoutInflater.java:377)
at com.android.internal.policy.PhoneWindow.setContentView(PhoneWindow.java:427)
at android.app.Activity.setContentView(Activity.java:2420)
at com.allsafe.mapbook.MapsActivity.onCreate(MapsActivity.java:130)
at android.app.Activity.performCreate(Activity.java:6670)
at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1118)
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2677)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2789)
at android.app.ActivityThread.-wrap12(ActivityThread.java)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1527)
at android.os.Handler.dispatchMessage(Handler.java:110)
at android.os.Looper.loop(Looper.java:203)
at android.app.ActivityThread.main(ActivityThread.java:6259)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1063)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:924)
Caused by: java.lang.OutOfMemoryError: Failed to allocate a 16777228 byte allocation with 4191472 free bytes and 12MB until OOM
at dalvik.system.VMRuntime.newNonMovableArray(Native Method)
E/AndroidRuntime: at android.graphics.BitmapFactory.nativeDecodeAsset(Native Method)
at android.graphics.BitmapFactory.decodeStream(BitmapFactory.java:655)
at android.graphics.BitmapFactory.decodeResourceStream(BitmapFactory.java:483)
at android.graphics.drawable.Drawable.createFromResourceStream(Drawable.java:1157)
at android.content.res.ResourcesImpl.loadDrawableForCookie(ResourcesImpl.java:720)
at android.content.res.ResourcesImpl.loadDrawable(ResourcesImpl.java:571)
at android.content.res.Resources.loadDrawable(Resources.java:972)
at android.content.res.TypedArray.getDrawable(TypedArray.java:931)
at android.widget.ImageView.<init>(ImageView.java:157)
at android.widget.ImageView.<init>(ImageView.java:145)
at android.widget.ImageView.<init>(ImageView.java:141)
... 37 more
W/DynamiteModule: Local module descriptor class for com.google.android.gms.googlecertificates not found.
I/DynamiteModule: Considering local module com.google.android.gms.googlecertificates:0 and remote module com.google.android.gms.googlecertificates:5
Selected remote version of com.google.android.gms.googlecertificates, version >= 5
W/System: ClassLoader referenced unknown path: /data/user_de/0/com.google.android.gms/app_chimera/m/000000c0/n/armeabi-v7a
ClassLoader referenced unknown path: /data/user_de/0/com.google.android.gms/app_chimera/m/000000c0/n/armeabi
I/art: Enter while loop.
I/art: Enter while loop.
и это строка ОШИБКИ на MapsActivity
setContentView (R.layout.activity_maps);
и вот XML файл
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout
xmlns:ads="http://schemas.android.com/apk/res-auto"
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:map="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
tools:context=".MapsActivity">
<fragment xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:map="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:id="@+id/map"
android:name="com.google.android.gms.maps.SupportMapFragment"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_marginBottom="50dp"/>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:gravity="center_horizontal|center_vertical"
android:orientation="vertical">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:id="@+id/fullscreen"
android:orientation="horizontal"
>
<ImageView
android:id="@+id/showbar"
android:layout_width="40sp"
android:layout_height="40sp"
android:src="@drawable/show"
android:visibility="gone"
android:layout_marginTop="10dp"
/>
<RelativeLayout
android:id="@+id/rellay1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:background="@drawable/backg"
>
<de.hdodenhof.circleimageview.CircleImageView
xmlns:app="http://schemas.android.com/apk/res-auto"
android:id="@+id/profile_image"
android:layout_width="60sp"
android:layout_height="60sp"
android:layout_marginRight="10dp"
android:src="@mipmap/ic_default_user"
app:civ_border_width="2sp"
app:civ_border_color="#FF000000"/>
<Switch
android:id="@+id/gonline"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text=""
android:layout_toRightOf="@id/profile_image"
android:layout_centerVertical="true"
android:layout_marginLeft="20sp"
/>
<ImageView
android:id="@+id/refresh"
android:layout_width="30sp"
android:layout_height="40sp"
android:layout_centerVertical="true"
android:layout_marginLeft="5sp"
android:layout_toRightOf="@id/gonline"
android:adjustViewBounds="true"
android:scaleType="centerInside"
android:src="@drawable/refresh" />
<ImageView
android:id="@+id/setting"
android:layout_width="30sp"
android:layout_height="40sp"
android:layout_centerVertical="true"
android:layout_marginLeft="5sp"
android:layout_toRightOf="@id/refresh"
android:adjustViewBounds="true"
android:scaleType="centerInside"
android:src="@drawable/ic_settings" />
<ImageView
android:id="@+id/logout"
android:layout_width="30sp"
android:layout_height="40sp"
android:layout_centerVertical="true"
android:layout_marginLeft="5sp"
android:layout_toRightOf="@id/setting"
android:adjustViewBounds="true"
android:scaleType="centerInside"
android:src="@drawable/logout" />
<ImageView
android:id="@+id/hidebar"
android:layout_width="40sp"
android:layout_height="40sp"
android:src="@drawable/hide"
android:visibility="visible"
android:layout_marginTop="10dp"
android:layout_marginLeft="5sp"
android:layout_toRightOf="@id/logout"
/>
<ImageView
android:id="@+id/online"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:src="@android:drawable/presence_online"
android:layout_centerVertical="true"
android:layout_marginLeft="5sp"
android:layout_toRightOf="@id/profile_image"
android:visibility="gone"/>
<ImageView
android:id="@+id/offline"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:src="@android:drawable/presence_offline"
android:layout_centerVertical="true"
android:layout_marginLeft="5sp"
android:layout_toRightOf="@id/profile_image"
android:visibility="visible"/>
<ImageView
android:id="@+id/connecting"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:src="@android:drawable/presence_away"
android:layout_centerVertical="true"
android:layout_marginLeft="5sp"
android:layout_toRightOf="@id/profile_image"
android:visibility="gone"/>
</RelativeLayout>
</LinearLayout>
<LinearLayout
android:id="@+id/linearl1"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="10dp"
android:background="@color/address"
android:gravity="center_horizontal|center_vertical"
android:orientation="horizontal"
android:visibility="gone">
<Spinner
android:id="@+id/spinnerCountries"
android:layout_width="100dp"
android:layout_height="45dp"
android:background="@color/white" />
<EditText
android:id="@+id/editTextPhone"
android:layout_width="match_parent"
android:layout_height="45dp"
android:layout_marginLeft="5dp"
android:layout_weight="2"
android:background="@color/cardview_dark_background"
android:digits="+0123456789"
android:gravity="center_horizontal"
android:hint="Pute the phone number here"
android:inputType="phone"
android:maxLength="15"
android:maxLines="1"
android:textAlignment="center"
android:textColor="@color/white"
android:textColorHint="@color/white"
android:textSize="18dp" />
<Button
android:id="@+id/search"
android:layout_width="45sp"
android:layout_height="45sp"
android:background="@android:drawable/ic_menu_search" />
<ImageView
android:id="@+id/hidesbar"
android:layout_width="40sp"
android:layout_height="45sp"
android:src="@drawable/hide"
android:visibility="visible" />
</LinearLayout>
<ImageView
android:id="@+id/showsbar"
android:layout_width="40sp"
android:layout_height="45sp"
android:layout_marginTop="10sp"
android:src="@drawable/show"
android:layout_gravity="left"
android:visibility="visible"
/>
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical"
android:gravity="center"
android:weightSum="5">
<LinearLayout
android:id="@+id/layout_userinfo"
android:layout_width="match_parent"
android:layout_height="0dp"
android:layout_centerVertical="true"
android:orientation="vertical"
android:background="@drawable/rounded"
android:layout_weight="2.5"
android:visibility="gone">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginLeft="50dp"
android:layout_marginRight="50dp"
android:gravity="center_horizontal|center_vertical"
android:orientation="horizontal">
<ImageView
android:id="@+id/block"
android:layout_width="40sp"
android:layout_height="40sp"
android:layout_marginTop="10dp"
android:src="@drawable/blockuser"
/>
<de.hdodenhof.circleimageview.CircleImageView
android:id="@+id/profile_image_user"
android:layout_width="120dp"
android:layout_height="120dp"
android:src="@mipmap/ic_default_user"
map:civ_border_color="#FF000000"
map:civ_border_width="2dp" />
<ImageView
android:id="@+id/copyid"
android:layout_width="40sp"
android:layout_height="40sp"
android:layout_marginTop="10dp"
android:background="?attr/actionModeCopyDrawable"
/>
</LinearLayout>
<TextView
android:id="@+id/name_user"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:fontFamily="sans-serif-light"
android:singleLine="true"
android:text="Your Name"
android:textColor="@color/address"
android:textSize="32sp" />
<TextView
android:id="@+id/birthday"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_below="@+id/name"
android:layout_gravity="center"
android:fontFamily="sans-serif"
android:maxLength="50"
android:singleLine="true"
android:text="birthday"
android:textColor="@android:color/holo_red_light"
android:textSize="14sp" />
<TextView
android:id="@+id/biouser"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:fontFamily="sans-serif"
android:text="Add Bio"
android:singleLine="true"
android:maxLength="50"
android:textColor="@color/address"
android:textSize="18sp" />
<LinearLayout
android:id="@+id/linlay2"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginLeft="40dp"
android:layout_marginRight="40dp"
android:orientation="horizontal">
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:gravity="center"
android:paddingBottom="5dp"
android:paddingTop="5dp">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:gravity="center_horizontal"
android:orientation="horizontal">
<ImageView
android:id="@+id/email"
android:layout_width="40sp"
android:layout_height="40sp"
android:src="@drawable/emaile"
android:autoLink="email"
android:clickable="true"
/>
<ImageView
android:id="@+id/phones"
android:layout_width="40sp"
android:layout_height="40sp"
android:layout_marginLeft="5sp"
android:src="@drawable/phonese"
android:autoLink="phone"
android:clickable="true"
/>
<ImageView
android:id="@+id/facebook"
android:layout_width="40sp"
android:layout_height="40sp"
android:layout_marginLeft="5sp"
android:src="@drawable/facebooke"
/>
<ImageView
android:id="@+id/instagram"
android:layout_width="40sp"
android:layout_height="40sp"
android:layout_marginLeft="5sp"
android:src="@drawable/instagrame"
/>
<ImageView
android:id="@+id/linkedin"
android:layout_width="40sp"
android:layout_height="40sp"
android:layout_marginLeft="5sp"
android:src="@drawable/linkedine"
/>
<ImageView
android:id="@+id/skype"
android:layout_width="40sp"
android:layout_height="40sp"
android:layout_marginLeft="5sp"
android:src="@drawable/skypee"
/>
</LinearLayout>
</RelativeLayout>
</LinearLayout>
</LinearLayout>
</LinearLayout>
<ImageView
android:id="@+id/show"
android:layout_width="40sp"
android:layout_height="40sp"
android:src="@drawable/show"
android:layout_centerVertical="true"
android:visibility="gone"
/>
<ImageView
android:id="@+id/hide"
android:layout_width="40sp"
android:layout_height="40sp"
android:src="@drawable/hide"
android:layout_centerVertical="true"
android:layout_alignParentEnd="true"
android:layout_alignParentRight="true"
android:visibility="gone"
/>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical"
android:gravity="bottom"
>
<TextView
android:id="@+id/countdonwn"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:fontFamily="sans-serif"
android:text="Refresh your location in"
android:singleLine="true"
android:maxLength="50"
android:textColor="@color/about_youtube_color"
android:layout_gravity="center"
android:layout_marginRight="5dp"
android:textSize="14sp"
android:visibility="gone"
/>
<com.google.android.gms.ads.AdView
xmlns:ads="http://schemas.android.com/apk/res-auto"
android:id="@+id/adViewb"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_centerHorizontal="true"
android:layout_alignParentBottom="true"
android:layout_alignParentLeft="true"
ads:adSize="BANNER"
ads:adUnitId="@string/ad_banner">
</com.google.android.gms.ads.AdView>
</LinearLayout>
</RelativeLayout>
Я действительно запутался, мне нужна помощь, что мне делать!