单击主页按钮时为什么会出现错误?

时间:2016-08-22 16:26:16

标签: android android-logcat

当我的应用程序打开时单击主页按钮时,日志包括

08-22 11:00:33.856 31395-31481/com.myname.randomize E/libEGL: ------------------------------------------------
08-22 11:00:33.856 31395-31481/com.myname.randomize E/libEGL: HWUI Context(-1616759040) Damaged Report-Shader
08-22 11:00:33.856 31395-31481/com.myname.randomize E/libEGL: HWUI   Shaders(1):
08-22 11:00:33.856 31395-31481/com.myname.randomize E/libEGL: HWUI     Unit 0) DAMAGED Handle(7)
08-22 11:00:33.856 31395-31481/com.myname.randomize E/libEGL: ------------------------------------------------

在这种情况下,我没有注意到手机上的任何不良影响,但我得到同样的错误"错误"其他地方我的应用程序和我已经回溯调试,因为我无法让应用程序的其他部分工作,这似乎有所贡献。

我现在的整个主要活动是

package com.myname.randomize;

import android.content.Intent;
import android.os.PersistableBundle;
import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;
import android.util.Log;
import android.view.View;

public class MainActivity extends AppCompatActivity {

final String TAG = "TAD";

@Override
protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.activity_main);
}

@Override
protected void onPause() {
    super.onPause();

    Log.i(TAG, "onPause: " + Thread.currentThread().getStackTrace()[2].getLineNumber());
}

@Override
protected void onStop() {
    super.onStop();

    Log.i(TAG, "onStop: " + Thread.currentThread().getStackTrace()[2].getLineNumber());
}

@Override
public void onSaveInstanceState(Bundle outState, PersistableBundle outPersistentState) {
    super.onSaveInstanceState(outState, outPersistentState);

    Log.i(TAG, "onSaveInstanceState: "
            + Thread.currentThread().getStackTrace()[2].getLineNumber());
}
}

现在整个AndroidManifest.xml都是

<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.myname.randomize">

<application
    android:allowBackup="true"
    android:icon="@mipmap/randomize_icon300"
    android:label="@string/app_name"
    android:supportsRtl="true"
    android:theme="@style/AppTheme">
    <activity android:name=".MainActivity">
        <intent-filter>
            <action android:name="android.intent.action.MAIN" />

            <category android:name="android.intent.category.LAUNCHER" />
        </intent-filter>
    </activity>

</application>

</manifest>

当我打开我的应用程序时,整个日志都是

08-22 11:13:31.946 17543-17543/com.myname.randomize W/ResourcesManager: getTopLevelResources: /data/app/com.myname.randomize-2/base.apk / 1.0 running in com.myname.randomize rsrc of package com.myname.randomize
08-22 11:13:31.946 17543-17543/com.myname.randomize I/InjectionManager: Inside getClassLibPath + mLibMap{0=, 1=}
08-22 11:13:31.946 17543-17543/com.myname.randomize D/ResourcesManager: For user 0 new overlays fetched Null
08-22 11:13:31.956 17543-17543/com.myname.randomize I/InjectionManager: Inside getClassLibPath caller 
08-22 11:13:31.956 17543-17543/com.myname.randomize W/System: ClassLoader referenced unknown path: /data/app/com.myname.randomize-2/lib/arm64
08-22 11:13:32.006 17543-17543/com.myname.randomize W/System: ClassLoader referenced unknown path: /data/app/com.myname.randomize-2/lib/arm64
08-22 11:13:32.006 17543-17543/com.myname.randomize D/InjectionManager: InjectionManager
08-22 11:13:32.006 17543-17543/com.myname.randomize D/InjectionManager: fillFeatureStoreMap com.myname.randomize
08-22 11:13:32.006 17543-17543/com.myname.randomize I/InjectionManager: Constructor com.myname.randomize, Feature store :{}
08-22 11:13:32.006 17543-17543/com.myname.randomize I/InjectionManager: featureStore :{}
08-22 11:13:32.046 17543-17543/com.myname.randomize W/ResourcesManager: getTopLevelResources: /data/app/com.myname.randomize-2/base.apk / 1.0 running in com.myname.randomize rsrc of package com.myname.randomize
08-22 11:13:32.046 17543-17543/com.myname.randomize W/ResourcesManager: getTopLevelResources: /data/app/com.myname.randomize-2/base.apk / 1.0 running in com.myname.randomize rsrc of package com.myname.randomize
08-22 11:13:32.156 17543-17543/com.myname.randomize D/Activity: performCreate Call Injection manager
08-22 11:13:32.156 17543-17543/com.myname.randomize I/InjectionManager: dispatchOnViewCreated > Target : com.myname.randomize.MainActivity isFragment :false
08-22 11:13:32.166 17543-17543/com.myname.randomize D/SecWifiDisplayUtil: Metadata value : SecSettings2
08-22 11:13:32.166 17543-17543/com.myname.randomize D/ViewRootImpl: #1 mView = com.android.internal.policy.PhoneWindow$DecorView{4a4a9e5 I.E...... R.....ID 0,0-0,0}
08-22 11:13:32.176 17543-17568/com.myname.randomize D/OpenGLRenderer: Use EGL_SWAP_BEHAVIOR_PRESERVED: true
08-22 11:13:32.226 17543-17568/com.myname.randomize D/libEGL: loaded /vendor/lib64/egl/libGLES_mali.so
08-22 11:13:32.236 17543-17568/com.myname.randomize D/libEGL: eglInitialize EGLDisplay = 0x7f9fb7b178
08-22 11:13:32.236 17543-17568/com.myname.randomize I/OpenGLRenderer: Initialized EGL, version 1.4

                                                                    [ 08-22 11:13:32.236 17543:17568 D/         ]
                                                                    ro.exynos.dss isEnabled: 0
