标签: android-7.1-nougat

Android 7 Native Crash:libc.so tgkill

我看到这个本机崩溃与以下堆栈跟踪.

这仅在Android 7.0和7.1中发生.该应用程序没有添加任何新内容,该应用程序已投入生产几年,但随着更多设备更新到Nougat,此崩溃现在经常发生并且正在变得令人讨厌.

任何意见,将不胜感激.

native: pc 000000000007a6c4  /system/lib64/libc.so (tgkill+8)
  native: pc 0000000000077920  /system/lib64/libc.so (pthread_kill+64)
  native: pc 000000000002538c  /system/lib64/libc.so (raise+24)
  native: pc 000000000001d24c  /system/lib64/libc.so (abort+52)
  native: pc 000000000001225c  /system/lib64/libcutils.so (__android_log_assert+224)
  native: pc 00000000000610e0  /system/lib64/libhwui.so
  native: pc 000000000003908c  /system/lib64/libhwui.so
  native: pc 000000000003609c  /system/lib64/libhwui.so
  native: pc 000000000003b4fc  /system/lib64/libhwui.so
  native: pc 000000000003c520  /system/lib64/libhwui.so
  native: pc 000000000003e694  /system/lib64/libhwui.so (_ZN7android10uirenderer12renderthread12RenderThread10threadLoopEv+152)
  native: pc 00000000000127f0  /system/lib64/libutils.so (_ZN7android6Thread11_threadLoopEPv+336)
  native: pc 00000000000a50b0  /system/lib64/libandroid_runtime.so (_ZN7android14AndroidRuntime15javaThreadShellEPv+116)
  native: pc 00000000000770f4  /system/lib64/libc.so (_ZL15__pthread_startPv+204)
  native: pc 000000000001e7d0  /system/lib64/libc.so (__start_thread+16)
Run Code Online (Sandbox Code Playgroud)

以下是受影响的设备列表: 在此输入图像描述

更新7月18日:

仍然无法找到这个的根,所以我决定购买一个出现次数最多且价格合理的设备,结果是三星Galaxy J3 2017版本与Android 7.0.但不幸的是仍然无法重现崩溃. …

crash android native android-7.0-nougat android-7.1-nougat

96
推荐指数
2
解决办法
3万
查看次数

ANR错误"广播Intent {act = com.google.firebase.INSTANCE_ID_EVENT"..."FirebaseInstanceIdInternalReceiver"for Android 7.1和8.0

我们有一个Android应用,最近报告了很多ANR错误.这仅发生在Android 7.1和8.0上(不在例如4.4,5.0或6.0上).ANR是:

Broadcast of Intent { act=com.google.firebase.INSTANCE_ID_EVENT flg=0x14 cmp=com.our.package.name/com.google.firebase.iid.FirebaseInstanceIdInternalReceiver (has extras) }

问题是:为什么我们得到这个ANR,我们可以做些什么来避免这种情况?请注意,这在早期的Android版本中运行良好,我认为这证明我们没有做任何导致ANR的新手错误.

我很难再现这个bug.由于它仅适用于Android 7.1和8.0,我认为它可能与新的打盹模式和节省电池有关,但即使使用adb shell dumpsys deviceidle force-idle ,测试也不能重现这个问题,也没有放在SystemClock.sleep(20000);几个地方.

我们的代码InstanceIdService是:

public class InstanceIdService extends FirebaseInstanceIdService {
    private Analytics mAnalytics;

    @Override
    public void onCreate() {
        super.onCreate();

        mAnalytics = new AnalyticsImpl();
        boolean isFullVersion = getApplicationContext().getPackageName().endsWith("full");
        mAnalytics.init(getApplicationContext(), isFullVersion);
    }

