我正在为Android机箱开发一个专有的应用程序,它读取HDMI输入,并在屏幕的一部分显示它。为此,我们使用了R9迷你安卓电视盒(链接)。供应商提供了示例应用程序的源代码来读取HDMI输入,但该应用程序未能启动抛出错误弹出(不幸的是,SourceIn已经停止)。
以下是异常堆栈跟踪:
02-28 15:38:36.988 3232-3232/rtk.com.RealtekSourceIn W/art: Method processed more than once: void android.app.Instrumentation.callActivityOnResume(android.app.Activity)
02-28 15:38:37.090 3232-3232/rtk.com.RealtekSourceIn A/art: art/runtime/barrier.cc:90] Check failed: count_ == 0 (count_=-1, 0=0) Attempted to destroy barrier with non zero count
02-28 15:38:37.090 3232-3232/rtk.com.RealtekSourceIn A/art: art/runtime/runtime.cc:366] Runtime aborting --- recursively, so no thread-specific detail!
02-28 15:38:37.090 3232-3232/rtk.com.RealtekSourceIn A/art: art/runtime/runtime.cc:366]
02-28 15:38:37.090 3232-3232/rtk.com.RealtekSourceIn A/libc: Fatal signal 6 (SIGABRT), code -6 in tid 3232 (RealtekSourceIn)崩溃是从库依赖项中的代码启动的。调试解压缩的.class文件。下面是引发上述错误的代码:
static {
System.loadLibrary("realtek_runtime");
}我在/system/lib/文件夹中看到了.so文件,发现librealtek_runtime.so存在,所以我无法理解为什么loadLibrary会失败。
以下是有关守则:
RTKSourceInActivity:
public class RTKSourceInActivity extends Activity {
private String TAG="HDMIRxActivity";
private ViewGroup m_Root;
private HDMIRxPlayer m_HDMIRxPlayer = null;
private final Handler mHandler = new Handler();
private byte[] mCapture;
private static final long SCREENSHOT_SLOT = 200;
private boolean mIsFullScreen = true;
private File mRecordFile;
private boolean mRecordOn = false;
@Override
public void onResume() {
Log.d(TAG,"onResume");
super.onResume();
if(hasRtkMusicPlaybackService()) {
Intent i = new Intent("com.android.music.musicservicecommand");
i.putExtra("command", "stop");
sendBroadcast(i);
}
m_Root = (ViewGroup) findViewById(R.id.root);
m_HDMIRxPlayer = new HDMIRxPlayer(this, m_Root, 1920, 1080);
}
...
}HDMIRxPlayer:
public HDMIRxPlayer(Context context, ViewGroup parent, int width, int height)
{
mContext = context;
mSurfaceView = new SurfaceView(context);
mSurfaceHolder = mSurfaceView.getHolder();
mSurfaceHolder.addCallback(HDMIRXCallback);
mSurfaceHolder.setFixedSize(width, height);
parent.addView(mSurfaceView);
mHDMIRX = new RtkHDMIRxManager(); // Exception here
IntentFilter hdmiRxFilter = new IntentFilter(HDMIRxStatus.ACTION_HDMIRX_PLUGGED);
mContext.registerReceiver(hdmiRxHotPlugReceiver, hdmiRxFilter);
}RtkHDMIRxManager是供应商提供的依赖jar (realtek- .class )中的一个.class。
当我在反编译版本的RtkHDMIRxManager中放置调试点时,我发现了以下异常:
static {
System.loadLibrary("realtek_runtime");
}任何指向解决办法的方向都会有很大帮助。
发布于 2017-03-01 10:11:28
2种解决办法:
android:sharedUserId="android.uid.system"并与相应的pem和pk8文件一起签名应用程序。https://stackoverflow.com/questions/42506579
复制相似问题