08-22 11:13:32.236 17543-17568/com.myname.randomize D/mali_winsys: new_window_surface returns 0x3000,  [1440x2560]-format:1
08-22 11:13:32.266 17543-17543/com.myname.randomize I/InjectionManager: dispatchCreateOptionsMenu :com.myname.randomize.MainActivity
08-22 11:13:32.266 17543-17543/com.myname.randomize I/InjectionManager: dispatchPrepareOptionsMenu :com.myname.randomize.MainActivity
08-22 11:13:32.266 17543-17543/com.myname.randomize D/ViewRootImpl: MSG_RESIZED_REPORT: ci=Rect(0, 96 - 0, 0) vi=Rect(0, 96 - 0, 0) or=1
08-22 11:13:32.296 17543-17543/com.myname.randomize I/Timeline: Timeline: Activity_idle id: android.os.BinderProxy@de81d49 time:53327623

单击主页按钮时的整个日志是

08-22 11:18:20.136 23003-23003/com.myname.randomize I/TAD: onPause: 29
08-22 11:18:20.556 23003-23003/com.myname.randomize I/TAD: onStop: 36
08-22 11:18:20.556 23003-23003/com.myname.randomize V/ActivityThread: updateVisibility : ActivityRecord{77182d1 token=android.os.BinderProxy@de81d49 {com.myname.randomize/com.myname.randomize.MainActivity}} show : false
08-22 11:18:20.576 23003-23029/com.myname.randomize E/libEGL: ------------------------------------------------
08-22 11:18:20.576 23003-23029/com.myname.randomize E/libEGL: HWUI Context(-1508094336) Damaged Report-Shader
08-22 11:18:20.576 23003-23029/com.myname.randomize E/libEGL: HWUI   Shaders(1):
08-22 11:18:20.576 23003-23029/com.myname.randomize E/libEGL: HWUI     Unit 0) DAMAGED Handle(7)
08-22 11:18:20.576 23003-23029/com.myname.randomize E/libEGL: ------------------------------------------------
08-22 11:18:20.576 23003-23029/com.myname.randomize E/libGLESv2: HWUI Protection: wrong calling from app context F:ES2-glDeleteShader, handle(7)
08-22 11:18:20.576 23003-23029/com.myname.randomize D/libEGL: eglTerminate EGLDisplay = 0x7f9fb7b228

我的应用程序在这一点上非常准确,我不知道可能出现什么问题。我甚至不了解这些日志的大部分含义,因此任何解释和指导如何开始将是一个巨大的帮助。

当我为此活动打开loyout编辑器时,它说我有渲染问题。这是完整的信息。

 Rendering Problems The following classes could not be instantiated:
    - android.support.v7.widget.Toolbar (Open Class, Show Exception, Clear Cache)
    - android.support.v7.internal.app.WindowDecorActionBar (Open Class, Show Exception, Clear Cache)
 Tip: Use View.isInEditMode() in your custom views to skip code or show sample data when shown in the IDE  
Exception Details java.lang.NoSuchMethodError: android.graphics.drawable.VectorDrawable_Delegate.nCreateTreeFromCopy(JJ)J   
at android.graphics.drawable.VectorDrawable.nCreateTreeFromCopy(VectorDrawable.java:-1)   
at android.graphics.drawable.VectorDrawable.access$400(VectorDrawable.java:204)   
at android.graphics.drawable.VectorDrawable$VectorDrawableState.createNativeTreeFromCopy(VectorDrawable.java:837)   
at android.graphics.drawable.VectorDrawable$VectorDrawableState.<init>(VectorDrawable.java:812)   
at android.graphics.drawable.VectorDrawable.mutate(VectorDrawable.java:268)   
at android.support.v7.internal.widget.TintManager.getDrawable(TintManager.java:178)
at android.support.v7.internal.widget.TintManager.getDrawable(TintManager.java:166)
at android.support.v7.internal.widget.TintTypedArray.getDrawable(TintTypedArray.java:62)   
at android.support.v7.widget.Toolbar.<init>(Toolbar.java:249)   
at android.support.v7.widget.Toolbar.<init>(Toolbar.java:191)   
at java.lang.reflect.Constructor.newInstance(Constructor.java:422)   
at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:727)   
at android.view.LayoutInflater.rInflate_Original(LayoutInflater.java:858)   
at android.view.LayoutInflater_Delegate.rInflate(LayoutInflater_Delegate.java:70) 
at android.view.LayoutInflater.rInflate(LayoutInflater.java:834)   
at android.view.LayoutInflater.rInflateChildren(LayoutInflater.java:821)   
at android.view.LayoutInflater.rInflate_Original(LayoutInflater.java:861)   
at android.view.LayoutInflater_Delegate.rInflate(LayoutInflater_Delegate.java:70)  
at android.view.LayoutInflater.rInflate(LayoutInflater.java:834)   
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 com.android.layoutlib.bridge.bars.BridgeActionBar.<init>(BridgeActionBar.java:84)   
at com.android.layoutlib.bridge.bars.AppCompatActionBar.<init>(AppCompatActionBar.java:59)   
at com.android.layoutlib.bridge.impl.Layout.createActionBar(Layout.java:240) 
at com.android.layoutlib.bridge.impl.Layout.<init>(Layout.java:152) Copy stack to clipboard  onMeasure error (Details) (2 similar errors not shown)

我已经尝试清除缓存,清理和重建,但我不知道如何让它消失。我认为这可能是错误消息的原因的一部分。 (我在研究这个错误消息时发现的东西,它可能与你不应该更改UI有关,这是相关的吗?)

0 个答案:

没有答案