Android Studioda Bir proje geliştirmekteyim ve Şöyle bir hatayla karşılaştım
E/AndroidRuntime: FATAL EXCEPTION: main
Process: com.mixerchat.dating, PID: 7525
java.lang.IllegalArgumentException: No view found for id 0x7f080014 (com.mixerchat.dating:id/Login_A) for fragment Enable_location_F{3a7c810 #1 id=0x7f080014}
at androidx.fragment.app.FragmentManagerImpl.moveToState(FragmentManager.java:1454)
at androidx.fragment.app.FragmentManagerImpl.moveFragmentToExpectedState(FragmentManager.java:1784)
at androidx.fragment.app.FragmentManagerImpl.moveToState(FragmentManager.java:1852)
at androidx.fragment.app.BackStackRecord.executeOps(BackStackRecord.java:802)
at androidx.fragment.app.FragmentManagerImpl.executeOps(FragmentManager.java:2625)
at androidx.fragment.app.FragmentManagerImpl.executeOpsTogether(FragmentManager.java:2411)
at androidx.fragment.app.FragmentManagerImpl.removeRedundantOperationsAndExecute(FragmentManager.java:2366)
at androidx.fragment.app.FragmentManagerImpl.execPendingActions(FragmentManager.java:2273)
at androidx.fragment.app.FragmentManagerImpl$1.run(FragmentManager.java:733)
at android.os.Handler.handleCallback(Handler.java:751)
at android.os.Handler.dispatchMessage(Handler.java:95)
at android.os.Looper.loop(Looper.java:154)
at android.app.ActivityThread.main(ActivityThread.java:6776)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1518)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1408)
Hata dönen Java Kodu
private void enable_location() {
Enable_location_F enable_location_f = new Enable_location_F();
FragmentTransaction transaction = getSupportFragmentManager().beginTransaction();
transaction.setCustomAnimations(R.anim.in_from_right, R.anim.out_to_left,R.anim.in_from_left,R.anim.out_to_right);
getSupportFragmentManager().popBackStackImmediate();
transaction.replace(R.id.Login_A, enable_location_f).addToBackStack(null).commit();
}
Activity_Login.xml kodları
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:id="@+id/Login_A"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:background="@color/white"
tools:context="com.mixerchat.dating.Accounts.Login_A">
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical"
android:fillViewport="true">
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_centerInParent="true"
android:orientation="vertical"
android:layout_marginTop="15dp">
android:layout_width="match_parent"
android:layout_height="0dp"
app:layout_heightPercent="62%"
android:id="@+id/upperlayout"
android:layout_weight="1">
android:id="@+id/pager"
android:background="@color/white"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:overScrollMode="always"
android:layout_above="@+id/indicator"/>
android:id="@+id/indicator"
android:layout_width="match_parent"
android:layout_height="30dp"
app:tabBackground="@drawable/d_indicator_background"
app:tabGravity="center"
app:tabIndicatorHeight="0dp"
android:layout_alignParentBottom="true"
/>
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginLeft="30dp"
android:layout_marginRight="30dp"
android:layout_below="@+id/upperlayout"
android:orientation="vertical">
android:layout_width="match_parent"
android:layout_height="50dp"
android:layout_marginTop="10dp"
android:background="@drawable/ic_fb_btn_background">
android:layout_width="28dp"
android:layout_height="28dp"
app:srcCompat="@drawable/ic_facebook"
android:layout_marginLeft="10dp"
android:layout_centerVertical="true"/>
android:layout_width="match_parent"
android:layout_height="50dp"
android:textColor="@color/white"
android:textAllCaps="true"
android:textSize="14dp"
android:text="Facebook ile Giriş Yap"
style="?android:attr/borderlessButtonStyle"
android:onClick="Login"
/>
android:layout_width="match_parent"
android:layout_height="50dp"
android:layout_marginTop="10dp"
android:id="@+id/gmail_login_layout"
android:background="@drawable/ic_google_background">
android:layout_width="28dp"
android:layout_height="28dp"
app:srcCompat="@drawable/ic_gmail"
android:layout_marginLeft="10dp"
android:layout_centerVertical="true"/>
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerInParent="true"
android:textColor="@color/black"
android:clickable="false"
android:textAllCaps="true"
android:textSize="14dp"
style="?android:attr/borderlessButtonStyle"
android:background="@color/transparent"
android:text="Google ile Giriş Yap"/>
android:layout_width="match_parent"
android:layout_height="30dp"
android:layout_marginTop="10dp"
android:id="@+id/phone_login_layout">
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerInParent="true"
android:textColor="@color/black"
android:clickable="false"
android:textSize="13dp"
android:background="@color/transparent"
style="?android:attr/borderlessButtonStyle"
android:text="Telefon Numaram ile Giriş Yap"/>
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:textAlignment="center"
android:textColor="@color/dimgray"
android:text="Bize güvenebilirsiniz \n Bilgileriniz 3. Part Kişilerle Paylaşılmamaktadır."
android:layout_marginTop="10dp"
android:lineSpacingExtra="7dp"/>
Yardımlarınızı Beklerim ...