    @Override
    public void onTokenRefresh() {
        boolean initialLoginSucceeded = OurAppNameApplication.getInstance().getSettings().getInitialLoginSucceeded();
        mAnalytics.logEvent("FCM_Token_Refresh_Triggered", "initialLoginSucceeded", String.valueOf(initialLoginSucceeded));

        if (initialLoginSucceeded) { // We only report the FCM token to our server …
Run Code Online (Sandbox Code Playgroud)

android firebase firebase-cloud-messaging android-7.1-nougat android-8.0-oreo

39
推荐指数
2
解决办法
5211
查看次数

Pixel启动程序在Android 7.1.1(API 25)模拟器中不断出现问题

我使用android 7.1.1(API 25)CPU X86创建了一个模拟器.当我启动模拟器时它显示pixel launcher keeps stopping问题.我已经检查过CPU x86_64但同样的问题.

这是截图:

在此输入图像描述

这是我的详细配置:

在此输入图像描述

android android-emulator android-7.1-nougat

27
推荐指数
4
解决办法
3万
查看次数

Android Nougat:TextureView不支持显示背景drawable

我一直在我的Android应用程序中使用TextureView,它工作正常.就在最近,我在Android设备上使用Android API 25(7.1.2)测试了我的代码.相同的代码现在不起作用并抛出错误java.lang.UnsupportedOperationException: TextureView doesn't support displaying a background drawable.

我知道void setBackgroundDrawable (Drawable background)已经被弃用了很长时间,现在它已经被删除了.但我甚至不是自己设定的.

我正在使用最新的buildTools和SDK.所以,我想知道为什么没有更新textureView内部实现.

这是相关的堆栈跟踪:

java.lang.UnsupportedOperationException: TextureView doesn't support displaying a background drawable
at android.view.TextureView.setBackgroundDrawable(TextureView.java:315)
at android.view.View.setBackground(View.java:18124)
at android.view.View.<init>(View.java:4573)
at android.view.View.<init>(View.java:4082)
at android.view.TextureView.<init>(TextureView.java:159)
at com.abdulwasaetariq.xyz.ui.customView.AutoFitTextureView.<init>(AutoFitTextureView.java:24)
at com.abdulwasaetariq.xyz.ui.customView.AutoFitTextureView.<init>(AutoFitTextureView.java:20)
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
[...]
at java.lang.Thread.run(Thread.java:745)
Run Code Online (Sandbox Code Playgroud)

这是我如何使用我的(尚未定制)自定义TextureView:

<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:tools="http://schemas.android.com/tools"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    tools:context="com.abdulwasaetariq.xyz.ui.activity.MainActivity">

    <com.abdulwasaetariq.xyz.ui.customView.AutoFitTextureView
        android:id="@+id/texture"
        android:layout_width="1080px"
        android:layout_height="1080px"
        android:layout_alignParentStart="true"
        android:layout_alignParentTop="true" />

</RelativeLayout>
Run Code Online (Sandbox Code Playgroud)

这是我的相关AutoFitTextureView.java: enter code here

public class AutoFitTextureView extends TextureView {

private …
Run Code Online (Sandbox Code Playgroud)

android android-layout android-textureview android-7.1-nougat

25
推荐指数
2
解决办法
5956
查看次数

IllegalArgumentException:列'_data'不存在

在Nougat中,此功能无效.

String path = getRealPathFromURI(this, getIntent().getParcelableExtra(Intent.EXTRA_STREAM));
Run Code Online (Sandbox Code Playgroud)


public String getRealPathFromURI(Context context, Uri contentUri) {
    Cursor cursor = null;
    try {
        String[] proj = {MediaStore.Images.Media.DATA};
        cursor = context.getContentResolver().query(contentUri, proj, null, null, null);
        if (cursor == null) return contentUri.getPath();
        int column_index = cursor.getColumnIndexOrThrow(MediaStore.Images.Media.DATA);
        cursor.moveToFirst();
        return cursor.getString(column_index);
    } finally {
        if (cursor != null) {
            cursor.close();
        }
    }
}
Run Code Online (Sandbox Code Playgroud)

崩溃日志:

java.lang.RuntimeException: Unable to start activity ComponentInfo{class path}: java.lang.IllegalArgumentException: column '_data' does not exist
   at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2659)
   at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2724)
   at android.app.ActivityThread.-wrap12(ActivityThread.java)
   at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1473)
   at android.os.Handler.dispatchMessage(Handler.java:102)
   at …
Run Code Online (Sandbox Code Playgroud)

android android-7.0-nougat android-7.1-nougat

23
推荐指数
3
解决办法
1万
查看次数

E/libEGL:validate_display:99错误3008(EGL_BAD_DISPLAY)android os 7.1牛轧糖

在Android OS 7.1 Nougat上运行我的应用程序时出现以下错误.

E/libEGL:validate_display:99错误3008(EGL_BAD_DISPLAY)[04-21 10:19:18.788 4410:4622 D /]
HostConnection :: get()建立新主机连接0x7db835ad6200,tid 4622

以前有人遇到过这个问题吗?

导致此错误的原因是什么?

这是什么解决方案?

android android-7.1-nougat

22
推荐指数
1
解决办法
6277
查看次数

Android牛轧糖中的通知中未显示图标

我研究了这个,发现它addAction (int icon, CharSequence title, PendingIntent intent)已被弃用,所以我用过addAction (Notification.Action action).在这两种情况下,都无法看到图标.

NotificationCompat.Action action = new NotificationCompat.Action.Builder(R.drawable.ic_share, "", pendingIntent).build();

notificationBuilder.addAction(action);
Run Code Online (Sandbox Code Playgroud)

文本似乎工作,但我把它留空了,因此在主图像下面有一个空的空间,其中应该显示图标

android android-notifications android-7.1-nougat

20
推荐指数
1
解决办法
6262
查看次数

列出存储在用户凭据中的证书

在Android 7 Nougat中,用户安装的证书转到"用户凭据"而不是"可信凭证"(由系统凭据和用户凭证组成).

我过去通过以下方式访问"受信任的凭据":

KeyStore keystore = KeyStore.getInstance("AndroidCAStore");
Run Code Online (Sandbox Code Playgroud)

通过上面的代码,我可以访问系统和用户可信凭证.

但现在,在Android 7中,用户安装的证书将转到一个名为"用户凭据"的单独位置Settings --> Security --> User credentials.

我的问题是如何以编程方式列出User credentialsAndroid 7 中的凭据?

ssl android pkcs#12 android-7.0-nougat android-7.1-nougat

19
推荐指数
2
解决办法
8411
查看次数

以编程方式接受Nougat中的呼叫

从一年开始,我一直在研究物联网产品,所附的应用程序工作正常.现在我无法在更高版本的android中以编程方式接受调用.功能对产品非常重要.任何帮助都非常感谢.

2016年11月安全补丁更新之前,Runtime.getRunTime.exec("Command")以编程方式接受呼叫工作正常.

Runtime.getRuntime().exec("input keyevent " +Integer.toString(KeyEvent.KEYCODE_HEADSETHOOK));
Run Code Online (Sandbox Code Playgroud)

如何在Nougat版本的android中实现它.

寻找任何类型的黑客.

我已经为增强功能打开了一个帖子.

https://code.google.com/p/android/issues/detail?can=2&start=0&num=100&q=&colspec=ID%20Status%20Priority%20Owner%20Summary%20Stars%20Reporter%20Opened&groupby=&sort=&id=231938

注意*如果您中的任何一方遇到同样的问题,请请求加入Android Dev Team并提供用户获得运行时许可的条款.按照上面提到的URL来请求.

android android-security android-7.0-nougat android-7.1-nougat

19
推荐指数
2
解决办法
5224
查看次数

Android SDK版本25 - android.support v7:25给出"没有找到匹配@ color/hint_foreground_material_light的资源"Adobe Creative SDK?

将compileSdkVersion切换为25并使用最新的android.support库版本后,我在gradle sync/build时遇到以下错误.

compile 'com.android.support:appcompat-v7:25.0.0'
compile 'com.android.support:design:25.0.0'
compile 'com.android.support:recyclerview-v7:25.0.0'
Run Code Online (Sandbox Code Playgroud)

错误:

No resource found that matches the given name (at 'android:textColorHint' with value '@color/hint_foreground_material_light').
Run Code Online (Sandbox Code Playgroud)

任何的想法?

编辑: 我认为这是因为Adobe Creative SDK ...不确定.其他人在使用SDK 25时运行良好.

相关问题:使用支持库和adobe creative SDK for android时出错

我们不应该等待解决方案...也许我正在使用更新的版本('com.adobe.creativesdk:image:4.6.3')

EDIT2:我发现这是来自"fengdai alertdialog",这是一个Adobe SDK依赖.但是已经弃用了!我向Adobe寻求一些支持.

android android-support-library adobecreativesdk android-7.1-nougat

17
推荐指数
1
解决办法
2万
查看次数