Ошибка SELinux. Возможно, вызвано ActionBarActivity на Samsung Galaxy Mini S4
Когда я создаю новый проект, выбирая "Пустое действие" в Android Studio, и создаю его без внесения каких-либо изменений, я получаю сообщение об ошибке и предупреждения при тестировании на моем Samsung Galaxy S4 mini. У меня нет этих проблем, хотя на эмуляторе Nexus 5.
Я оглянулся и думаю, что это связано с использованием ActionBarActivity. Я убедился, что мой S4 mini - более высокая версия, чем выбранный мной минимальный SDK - API 15.
Я изменил свои расширения "ActionBarActivity" на "Activity", и ошибка исчезла.
У меня вопрос: я не понимаю, почему это происходит, но что еще важнее, есть ли у меня возможность использовать панель действий? На S4 Mini все хорошо, но я получаю эту ошибку.
У меня последняя версия Android Studio (1.1.0). У меня не работает отладчик. (Я видел, как кто-то упоминал об этом в старом посте)
Вот logcat, ошибка в первой строке:
03-30 20:24:20.489 11164-11164/erasenothigntest.com.erase_testproject E/SELinux﹕ selinux_android_seapp_context_reload: seapp_contexts file is loaded from /seapp_contexts
03-30 20:24:20.489 11164-11164/erasenothigntest.com.erase_testproject D/dalvikvm﹕ Late-enabling CheckJNI
03-30 20:24:20.690 11164-11164/erasenothigntest.com.erase_testproject I/dalvikvm﹕ Could not find method android.view.ViewGroup.onNestedScrollAccepted, referenced from method android.support.v7.internal.widget.ActionBarOverlayLayout.onNestedScrollAccepted
03-30 20:24:20.700 11164-11164/erasenothigntest.com.erase_testproject W/dalvikvm﹕ VFY: unable to resolve virtual method 12208: Landroid/view/ViewGroup;.onNestedScrollAccepted (Landroid/view/View;Landroid/view/View;I)V
03-30 20:24:20.700 11164-11164/erasenothigntest.com.erase_testproject D/dalvikvm﹕ VFY: replacing opcode 0x6f at 0x0000
03-30 20:24:20.700 11164-11164/erasenothigntest.com.erase_testproject I/dalvikvm﹕ Could not find method android.view.ViewGroup.onStopNestedScroll, referenced from method android.support.v7.internal.widget.ActionBarOverlayLayout.onStopNestedScroll
03-30 20:24:20.700 11164-11164/erasenothigntest.com.erase_testproject W/dalvikvm﹕ VFY: unable to resolve virtual method 12214: Landroid/view/ViewGroup;.onStopNestedScroll (Landroid/view/View;)V
03-30 20:24:20.700 11164-11164/erasenothigntest.com.erase_testproject D/dalvikvm﹕ VFY: replacing opcode 0x6f at 0x0000
03-30 20:24:20.700 11164-11164/erasenothigntest.com.erase_testproject I/dalvikvm﹕ Could not find method android.support.v7.internal.widget.ActionBarOverlayLayout.stopNestedScroll, referenced from method android.support.v7.internal.widget.ActionBarOverlayLayout.setHideOnContentScrollEnabled
03-30 20:24:20.700 11164-11164/erasenothigntest.com.erase_testproject W/dalvikvm﹕ VFY: unable to resolve virtual method 9779: Landroid/support/v7/internal/widget/ActionBarOverlayLayout;.stopNestedScroll ()V
03-30 20:24:20.700 11164-11164/erasenothigntest.com.erase_testproject D/dalvikvm﹕ VFY: replacing opcode 0x6e at 0x000e
03-30 20:24:20.700 11164-11164/erasenothigntest.com.erase_testproject I/dalvikvm﹕ Could not find method android.content.res.TypedArray.getChangingConfigurations, referenced from method android.support.v7.internal.widget.TintTypedArray.getChangingConfigurations
03-30 20:24:20.710 11164-11164/erasenothigntest.com.erase_testproject W/dalvikvm﹕ VFY: unable to resolve virtual method 392: Landroid/content/res/TypedArray;.getChangingConfigurations ()I
03-30 20:24:20.710 11164-11164/erasenothigntest.com.erase_testproject D/dalvikvm﹕ VFY: replacing opcode 0x6e at 0x0002
03-30 20:24:20.710 11164-11164/erasenothigntest.com.erase_testproject I/dalvikvm﹕ Could not find method android.content.res.TypedArray.getType, referenced from method android.support.v7.internal.widget.TintTypedArray.getType
03-30 20:24:20.710 11164-11164/erasenothigntest.com.erase_testproject W/dalvikvm﹕ VFY: unable to resolve virtual method 414: Landroid/content/res/TypedArray;.getType (I)I
03-30 20:24:20.710 11164-11164/erasenothigntest.com.erase_testproject D/dalvikvm﹕ VFY: replacing opcode 0x6e at 0x0002
03-30 20:24:20.710 11164-11164/erasenothigntest.com.erase_testproject I/dalvikvm﹕ Could not find method android.content.res.Resources.getDrawable, referenced from method android.support.v7.internal.widget.ResourcesWrapper.getDrawable
03-30 20:24:20.710 11164-11164/erasenothigntest.com.erase_testproject W/dalvikvm﹕ VFY: unable to resolve virtual method 355: Landroid/content/res/Resources;.getDrawable (ILandroid/content/res/Resources$Theme;)Landroid/graphics/drawable/Drawable;
03-30 20:24:20.710 11164-11164/erasenothigntest.com.erase_testproject D/dalvikvm﹕ VFY: replacing opcode 0x6e at 0x0002
03-30 20:24:20.710 11164-11164/erasenothigntest.com.erase_testproject I/dalvikvm﹕ Could not find method android.content.res.Resources.getDrawableForDensity, referenced from method android.support.v7.internal.widget.ResourcesWrapper.getDrawableForDensity
03-30 20:24:20.710 11164-11164/erasenothigntest.com.erase_testproject W/dalvikvm﹕ VFY: unable to resolve virtual method 357: Landroid/content/res/Resources;.getDrawableForDensity (IILandroid/content/res/Resources$Theme;)Landroid/graphics/drawable/Drawable;
03-30 20:24:20.710 11164-11164/erasenothigntest.com.erase_testproject D/dalvikvm﹕ VFY: replacing opcode 0x6e at 0x0002
03-30 20:24:20.820 11164-11164/erasenothigntest.com.erase_testproject D/libEGL﹕ loaded /system/lib/egl/libEGL_adreno200.so
03-30 20:24:20.830 11164-11164/erasenothigntest.com.erase_testproject D/libEGL﹕ loaded /system/lib/egl/libGLESv1_CM_adreno200.so
03-30 20:24:20.830 11164-11164/erasenothigntest.com.erase_testproject D/libEGL﹕ loaded /system/lib/egl/libGLESv2_adreno200.so
03-30 20:24:20.840 11164-11164/erasenothigntest.com.erase_testproject I/Adreno200-EGL﹕ <qeglDrvAPI_eglInitialize:265>: EGL 1.4 QUALCOMM build: AYELDER_AU_LINUX_ANDROID_JB_2.5.5.04.02.02.092.023+PATCH[ES]_msm8960_JB_2.5.5_CL3556704_release_ENGG (CL3556704)
Build Date: 05/17/13 Fri
Local Branch:
Remote Branch: quic/jb_2.5.5
Local Patches: 34c9e193f12610d3e68dabd6198d2c4bfbc66974 RB: Update the master timestamp of the hw_image in rb_texture_update_aliased
Reconstruct Branch: AU_LINUX_ANDROID_JB_2.5.5.04.02.02.092.023 + 01d3c78 + e6f0547 + LOCAL_PATCH[ES]
03-30 20:24:20.900 11164-11164/erasenothigntest.com.erase_testproject D/OpenGLRenderer﹕ Enabling debug mode 0
03-30 20:25:36.180 11164-11170/erasenothigntest.com.erase_testproject D/dalvikvm﹕ Debugger has detached; object registry had 1 entries
03-30 20:26:04.190 11954-11954/erasenothigntest.com.erase_testproject I/dalvikvm﹕ Could not find method android.view.ViewGroup.onNestedScrollAccepted, referenced from method android.support.v7.internal.widget.ActionBarOverlayLayout.onNestedScrollAccepted
03-30 20:26:04.190 11954-11954/erasenothigntest.com.erase_testproject W/dalvikvm﹕ VFY: unable to resolve virtual method 12208: Landroid/view/ViewGroup;.onNestedScrollAccepted (Landroid/view/View;Landroid/view/View;I)V
03-30 20:26:04.190 11954-11954/erasenothigntest.com.erase_testproject D/dalvikvm﹕ VFY: replacing opcode 0x6f at 0x0000
03-30 20:26:04.190 11954-11954/erasenothigntest.com.erase_testproject I/dalvikvm﹕ Could not find method android.view.ViewGroup.onStopNestedScroll, referenced from method android.support.v7.internal.widget.ActionBarOverlayLayout.onStopNestedScroll
03-30 20:26:04.190 11954-11954/erasenothigntest.com.erase_testproject W/dalvikvm﹕ VFY: unable to resolve virtual method 12214: Landroid/view/ViewGroup;.onStopNestedScroll (Landroid/view/View;)V
03-30 20:26:04.190 11954-11954/erasenothigntest.com.erase_testproject D/dalvikvm﹕ VFY: replacing opcode 0x6f at 0x0000
03-30 20:26:04.190 11954-11954/erasenothigntest.com.erase_testproject I/dalvikvm﹕ Could not find method android.support.v7.internal.widget.ActionBarOverlayLayout.stopNestedScroll, referenced from method android.support.v7.internal.widget.ActionBarOverlayLayout.setHideOnContentScrollEnabled
03-30 20:26:04.190 11954-11954/erasenothigntest.com.erase_testproject W/dalvikvm﹕ VFY: unable to resolve virtual method 9779: Landroid/support/v7/internal/widget/ActionBarOverlayLayout;.stopNestedScroll ()V
03-30 20:26:04.190 11954-11954/erasenothigntest.com.erase_testproject D/dalvikvm﹕ VFY: replacing opcode 0x6e at 0x000e
03-30 20:26:04.200 11954-11954/erasenothigntest.com.erase_testproject I/dalvikvm﹕ Could not find method android.content.res.TypedArray.getChangingConfigurations, referenced from method android.support.v7.internal.widget.TintTypedArray.getChangingConfigurations
03-30 20:26:04.200 11954-11954/erasenothigntest.com.erase_testproject W/dalvikvm﹕ VFY: unable to resolve virtual method 392: Landroid/content/res/TypedArray;.getChangingConfigurations ()I
03-30 20:26:04.200 11954-11954/erasenothigntest.com.erase_testproject D/dalvikvm﹕ VFY: replacing opcode 0x6e at 0x0002
03-30 20:26:04.200 11954-11954/erasenothigntest.com.erase_testproject I/dalvikvm﹕ Could not find method android.content.res.TypedArray.getType, referenced from method android.support.v7.internal.widget.TintTypedArray.getType
03-30 20:26:04.200 11954-11954/erasenothigntest.com.erase_testproject W/dalvikvm﹕ VFY: unable to resolve virtual method 414: Landroid/content/res/TypedArray;.getType (I)I
03-30 20:26:04.200 11954-11954/erasenothigntest.com.erase_testproject D/dalvikvm﹕ VFY: replacing opcode 0x6e at 0x0002
03-30 20:26:04.200 11954-11954/erasenothigntest.com.erase_testproject I/dalvikvm﹕ Could not find method android.content.res.Resources.getDrawable, referenced from method android.support.v7.internal.widget.ResourcesWrapper.getDrawable
03-30 20:26:04.200 11954-11954/erasenothigntest.com.erase_testproject W/dalvikvm﹕ VFY: unable to resolve virtual method 355: Landroid/content/res/Resources;.getDrawable (ILandroid/content/res/Resources$Theme;)Landroid/graphics/drawable/Drawable;
03-30 20:26:04.200 11954-11954/erasenothigntest.com.erase_testproject D/dalvikvm﹕ VFY: replacing opcode 0x6e at 0x0002
03-30 20:26:04.200 11954-11954/erasenothigntest.com.erase_testproject I/dalvikvm﹕ Could not find method android.content.res.Resources.getDrawableForDensity, referenced from method android.support.v7.internal.widget.ResourcesWrapper.getDrawableForDensity
03-30 20:26:04.200 11954-11954/erasenothigntest.com.erase_testproject W/dalvikvm﹕ VFY: unable to resolve virtual method 357: Landroid/content/res/Resources;.getDrawableForDensity (IILandroid/content/res/Resources$Theme;)Landroid/graphics/drawable/Drawable;
03-30 20:26:04.200 11954-11954/erasenothigntest.com.erase_testproject D/dalvikvm﹕ VFY: replacing opcode 0x6e at 0x0002
03-30 20:26:04.270 11954-11954/erasenothigntest.com.erase_testproject D/libEGL﹕ loaded /system/lib/egl/libEGL_adreno200.so
03-30 20:26:04.320 11954-11954/erasenothigntest.com.erase_testproject D/libEGL﹕ loaded /system/lib/egl/libGLESv1_CM_adreno200.so
03-30 20:26:04.320 11954-11954/erasenothigntest.com.erase_testproject D/libEGL﹕ loaded /system/lib/egl/libGLESv2_adreno200.so
03-30 20:26:04.320 11954-11954/erasenothigntest.com.erase_testproject I/Adreno200-EGL﹕ <qeglDrvAPI_eglInitialize:265>: EGL 1.4 QUALCOMM build: AYELDER_AU_LINUX_ANDROID_JB_2.5.5.04.02.02.092.023+PATCH[ES]_msm8960_JB_2.5.5_CL3556704_release_ENGG (CL3556704)
Build Date: 05/17/13 Fri
Local Branch:
Remote Branch: quic/jb_2.5.5
Local Patches: 34c9e193f12610d3e68dabd6198d2c4bfbc66974 RB: Update the master timestamp of the hw_image in rb_texture_update_aliased
Reconstruct Branch: AU_LINUX_ANDROID_JB_2.5.5.04.02.02.092.023 + 01d3c78 + e6f0547 + LOCAL_PATCH[ES]
03-30 20:26:04.360 11954-11954/erasenothigntest.com.erase_testproject D/OpenGLRenderer﹕ Enabling debug mode 0
Вот код MainActivity.xml:
package erasenothigntest.com.erase_testproject;
import android.support.v7.app.ActionBarActivity;
import android.os.Bundle;
import android.view.Menu;
import android.view.MenuItem;
public class MainActivity extends ActionBarActivity {
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
}
@Override
public boolean onCreateOptionsMenu(Menu menu) {
// Inflate the menu; this adds items to the action bar if it is present.
getMenuInflater().inflate(R.menu.menu_main, menu);
return true;
}
@Override
public boolean onOptionsItemSelected(MenuItem item) {
// Handle action bar item clicks here. The action bar will
// automatically handle clicks on the Home/Up button, so long
// as you specify a parent activity in AndroidManifest.xml.
int id = item.getItemId();
//noinspection SimplifiableIfStatement
if (id == R.id.action_settings) {
return true;
}
return super.onOptionsItemSelected(item);
}
}
А вот файл макета XML:
<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" android:paddingLeft="@dimen/activity_horizontal_margin"
android:paddingRight="@dimen/activity_horizontal_margin"
android:paddingTop="@dimen/activity_vertical_margin"
android:paddingBottom="@dimen/activity_vertical_margin" tools:context=".MainActivity">
<TextView android:text="@string/hello_world" android:layout_width="wrap_content"
android:layout_height="wrap_content" />
</RelativeLayout>
Спасибо