java应用程序因手机中的包含标签而崩溃
我在activity_main中加入了一个布局,但每次我尝试运行应用程序时,它都会崩溃。我用了好几部手机,但结果都一样。我尝试了包括一个不同的布局,它工作得很好。我正在尝试添加一个简单的登录页面
日志如下:
019-08-04 22:53:39.178 25564-25613/? D/CACHE_HINTS: Entering madvise file 2019-08-04 22:53:39.182 3242-4958/? D/SyncManager: userId - 0 auto - true 2019-08-04 22:53:39.183 3242-4958/? D/SyncManager: userId - 0 auto - true 2019-08-04 22:53:39.184 2791-22291/? I/display: [PrimaryDisplay] [DYNAMIC_RECOMP] HWC_2_GLES by low FPS(0) 2019-08-04 22:53:39.184 25564-25613/? D/CACHE_HINTS: MADVISE_RAND file 0xc1f5c000 5341183 /data/data/com.facebook.katana/app_restricks/layouts.bin 2019-08-04 22:53:39.209 3242-4958/? D/SyncManager: userId - 0 auto - true 2019-08-04 22:53:39.233 3242-4958/? I/chatty: uid=1000(system) Binder:3242_12 identical 2 lines 2019-08-04 22:53:39.234 3242-4958/? D/SyncManager: userId - 0 auto - true 2019-08-04 22:53:39.244 25564-25598/? W/facebook.katan: !bang JNI is deprecated. Switch to @FastNative for void com.facebook.yoga.YogaNative.jni_YGNodeReset(long) 2019-08-04 22:53:39.244 25564-25598/? W/facebook.katan: !bang JNI is deprecated. Switch to @FastNative for void com.facebook.yoga.YogaNative.jni_YGNodeClearChildren(long) 2019-08-04 22:53:39.244 25564-25598/? W/facebook.katan: !bang JNI is deprecated. Switch to @FastNative for void com.facebook.yoga.YogaNative.jni_YGNodeInsertChild(long, long, int) 2019-08-04 22:53:39.244 25564-25598/? W/facebook.katan: !bang JNI is deprecated. Switch to @FastNative for void com.facebook.yoga.YogaNative.jni_YGNodeRemoveChild(long, long) 2019-08-04 22:53:39.244 25564-25598/? W/facebook.katan: !bang JNI is deprecated. Switch to @FastNative for void com.facebook.yoga.YogaNative.jni_YGNodeSetIsReferenceBaseline(long, boolean) 2019-08-04 22:53:39.244 25564-25598/? W/facebook.katan: !bang JNI is deprecated. Switch to @FastNative for boolean com.facebook.yoga.YogaNative.jni_YGNodeIsReferenceBaseline(long) 2019-08-04 22:53:39.244 25564-25598/? W/facebook.katan: !bang JNI is deprecated. Switch to @FastNative for void com.facebook.yoga.YogaNative.jni_YGNodeMarkDirty(long) 2019-08-04 22:53:39.244 25564-25598/? W/facebook.katan: !bang JNI is deprecated. Switch to @FastNative for void com.facebook.yoga.YogaNative.jni_YGNodeMarkDirtyAndPropogateToDescendants(long) 2019-08-04 22:53:39.244 25564-25598/? W/facebook.katan: !bang JNI is deprecated. Switch to @FastNative for boolean com.facebook.yoga.YogaNative.jni_YGNodeIsDirty(long) 2019-08-04 22:53:39.244 25564-25598/? W/facebook.katan: !bang JNI is deprecated. Switch to @FastNative for void com.facebook.yoga.YogaNative.jni_YGNodeSetHasMeasureFunc(long, boolean) 2019-08-04 22:53:39.244 25564-25598/? W/facebook.katan: !bang JNI is deprecated. Switch to @FastNative for void com.facebook.yoga.YogaNative.jni_YGNodeSetHasBaselineFunc(long, boolean) 2019-08-04 22:53:39.245 25564-25598/? W/facebook.katan: !bang JNI is deprecated. Switch to @FastNative for void com.facebook.yoga.YogaNative.jni_YGNodeCopyStyle(long, long) 2019-08-04 22:53:39.245 25564-25598/? W/facebook.katan: !bang JNI is deprecated. Switch to @FastNative for int com.facebook.yoga.YogaNative.jni_YGNodeStyleGetDirection(long) 2019-08-04 22:53:39.245 25564-25598/? W/facebook.katan: !bang JNI is deprecated. Switch to @FastNative for void com.facebook.yoga.YogaNative.jni_YGNodeStyleSetDirection(long, int) 2019-08-04 22:53:39.245 25564-25598/? W/facebook.katan: !bang JNI is deprecated. Switch to @FastNative for int com.facebook.yoga.YogaNative.jni_YGNodeStyleGetFlexDirection(long) 2019-08-04 22:53:39.245 25564-25598/? W/facebook.katan: !bang JNI is deprecated. Switch to @FastNative for void com.facebook.yoga.YogaNative.jni_YGNodeStyleSetFlexDirection(long, int) 2019-08-04 22:53:39.245 25564-25598/? W/facebook.katan: !bang JNI is deprecated. Switch to @FastNative for int com.facebook.yoga.YogaNative.jni_YGNodeStyleGetJustifyContent(long) 2019-08-04 22:53:39.245 25564-25598/? W/facebook.katan: !bang JNI is deprecated. Switch to @FastNative for void com.facebook.yoga.YogaNative.jni_YGNodeStyleSetJustifyContent(long, int) 2019-08-04 22:53:39.245 25564-25598/? W/facebook.katan: !bang JNI is deprecated. Switch to @FastNative for int com.facebook.yoga.YogaNative.jni_YGNodeStyleGetAlignItems(long) 2019-08-04 22:53:39.245 25564-25598/? W/facebook.katan: !bang JNI is deprecated. Switch to @FastNative for void com.facebook.yoga.YogaNative.jni_YGNodeStyleSetAlignItems(long, int) 2019-08-04 22:53:39.245 25564-25598/? W/facebook.katan: !bang JNI is deprecated. Switch to @FastNative for int com.facebook.yoga.YogaNative.jni_YGNodeStyleGetAlignSelf(long) 2019-08-04 22:53:39.245 25564-25598/? W/facebook.katan: !bang JNI is deprecated. Switch to @FastNative for void com.facebook.yoga.YogaNative.jni_YGNodeStyleSetAlignSelf(long, int) 2019-08-04 22:53:39.245 25564-25598/? W/facebook.katan: !bang JNI is deprecated. Switch to @FastNative for int com.facebook.yoga.YogaNative.jni_YGNodeStyleGetAlignContent(long) 2019-08-04 22:53:39.245 25564-25598/? W/facebook.katan: !bang JNI is deprecated. Switch to @FastNative for void com.facebook.yoga.YogaNative.jni_YGNodeStyleSetAlignContent(long, int) 2019-08-04 22:53:39.245 25564-25598/? W/facebook.katan: !bang JNI is deprecated. Switch to @FastNative for int com.facebook.yoga.YogaNative.
这是活动\登录。xml
<EditText
安卓:id="@+id/password"
安卓:layout_width="0dp"
安卓:layout_height="wrap_content"
安卓:layout_marginTop="10dp"
安卓:inputType="textPassword"
安卓:background="@drawable/text_background"
安卓:hint="Password"
安卓:textColorHint="@color/text_field"
安卓:padding="15dp"
安卓:drawableRight="@drawable/password"
app:layout_constraintEnd_toEndOf="@+id/guideline_right"
app:layout_constraintStart_toEndOf="@+id/guideline_left"
app:layout_constraintTop_toBottomOf="@+id/username"/>
<Button
安卓:id="@+id/Login_btn"
安卓:layout_width="0dp"
安卓:layout_height="wrap_content"
安卓:layout_marginStart="10dp"
安卓:layout_marginTop="30dp"
安卓:layout_marginEnd="10dp"
安卓:background="@drawable/button_background"
安卓:onClick="admin"
安卓:text="Log in"
app:layout_constraintEnd_toEndOf="@+id/guideline_right"
app:layout_constraintStart_toEndOf="@+id/guideline_left"
app:layout_constraintTop_toBottomOf="@+id/password" />
<TextView
安卓:id="@+id/forgot_password"
安卓:layout_width="wrap_content"
安卓:layout_height="wrap_content"
安卓:layout_marginTop="20dp"
安卓:text="Forgot your Password?"
安卓:textColor="@color/text_field"
app:layout_constraintEnd_toEndOf="@+id/guideline_right"
app:layout_constraintStart_toEndOf="@+id/guideline_left"
app:layout_constraintTop_toBottomOf="@+id/Login_btn" />
<View
安卓:id="@+id/footer"
安卓:layout_width="0dp"
安卓:layout_height="2dp"
安卓:layout_marginBottom="150dp"
安卓:background="#660066"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintStart_toEndOf="@id/guideline_left"
app:layout_constraintEnd_toEndOf="@id/guideline_right"/>
<TextView
安卓:id="@+id/noAccount"
安卓:text="Do not have an Account?"
安卓:layout_width="wrap_content"
安卓:layout_height="wrap_content"
app:layout_constraintTop_toBottomOf="@+id/footer"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintBottom_toBottomOf="parent"/>
<TextView
安卓:id="@+id/sign_up"
安卓:layout_width="wrap_content"
安卓:layout_height="wrap_content"
安卓:layout_marginBottom="50dp"
安卓:text="SignUp Here"
安卓:textColor="@color/text_field"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/noAccount" />
这是我们的主要活动。xml文件
<include layout="@layout/activity_login"/>
</安卓x.constraintlayout.widget.ConstraintLayout>
共 (0) 个答案