我正在尝试使用Xamarin.Android完成以下代码实验室:https://codelabs.developers.google.com/codelabs/Material-Design-Style/#0
但是,折叠工具栏非常滞后。向下滚动时,我必须等待超过一整秒才能使应用程序赶上并显示更新(折叠)的工具栏。此时的CPU使用率为100%。启动DetailActivity也需要比平时更长的时间。我正在尝试加载的图像大小超过3 MB。
布局文件(activity_detail.axml):
<?xml version="1.0" encoding="utf-8"?>
<android.support.design.widget.CoordinatorLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:id="@+id/detail_content"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:fitsSystemWindows="true">
<android.support.design.widget.AppBarLayout
android:id="@+id/appbar"
android:layout_width="match_parent"
android:layout_height="@dimen/app_bar_height"
android:fitsSystemWindows="true"
android:theme="@style/ThemeOverlay.AppCompat.Dark.ActionBar">
<android.support.design.widget.CollapsingToolbarLayout
android:id="@+id/collapsing_toolbar"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:fitsSystemWindows="true"
android:theme="@style/ThemeOverlay.AppCompat.Dark"
app:contentScrim="?attr/colorPrimary"
app:expandedTitleMarginEnd="@dimen/article_keylines"
app:expandedTitleMarginStart="@dimen/md_keylines"
app:layout_scrollFlags="scroll|exitUntilCollapsed">
<ImageView
android:id="@+id/image"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@drawable/paris"
android:fitsSystemWindows="true"
android:scaleType="centerCrop"
app:layout_collapseMode="parallax" />
<android.support.v7.widget.Toolbar
android:id="@+id/toolbar"
android:layout_width="match_parent"
android:layout_height="?attr/actionBarSize"
app:layout_collapseMode="pin"
app:popupTheme="@style/ThemeOverlay.AppCompat.Light" />
</android.support.design.widget.CollapsingToolbarLayout>
</android.support.design.widget.AppBarLayout>
<android.support.v4.widget.NestedScrollView
android:layout_width="match_parent"
android:layout_height="match_parent"
app:layout_behavior="@string/appbar_scrolling_view_behavior">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical"
android:paddingLeft="@dimen/article_keylines"
android:paddingRight="@dimen/md_keylines"
android:paddingTop="@dimen/md_keylines">
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:textColor="?attr/colorAccent"
android:text="Description"
android:textSize="@dimen/md_keylines"
android:layout_marginBottom="@dimen/md_keylines" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/detail_desc" />
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:textColor="?attr/colorAccent"
android:text="Location"
android:textSize="@dimen/article_titles"
android:layout_marginBottom="@dimen/md_keylines"
android:layout_marginTop="@dimen/md_keylines" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/detail_location" />
</LinearLayout>
</android.support.v4.widget.NestedScrollView>
</android.support.design.widget.CoordinatorLayout>
DetailActivity.cs:
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Android.App;
using Android.Content;
using Android.OS;
using Android.Runtime;
using Android.Support.Design.Widget;
using Android.Views;
using Android.Widget;
using Android.Support.V7.App;
using Android.Support.V7.Widget;
using Toolbar = Android.Support.V7.Widget.Toolbar;
namespace MaterialDesign
{
[Activity(ParentActivity = typeof(MainActivity))]
public class DetailActivity : AppCompatActivity
{
protected override void OnCreate(Bundle savedInstanceState)
{
base.OnCreate(savedInstanceState);
SetContentView(Resource.Layout.activity_detail);
SetSupportActionBar(FindViewById<Toolbar>(Resource.Id.toolbar));
SupportActionBar.SetDisplayHomeAsUpEnabled(true);
CollapsingToolbarLayout collapsingToolbar =
FindViewById<CollapsingToolbarLayout>(Resource.Id.collapsing_toolbar);
collapsingToolbar.Title = GetString(Resource.String.item_title);
}
}
}
我还使用Android Studio在Java中创建了这个应用程序,所有内容都在那里顺利运行。
注意:布局文件与Android Studio项目中的布局文件完全相同。
任何想法可能是什么问题?
更新:我注意到应用程序在内存少于我测试应用程序的内存(内存不足异常)的设备上崩溃。这是堆栈跟踪:
...
04-07 08:01:47.373 1193-1193/MaterialDesign.MaterialDesign D/Mono: Assembly Ref addref MaterialDesign[0xb9648460] -> Xamarin.Android.Support.v7.RecyclerView[0xb9634dc8]: 2
04-07 08:01:47.373 1193-1193/MaterialDesign.MaterialDesign D/Mono: Assembly Ref addref Xamarin.Android.Support.v7.RecyclerView[0xb9634dc8] -> Xamarin.Android.Support.v4[0xb9633e58]: 5
04-07 08:01:47.409 1193-1193/MaterialDesign.MaterialDesign D/libEGL: loaded /system/lib/egl/libEGL_genymotion.so
04-07 08:01:47.417 1193-1193/MaterialDesign.MaterialDesign D/libEGL: loaded /system/lib/egl/libGLESv1_CM_genymotion.so
04-07 08:01:47.421 1193-1193/MaterialDesign.MaterialDesign D/libEGL: loaded /system/lib/egl/libGLESv2_genymotion.so
04-07 08:01:47.457 1193-1193/MaterialDesign.MaterialDesign W/EGL_genymotion: eglSurfaceAttrib not implemented
04-07 08:01:47.473 1193-1193/MaterialDesign.MaterialDesign D/OpenGLRenderer: Enabling debug mode 0
04-07 08:01:47.493 1193-1195/MaterialDesign.MaterialDesign D/dalvikvm: GC_CONCURRENT freed 184K, 3% free 11139K/11463K, paused 11ms+0ms, total 14ms
04-07 08:01:47.493 1193-1193/MaterialDesign.MaterialDesign D/dalvikvm: GC_FOR_ALLOC freed 6K, 3% free 11136K/11463K, paused 3ms, total 3ms
04-07 08:01:47.497 1193-1193/MaterialDesign.MaterialDesign I/dalvikvm-heap: Grow heap (frag case) to 12.511MB for 1638412-byte allocation
04-07 08:01:47.521 1193-1195/MaterialDesign.MaterialDesign D/dalvikvm: GC_CONCURRENT freed <1K, 3% free 12736K/13127K, paused 11ms+12ms, total 25ms
04-07 08:01:47.561 1193-1193/MaterialDesign.MaterialDesign D/dalvikvm: GC_FOR_ALLOC freed 0K, 3% free 12736K/13127K, paused 2ms, total 2ms
04-07 08:01:47.573 1193-1193/MaterialDesign.MaterialDesign I/dalvikvm-heap: Grow heap (frag case) to 18.761MB for 6553612-byte allocation
04-07 08:01:47.609 1193-1195/MaterialDesign.MaterialDesign D/dalvikvm: GC_CONCURRENT freed 0K, 3% free 19136K/19591K, paused 11ms+0ms, total 36ms
04-07 08:01:47.717 1193-1193/MaterialDesign.MaterialDesign I/dalvikvm: Could not find method android.support.v7.widget.LinearLayoutCompat.drawableHotspotChanged, referenced from method android.support.design.internal.ForegroundLinearLayout.drawableHotspotChanged
04-07 08:01:47.717 1193-1193/MaterialDesign.MaterialDesign W/dalvikvm: VFY: unable to resolve virtual method 14829: Landroid/support/v7/widget/LinearLayoutCompat;.drawableHotspotChanged (FF)V
04-07 08:01:47.717 1193-1193/MaterialDesign.MaterialDesign D/dalvikvm: VFY: replacing opcode 0x6f at 0x0000
04-07 08:01:47.729 1193-1193/MaterialDesign.MaterialDesign D/Mono: Assembly Ref addref Xamarin.Android.Support.v7.AppCompat[0xb9621c20] -> System.Core[0xb9705298]: 3
04-07 08:01:47.789 1193-1193/MaterialDesign.MaterialDesign D/OpenGLRenderer: TextureCache::get: create texture(0xb9633ef0): name, size, mSize = 2, 9216, 9216
04-07 08:01:47.805 1193-1193/MaterialDesign.MaterialDesign D/OpenGLRenderer: TextureCache::get: create texture(0xb98f1880): name, size, mSize = 3, 9216, 18432
04-07 08:01:48.033 1193-1193/MaterialDesign.MaterialDesign D/OpenGLRenderer: TextureCache::get: create texture(0xb98da550): name, size, mSize = 4, 6553600, 6572032
04-07 08:01:48.097 1193-1193/MaterialDesign.MaterialDesign D/OpenGLRenderer: TextureCache::get: create texture(0xb95fafd8): name, size, mSize = 7, 1600, 6573632
04-07 08:01:48.321 1193-1193/MaterialDesign.MaterialDesign D/OpenGLRenderer: TextureCache::get: create texture(0xb98486b8): name, size, mSize = 13, 9216, 6582848
04-07 08:01:48.321 1193-1193/MaterialDesign.MaterialDesign D/OpenGLRenderer: TextureCache::get: create texture(0xb960b438): name, size, mSize = 14, 4096, 6586944
04-07 08:01:48.357 1193-1193/MaterialDesign.MaterialDesign I/Choreographer: Skipped 36 frames! The application may be doing too much work on its main thread.
04-07 08:02:41.493 1193-1193/MaterialDesign.MaterialDesign D/OpenGLRenderer: TextureCache::get: create texture(0xb95ef230): name, size, mSize = 222, 1127520, 7714464
04-07 08:02:41.505 1193-1193/MaterialDesign.MaterialDesign D/OpenGLRenderer: TextureCache::get: create texture(0xb95ee6e8): name, size, mSize = 223, 100224, 7814688
04-07 08:02:47.293 1193-1193/MaterialDesign.MaterialDesign D/OpenGLRenderer: TextureCache::get: create texture(0xb95e7f10): name, size, mSize = 345, 576, 7815264
04-07 08:02:47.401 1193-1193/MaterialDesign.MaterialDesign D/dalvikvm: GC_FOR_ALLOC freed 1797K, 10% free 17775K/19655K, paused 5ms, total 5ms
04-07 08:02:47.405 1193-1193/MaterialDesign.MaterialDesign I/dalvikvm-heap: Grow heap (frag case) to 28.633MB for 11746016-byte allocation
04-07 08:02:47.421 1193-1195/MaterialDesign.MaterialDesign D/dalvikvm: GC_CONCURRENT freed 13K, 7% free 29232K/31175K, paused 11ms+0ms, total 14ms
04-07 08:02:47.597 1193-1193/MaterialDesign.MaterialDesign D/dalvikvm: GC_FOR_ALLOC freed 0K, 7% free 29232K/31175K, paused 2ms, total 2ms
04-07 08:02:47.597 1193-1193/MaterialDesign.MaterialDesign I/dalvikvm-heap: Forcing collection of SoftReferences for 46984028-byte allocation
04-07 08:02:47.601 1193-1193/MaterialDesign.MaterialDesign D/dalvikvm: GC_BEFORE_OOM freed 9K, 7% free 29222K/31175K, paused 6ms, total 6ms
04-07 08:02:47.601 1193-1193/MaterialDesign.MaterialDesign E/dalvikvm-heap: Out of memory on a 46984028-byte allocation.
04-07 08:02:47.601 1193-1193/MaterialDesign.MaterialDesign I/dalvikvm: "main" prio=5 tid=1 RUNNABLE
04-07 08:02:47.601 1193-1193/MaterialDesign.MaterialDesign I/dalvikvm: | group="main" sCount=0 dsCount=0 obj=0xa622e4b0 self=0xb951e510
04-07 08:02:47.601 1193-1193/MaterialDesign.MaterialDesign I/dalvikvm: | sysTid=1193 nice=0 sched=0/0 cgrp=[fopen-error:2] handle=-1217354688
04-07 08:02:47.601 1193-1193/MaterialDesign.MaterialDesign I/dalvikvm: | schedstat=( 2330495687 1274137896 5442 ) utm=171 stm=61 core=0
04-07 08:02:47.601 1193-1193/MaterialDesign.MaterialDesign I/dalvikvm: at android.graphics.BitmapFactory.nativeDecodeAsset(Native Method)
04-07 08:02:47.601 1193-1193/MaterialDesign.MaterialDesign I/dalvikvm: at android.graphics.BitmapFactory.decodeStream(BitmapFactory.java:500)
04-07 08:02:47.601 1193-1193/MaterialDesign.MaterialDesign I/dalvikvm: at android.graphics.BitmapFactory.decodeResourceStream(BitmapFactory.java:353)
04-07 08:02:47.601 1193-1193/MaterialDesign.MaterialDesign I/dalvikvm: at android.graphics.drawable.Drawable.createFromResourceStream(Drawable.java:781)
04-07 08:02:47.601 1193-1193/MaterialDesign.MaterialDesign I/dalvikvm: at android.content.res.Resources.loadDrawable(Resources.java:1930)
04-07 08:02:47.601 1193-1193/MaterialDesign.MaterialDesign I/dalvikvm: at android.content.res.TypedArray.getDrawable(TypedArray.java:601)
04-07 08:02:47.601 1193-1193/MaterialDesign.MaterialDesign I/dalvikvm: at android.view.View.<init>(View.java:3336)
04-07 08:02:47.601 1193-1193/MaterialDesign.MaterialDesign I/dalvikvm: at android.widget.ImageView.<init>(ImageView.java:114)
04-07 08:02:47.601 1193-1193/MaterialDesign.MaterialDesign I/dalvikvm: at android.support.v7.widget.AppCompatImageView.<init>(AppCompatImageView.java:58)
04-07 08:02:47.601 1193-1193/MaterialDesign.MaterialDesign I/dalvikvm: at android.support.v7.widget.AppCompatImageView.<init>(AppCompatImageView.java:54)
04-07 08:02:47.601 1193-1193/MaterialDesign.MaterialDesign I/dalvikvm: at android.support.v7.app.AppCompatViewInflater.createView(AppCompatViewInflater.java:95)
04-07 08:02:47.601 1193-1193/MaterialDesign.MaterialDesign I/dalvikvm: at android.support.v7.app.AppCompatDelegateImplV7.createView(AppCompatDelegateImplV7.java:938)
04-07 08:02:47.605 1193-1193/MaterialDesign.MaterialDesign I/dalvikvm: at android.support.v7.app.AppCompatDelegateImplV7.onCreateView(AppCompatDelegateImplV7.java:992)
04-07 08:02:47.605 1193-1193/MaterialDesign.MaterialDesign I/dalvikvm: at android.support.v4.view.LayoutInflaterCompatHC$FactoryWrapperHC.onCreateView(LayoutInflaterCompatHC.java:44)
04-07 08:02:47.605 1193-1193/MaterialDesign.MaterialDesign I/dalvikvm: at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:675)
04-07 08:02:47.605 1193-1193/MaterialDesign.MaterialDesign I/dalvikvm: at android.view.LayoutInflater.rInflate(LayoutInflater.java:746)
04-07 08:02:47.605 1193-1193/MaterialDesign.MaterialDesign I/dalvikvm: at android.view.LayoutInflater.rInflate(LayoutInflater.java:749)
04-07 08:02:47.605 1193-1193/MaterialDesign.MaterialDesign I/dalvikvm: at android.view.LayoutInflater.rInflate(LayoutInflater.java:749)
04-07 08:02:47.605 1193-1193/MaterialDesign.MaterialDesign I/dalvikvm: at android.view.LayoutInflater.inflate(LayoutInflater.java:489)
04-07 08:02:47.605 1193-1193/MaterialDesign.MaterialDesign I/dalvikvm: at android.view.LayoutInflater.inflate(LayoutInflater.java:396)
04-07 08:02:47.605 1193-1193/MaterialDesign.MaterialDesign I/dalvikvm: at android.view.LayoutInflater.inflate(LayoutInflater.java:352)
04-07 08:02:47.605 1193-1193/MaterialDesign.MaterialDesign I/dalvikvm: at android.support.v7.app.AppCompatDelegateImplV7.setContentView(AppCompatDelegateImplV7.java:256)
04-07 08:02:47.605 1193-1193/MaterialDesign.MaterialDesign I/dalvikvm: at android.support.v7.app.AppCompatActivity.setContentView(AppCompatActivity.java:109)
04-07 08:02:47.605 1193-1193/MaterialDesign.MaterialDesign I/dalvikvm: at md5cdedf066eabae933cf5b8144b87f883b.DetailActivity.n_onCreate(Native Method)
04-07 08:02:47.605 1193-1193/MaterialDesign.MaterialDesign I/dalvikvm: at md5cdedf066eabae933cf5b8144b87f883b.DetailActivity.onCreate(DetailActivity.java:28)
04-07 08:02:47.605 1193-1193/MaterialDesign.MaterialDesign I/dalvikvm: at android.app.Activity.performCreate(Activity.java:5008)
04-07 08:02:47.605 1193-1193/MaterialDesign.MaterialDesign I/dalvikvm: at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1079)
04-07 08:02:47.605 1193-1193/MaterialDesign.MaterialDesign I/dalvikvm: at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2023)
04-07 08:02:47.605 1193-1193/MaterialDesign.MaterialDesign I/dalvikvm: at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2084)
04-07 08:02:47.605 1193-1193/MaterialDesign.MaterialDesign I/dalvikvm: at android.app.ActivityThread.access$600(ActivityThread.java:130)
04-07 08:02:47.605 1193-1193/MaterialDesign.MaterialDesign I/dalvikvm: at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1195)
04-07 08:02:47.605 1193-1193/MaterialDesign.MaterialDesign I/dalvikvm: at android.os.Handler.dispatchMessage(Handler.java:99)
04-07 08:02:47.605 1193-1193/MaterialDesign.MaterialDesign I/dalvikvm: at android.os.Looper.loop(Looper.java:137)
04-07 08:02:47.605 1193-1193/MaterialDesign.MaterialDesign I/dalvikvm: at android.app.ActivityThread.main(ActivityThread.java:4745)
04-07 08:02:47.605 1193-1193/MaterialDesign.MaterialDesign I/dalvikvm: at java.lang.reflect.Method.invokeNative(Native Method)
04-07 08:02:47.605 1193-1193/MaterialDesign.MaterialDesign I/dalvikvm: at java.lang.reflect.Method.invoke(Method.java:511)
04-07 08:02:47.605 1193-1193/MaterialDesign.MaterialDesign I/dalvikvm: at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:786)
04-07 08:02:47.605 1193-1193/MaterialDesign.MaterialDesign I/dalvikvm: at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:553)
04-07 08:02:47.605 1193-1193/MaterialDesign.MaterialDesign I/dalvikvm: at dalvik.system.NativeStart.main(Native Method)
04-07 08:02:47.605 1193-1193/MaterialDesign.MaterialDesign E/mono-rt: Stacktrace:
04-07 08:02:47.605 1193-1193/MaterialDesign.MaterialDesign E/mono-rt: at <unknown> <0xffffffff>
04-07 08:02:47.605 1193-1193/MaterialDesign.MaterialDesign E/mono-rt: at (wrapper managed-to-native) object.wrapper_native_0xb66e1b90 (intptr,intptr,intptr,intptr,Android.Runtime.JValue*) <0xffffffff>
04-07 08:02:47.605 1193-1193/MaterialDesign.MaterialDesign E/mono-rt: at Android.Runtime.JNIEnv.CallNonvirtualVoidMethod (intptr,intptr,intptr,Android.Runtime.JValue*) <0x0008d>
04-07 08:02:47.605 1193-1193/MaterialDesign.MaterialDesign E/mono-rt: at Android.App.Activity.SetContentView (int) <0x0014f>
04-07 08:02:47.605 1193-1193/MaterialDesign.MaterialDesign E/mono-rt: at MaterialDesign.DetailActivity.OnCreate (Android.OS.Bundle) <0x0002e>
04-07 08:02:47.605 1193-1193/MaterialDesign.MaterialDesign E/mono-rt: at Android.Support.V4.App.FragmentActivity.n_OnCreate_Landroid_os_Bundle_ (intptr,intptr,intptr) <0x00057>
04-07 08:02:47.605 1193-1193/MaterialDesign.MaterialDesign E/mono-rt: at (wrapper dynamic-method) object.f3681e7a-16a5-436b-bfa3-c04082252994 (intptr,intptr,intptr) <0x00027>
04-07 08:02:47.605 1193-1193/MaterialDesign.MaterialDesign E/mono-rt: at (wrapper native-to-managed) object.f3681e7a-16a5-436b-bfa3-c04082252994 (intptr,intptr,intptr) <0xffffffff>
04-07 08:02:47.609 1193-1193/MaterialDesign.MaterialDesign E/mono-rt: at ???+377510 [0xb6d302a6]
04-07 08:02:47.609 1193-1193/MaterialDesign.MaterialDesign E/mono-rt: at ???+354302 [0xb6d2a7fe]
04-07 08:02:47.609 1193-1193/MaterialDesign.MaterialDesign E/mono-rt: at ???+440759 [0xb6d3f9b7]
04-07 08:02:47.609 1193-1193/MaterialDesign.MaterialDesign E/mono-rt: at ???+410143 [0xb6d3821f]
04-07 08:02:47.609 1193-1193/MaterialDesign.MaterialDesign E/mono-rt: at ???+837579 [0xb6da07cb]
04-07 08:02:47.609 1193-1193/MaterialDesign.MaterialDesign E/mono-rt: at ???+838916 [0xb6da0d04]
04-07 08:02:47.609 1193-1193/MaterialDesign.MaterialDesign E/mono-rt: at ???+567193 [0xb6d5e799]
04-07 08:02:47.609 1193-1193/MaterialDesign.MaterialDesign E/mono-rt: at ???+574224 [0xb6d60310]
04-07 08:02:47.609 1193-1193/MaterialDesign.MaterialDesign E/mono-rt: at ???+535528 [0xb6d56be8]
04-07 08:02:47.609 1193-1193/MaterialDesign.MaterialDesign E/mono-rt: at ???+490340 [0xb6d4bb64]
04-07 08:02:47.609 1193-1193/MaterialDesign.MaterialDesign E/mono-rt: at ???+462504 [0xb6d44ea8]
04-07 08:02:47.609 1193-1193/MaterialDesign.MaterialDesign E/mono-rt: at ???+471496 [0xb6d471c8]
04-07 08:02:47.609 1193-1193/MaterialDesign.MaterialDesign E/mono-rt: at ???+669154 [0xb700b5e2]
04-07 08:02:47.609 1193-1193/MaterialDesign.MaterialDesign E/mono-rt: at ???+671378 [0xb700be92]
04-07 08:02:47.609 1193-1193/MaterialDesign.MaterialDesign E/mono-rt: at ???+110240 [0xb66b6ea0]
04-07 08:02:47.609 1193-1193/MaterialDesign.MaterialDesign E/mono-rt: at ???+395513 [0xb66fc8f9]
04-07 08:02:47.609 1193-1193/MaterialDesign.MaterialDesign E/mono-rt: at ???+811016 [0xb6762008]
04-07 08:02:47.609 1193-1193/MaterialDesign.MaterialDesign E/mono-rt: at ???+168966 [0xb66c5406]
04-07 08:02:47.609 1193-1193/MaterialDesign.MaterialDesign E/mono-rt: at ???+157136 [0xb66c25d0]
04-07 08:02:47.609 1193-1193/MaterialDesign.MaterialDesign E/mono-rt: at ???+595124 [0xb672d4b4]
04-07 08:02:47.609 1193-1193/MaterialDesign.MaterialDesign E/mono-rt: at ???+385144 [0xb66fa078]
04-07 08:02:47.609 1193-1193/MaterialDesign.MaterialDesign E/mono-rt: at ???+285799 [0xb66e1c67]
04-07 08:02:47.609 1193-1193/MaterialDesign.MaterialDesign E/mono-rt: at ???+80308 [0x9302f9b4]
04-07 08:02:47.609 1193-1193/MaterialDesign.MaterialDesign E/mono-rt: at ???+79742 [0x9302f77e]
04-07 08:02:47.609 1193-1193/MaterialDesign.MaterialDesign E/mono-rt: at ???+128672 [0x9303b6a0]
04-07 08:02:47.609 1193-1193/MaterialDesign.MaterialDesign E/mono-rt: at ???+169583 [0x9304566f]
04-07 08:02:47.609 1193-1193/MaterialDesign.MaterialDesign E/mono-rt: at ???+126736 [0x9303af10]
04-07 08:02:47.609 1193-1193/MaterialDesign.MaterialDesign E/mono-rt: at ???+288 [0x93053120]
04-07 08:02:47.609 1193-1193/MaterialDesign.MaterialDesign E/mono-rt: at ???+91608 [0x930325d8]
04-07 08:02:47.609 1193-1193/MaterialDesign.MaterialDesign E/mono-rt: at ???+110240 [0xb66b6ea0]
04-07 08:02:47.609 1193-1193/MaterialDesign.MaterialDesign E/mono-rt: at ???+395513 [0xb66fc8f9]
04-07 08:02:47.609 1193-1193/MaterialDesign.MaterialDesign E/mono-rt: at ???+811016 [0xb6762008]
04-07 08:02:47.609 1193-1193/MaterialDesign.MaterialDesign E/mono-rt: at ???+168966 [0xb66c5406]
04-07 08:02:47.609 1193-1193/MaterialDesign.MaterialDesign E/mono-rt: at ???+157136 [0xb66c25d0]
04-07 08:02:47.609 1193-1193/MaterialDesign.MaterialDesign E/mono-rt: at ???+594202 [0xb672d11a]
04-07 08:02:47.609 1193-1193/MaterialDesign.MaterialDesign E/mono-rt: at ???+663802 [0xb673e0fa]
04-07 08:02:47.609 1193-1193/MaterialDesign.MaterialDesign E/mono-rt: at ???+811016 [0xb6762008]
04-07 08:02:47.609 1193-1193/MaterialDesign.MaterialDesign E/mono-rt: at ???+168966 [0xb66c5406]
04-07 08:02:47.609 1193-1193/MaterialDesign.MaterialDesign E/mono-rt: at ???+157136 [0xb66c25d0]
04-07 08:02:47.609 1193-1193/MaterialDesign.MaterialDesign E/mono-rt: at ???+595833 [0xb672d779]
04-07 08:02:47.609 1193-1193/MaterialDesign.MaterialDesign E/mono-rt: at ???+403306 [0xb66fe76a]
04-07 08:02:47.609 1193-1193/MaterialDesign.MaterialDesign E/mono-rt: at ???+344986 [0xb6fbc39a]
04-07 08:02:47.609 1193-1193/MaterialDesign.MaterialDesign E/mono-rt: at ???+349705 [0xb6fbd609]
04-07 08:02:47.613 1193-1193/MaterialDesign.MaterialDesign E/mono-rt: at ???+4599 [0xb770c1f7]
04-07 08:02:47.613 1193-1193/MaterialDesign.MaterialDesign E/mono-rt: at ???+94767 [0xb750022f]
04-07 08:02:47.613 1193-1193/MaterialDesign.MaterialDesign A/libc: Fatal signal 11 (SIGSEGV) at 0x00000000 (code=1), thread 1193 (.MaterialDesign)
DetailActivity中的第28行是这个:
SetContentView(Resource.Layout.activity_detail);
答案 0 :(得分:0)
尝试将Java堆大小设置为1G 右键单击项目 - &gt;选项 - &gt; Android构建 - &gt;先进