Why does app crash on start only on api 26 - java

I have an app working on every api completely but in android 8 api 26 it crashes and I don't know why this happend .
The app use sms sending and receiving permissions and I put all requestPermissions in activity and manifests. Target sdk is on 26
Here the logcat of android studio error when app crash:
hapital.com.BitCar E/AndroidRuntime: FATAL EXCEPTION: main Process: hapital.com.BitCar, PID: 25271
java.lang.RuntimeException: Unable to start activity ComponentInfo{hapital.com.BitCar/hapital.com.BitCar.MainActivity}: java.lang.IllegalArgumentException: Invalid destinationAddress
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2817)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2892)
at android.app.ActivityThread.-wrap11(Unknown Source:0)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1593)
at android.os.Handler.dispatchMessage(Handler.java:105)
at android.os.Looper.loop(Looper.java:164)
at android.app.ActivityThread.main(ActivityThread.java:6541)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.Zygote$MethodAndArgsCaller.run(Zygote.java:240)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:767)
Caused by: java.lang.IllegalArgumentException: Invalid destinationAddress
at android.telephony.SmsManager.sendTextMessageInternal(SmsManager.java:320)
at android.telephony.SmsManager.sendTextMessage(SmsManager.java:312)
at hapital.com.BitCar.MainActivity.onCreate(MainActivity.java:194)
at android.app.Activity.performCreate(Activity.java:6975)
at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1213)
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2770)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2892) 
at android.app.ActivityThread.-wrap11(Unknown Source:0) 
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1593) 
at android.os.Handler.dispatchMessage(Handler.java:105) 
at android.os.Looper.loop(Looper.java:164) 
at android.app.ActivityThread.main(ActivityThread.java:6541) 
at java.lang.reflect.Method.invoke(Native Method) 
at com.android.internal.os.Zygote$MethodAndArgsCaller.run(Zygote.java:240) 
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:767) 
Invalid destinationAddress ?? what does it mean??
For example it has an error on SmsManager.java when open it just like pic below has error in import libraries
enter image description here
Could someone help what should i do?

According to the source code of SmsManager, that exception is thrown when you call sendTextMessage with a destination address parameter that is null or an empty String.
If your code to send the SMS (as per your comment) is this:
SharedPreferences panelnumber = getSharedPreferences("Prefs", MODE_PRIVATE);
String string_from_sp = panelnumber.getString("myStringName", "");
SmsManager smsManager = SmsManager.getDefault();
smsManager.sendTextMessage(string_from_sp.toString(), null,
smsBody.toString(), null, null);
then it follows that string_from_sp is a null or empty String.
Given the way you are initializing that variable, either:
the "mystringName" field retrieved from the preferences is empty, or
you have the preference field name incorrect, and you are getting the default value which you have specified to be an empty String.
There is not sufficient info to explain why this happens with API 26 only ... if that is what you are saying.

finally i found the problem
problem was in layout of activity that i used NavigationView like belo :
<android.support.design.widget.NavigationView
android:id="#+id/nav_view"
android:layout_width="230dp"
android:layout_height="match_parent"
android:layout_gravity="start"
android:fitsSystemWindows="true"
app:headerLayout="#layout/nav_header_main2"
app:menu="#menu/activity_main2_drawer" />
and in api 26 and higher not support

Related

app crashes when try to get text from clipboard (Android 12)

I want to get the primary text on my clipboard and would like to know how to do that in newer android versions.
This code works perfectly when I tested it in an emulator running Android Pie, but the app crashes when I use it on my Phone running android 12.1.
please help me with this.
clipboard = (ClipboardManager) getSystemService(Context.CLIPBOARD_SERVICE);
if (clipboard.hasPrimaryClip())
clipItem = clipboard.getPrimaryClip().getItemAt(0);
clipText = clipItem.getText().toString();
Details.setText(clipItem.getText().toString());
Here's the Error I got from Logcat
2022-10-01 19:23:27.595 1349-5125 ClipboardService pid-1349 E Denying clipboard access to com.jery.tachisyrpc, the application is not in focus nor is it a system service for user 0
2022-10-01 19:23:27.595 8222-8222 AndroidRuntime com.jery.tachisyrpc D Shutting down VM
2022-10-01 19:23:27.596 8222-8222 AndroidRuntime com.jery.tachisyrpc E FATAL EXCEPTION: main
Process: com.jery.tachisyrpc, PID: 8222
java.lang.RuntimeException: Unable to start activity ComponentInfo{com.jery.tachisyrpc/com.jery.tachisyrpc.MainActivity}: java.lang.NullPointerException: Attempt to invoke virtual method 'java.lang.CharSequence android.content.ClipData$Item.getText()' on a null object reference at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:4111) at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:4277) at android.app.servertransaction.LaunchActivityItem.execute(LaunchActivityItem.java:103)at android.app.servertransaction.TransactionExecutor.executeCallbacks(TransactionExecutor.java:135) at android.app.servertransaction.TransactionExecutor.execute(TransactionExecutor.java:95) at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2443) at android.os.Handler.dispatchMessage(Handler.java:106) at android.os.Looper.loopOnce(Looper.java:226) at android.os.Looper.loop(Looper.java:313)
at android.app.ActivityThread.main(ActivityThread.java:8751)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:571)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1135)
Caused by: java.lang.NullPointerException: Attempt to invoke virtual method 'java.lang.CharSequence android.content.ClipData$Item.getText()' on a null object reference
at com.jery.tachisyrpc.MainActivity.onCreate(MainActivity.java:55)
at android.app.Activity.performCreate(Activity.java:8290)
at android.app.Activity.performCreate(Activity.java:8270)
at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1329)
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:4085)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:4277) 
at android.app.servertransaction.LaunchActivityItem.execute(LaunchActivityItem.java:103) 
at android.app.servertransaction.TransactionExecutor.executeCallbacks(TransactionExecutor.java:135) 
at android.app.servertransaction.TransactionExecutor.execute(TransactionExecutor.java:95) 
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2443) 
at android.os.Handler.dispatchMessage(Handler.java:106) 
at android.os.Looper.loopOnce(Looper.java:226) 
at android.os.Looper.loop(Looper.java:313) 
at android.app.ActivityThread.main(ActivityThread.java:8751) 
at java.lang.reflect.Method.invoke(Native Method) 
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:571) 
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1135)

"java.lang.IllegalStateException: Cannot perform this action on a sealed instance." FATAL EXCEPTION: main

I am getting this error on pre-launch report from playstore console.
I am not able to generate this crash on any real device I try.
The device from pre-launch report is Samsung s9 (Android 8.0).
This is the stacktrace :
FATAL EXCEPTION: main
java.lang.IllegalStateException: Cannot perform this action on a sealed instance.
at android.view.accessibility.AccessibilityNodeInfo.enforceNotSealed(AccessibilityNodeInfo.java:2992)
at android.view.accessibility.AccessibilityNodeInfo.setSource(AccessibilityNodeInfo.java:818)
at android.view.accessibility.AccessibilityNodeInfo.setSource(AccessibilityNodeInfo.java:795)
at android.view.accessibility.AccessibilityNodeInfo.obtain(AccessibilityNodeInfo.java:3008)
at android.view.View.createAccessibilityNodeInfoInternal(View.java:7897)
at android.view.View.createAccessibilityNodeInfo(View.java:7883)
at android.view.AccessibilityInteractionController$AccessibilityNodePrefetcher.prefetchDescendantsOfRealNode(AccessibilityInteractionController.java:1051)
at android.view.AccessibilityInteractionController$AccessibilityNodePrefetcher.prefetchAccessibilityNodeInfos(AccessibilityInteractionController.java:876)
at android.view.AccessibilityInteractionController.findAccessibilityNodeInfoByAccessibilityIdUiThread(AccessibilityInteractionController.java:199)
at android.view.AccessibilityInteractionController.-wrap1(Unknown Source:0)
at android.view.AccessibilityInteractionController$PrivateHandler.handleMessage(AccessibilityInteractionController.java:1225)
at android.os.Handler.dispatchMessage(Handler.java:105)
at android.os.Looper.loop(Looper.java:164)
at android.app.ActivityThread.main(ActivityThread.java:6938)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.Zygote$MethodAndArgsCaller.run(Zygote.java:327)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1374)
Without seeing more code, I'd recommend looking through the following links to try and determine an exact cause.
https://stackoverflow.com/a/57964014/5779200
When updating values for AccessibilityNodeInfo it has been seen that calling .getClassName() to see if the value is NULL can help prevent this error.
https://stackoverflow.com/a/32829963/5779200
Similar to the previous, If you are changing the text of an accessibilityNodeInfo you can check to see if it's sealed by calling isSealed(). on the AccessibilityNodeInfo object

Call a method that throws Exception / try catch block

so I have method that looks like this :
public void testSingleGames() throws InterruptedException {
try {
Log.d("TEST","JSON");
} catch (JSONException e) {
e.printStackTrace();
fail("JSONException!!");
}
I simply want to call that method elsewhere :
testSingleGames();
though it says : Unhandled Exception.java.lang.InterruptedException.
I tried the suggested fix android studio gave me , which is :
try {
testSingleGames();
} catch (InterruptedException e) {
e.printStackTrace();
}
my app crashes when I do though.
So how do I call this mehod properly ?
EDIT :
here some
STACKTRACES :
I think this one is the "main cause" since text was marked red:
Process: com.test.test, PID: 4097
java.lang.RuntimeException: Unable to start activity ComponentInfo{com.test.test/com.test.test.MainActivity}: java.lang.IllegalStateException: No instrumentation registered! Must run under a registering instrumentation.
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2817)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2892)
at android.app.ActivityThread.-wrap11(Unknown Source:0)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1593)
at android.os.Handler.dispatchMessage(Handler.java:105)
at android.os.Looper.loop(Looper.java:164)
at android.app.ActivityThread.main(ActivityThread.java:6541)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.Zygote$MethodAndArgsCaller.run(Zygote.java:240)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:767)
Caused by: java.lang.IllegalStateException: No instrumentation registered! Must run under a registering instrumentation.
at android.support.test.InstrumentationRegistry.getInstrumentation(InstrumentationRegistry.java:45)
at android.support.test.InstrumentationRegistry.getContext(InstrumentationRegistry.java:75)
at com.test.test.MainActivity.setUp(MainActivity.java:61)
at com.test.test.MainActivity.testSingleGames(MainActivity.java:69)
at com.test.test.MainActivity.onCreate(MainActivity.java:122)
at android.app.Activity.performCreate(Activity.java:6975)
at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1213)
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2770)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2892) 
at android.app.ActivityThread.-wrap11(Unknown Source:0) 
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1593) 
at android.os.Handler.dispatchMessage(Handler.java:105) 
at android.os.Looper.loop(Looper.java:164) 
at android.app.ActivityThread.main(ActivityThread.java:6541) 
at java.lang.reflect.Method.invoke(Native Method) 
at com.android.internal.os.Zygote$MethodAndArgsCaller.run(Zygote.java:240) 
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:767) 
Edit 2 : Ok I googled this line : No instrumentation registered! Must run under a registering instrumentation.
Previously I had a problem dependencies:
Conflict with dependency 'com.android.support.test:runner' in project ':app'. Resolved versions for app (0.5) and test app (1.0.1) differ. See https://d.android.com/r/tools/test-apk-dependency-conflicts.html for details.
I "fixed" it by changeing :
androidTestImplementation 'com.android.support.test:runner:1.0.1'
to
Implementation 'com.android.support.test:runner:1.0.1'
so the error went away .
Maybe this is the root cause ?
I hope someone can make sense of this o.O , since I just tried to dabble abit with some api which is throwing all kinds of problems at me -.- ...

Android Studio - Application has stopped, but 0 code errors

My android application was running smoothly before i install some Android Studio updates, and asked me to upgrade gradle etc after the update been installed.
Later on, the Android Studio asked me to update my Android Emulator (Emulator Nexus 5X API 24 Android v7.0), since i've made all these changes, my application has been unable to open when i click run. But remember it has no codding errors when i debug etc.
The error message from Android Monitor is:
08-13 14:07:30.735 3889-3889/? E/AndroidRuntime: FATAL EXCEPTION: main
Process: com.smartlegal.law.freeman.smartlegal, PID: 3889
java.lang.RuntimeException: Unable to start activity ComponentInfo{com.smartlegal.law.freeman.smartlegal/com.smartlegal.law.freeman.smartlegal.MainActivity}: java.lang.NullPointerException: Attempt to invoke virtual method 'void android.widget.Button.setOnClickListener(android.view.View$OnClickListener)' on a null object reference
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2646)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2707)
at android.app.ActivityThread.-wrap12(ActivityThread.java)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1460)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:154)
at android.app.ActivityThread.main(ActivityThread.java:6077)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:866)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:756)
Caused by: java.lang.NullPointerException: Attempt to invoke virtual method 'void android.widget.Button.setOnClickListener(android.view.View$OnClickListener)' on a null object reference
at com.smartlegal.law.freeman.smartlegal.MainActivity.onCreate(MainActivity.java:39)
at android.app.Activity.performCreate(Activity.java:6662)
at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1118)
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2599)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2707)
at android.app.ActivityThread.-wrap12(ActivityThread.java)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1460)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:154)
at android.app.ActivityThread.main(ActivityThread.java:6077)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:866)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:756)
08-13 14:07:30.744 3889-3896/? W/art: Suspending all threads took: 5.874ms
Caused by: java.lang.NullPointerException: Attempt to invoke virtual method 'void android.widget.Button.setOnClickListener(android.view.View$OnClickListener)' on a null object reference
As the error states, you're trying to set an onClickListener on a Button that does not exist (returns null). To simplify, when you're defining your Button, you call findViewById to associate the Button in Java with an XML element, but the ID that you are passing is not valid - either you're trying to call the setOnClickListener before you call setContentView, or the ID you are passing to findViewById has a typo or simply does not exist in the XML layout file.
Some more information, such as the code to your MainActivity and the layout file, would be useful to determine the exact cause of your problem.
Yes you're right, i forgot to specify the ID for the editText and Button, that is why it wasnt possible to find them ID on XML. So i've set it up and reloaded the project and it is running smoothly now. Thanks guys for the support.
"As the error states, you're trying to set an onClickListener on a Button that does not exist (returns null). To simplify, when you're defining your Button, you call findViewById to associate the Button in Java with an XML element, but the ID that you are passing is not valid. by: Timothy Langer".

Unable to start activity ComponentInfo{...} after installing Android SDK Build-Tools 26

I upgraded Android Studio to 2.3.3
and then I installed Android SDK Build-Tools 26
and Android 8.0 (O)
and set compileSdkVersion and targetSdkVersion on 26
and buildToolsVersion on "26.0.0"
and then I changed all the libraries version from 25.3.1 to 26.0.0-alpha1
Now I have the below RunTime Exception:
java.lang.RuntimeException: Unable to start activity ComponentInfo{com.mysite.myapp/com.mysite.myapp.MainActivity}: android.view.InflateException: Binary XML file line #35: Error inflating class fragment
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2417)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2480)
at android.app.ActivityThread.access$800(ActivityThread.java:151)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1377)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:155)
at android.app.ActivityThread.main(ActivityThread.java:5725)
at java.lang.reflect.Method.invoke(Native Method)
at java.lang.reflect.Method.invoke(Method.java:372)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1030)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:825)
Caused by: android.view.InflateException: Binary XML file line #35: Error inflating class fragment
at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:763)
at android.view.LayoutInflater.rInflate(LayoutInflater.java:806)
at android.view.LayoutInflater.inflate(LayoutInflater.java:504)
at android.view.LayoutInflater.inflate(LayoutInflater.java:414)
at android.view.LayoutInflater.inflate(LayoutInflater.java:365)
at android.support.v7.app.AppCompatDelegateImplV9.setContentView(AppCompatDelegateImplV9.java:289)
at android.support.v7.app.AppCompatActivity.setContentView(AppCompatActivity.java:139)
at com.mysite.myapp.MainActivity.onCreate(MainActivity.java:65)
at android.app.Activity.performCreate(Activity.java:6018)
at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1130)
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2370)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2480) 
at android.app.ActivityThread.access$800(ActivityThread.java:151) 
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1377) 
at android.os.Handler.dispatchMessage(Handler.java:102) 
at android.os.Looper.loop(Looper.java:155) 
at android.app.ActivityThread.main(ActivityThread.java:5725) 
at java.lang.reflect.Method.invoke(Native Method) 
at java.lang.reflect.Method.invoke(Method.java:372) 
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1030) 
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:825) 
Caused by: java.lang.IllegalArgumentException: Setting FragmentDrawer{28990c1 #0 id=0x7f0f0095} as the target of FragmentDrawer{28990c1 #0 id=0x7f0f0095} would create a target cycle
at android.support.v4.app.Fragment.setTargetFragment(Fragment.java:636)
at com.mysite.myapp.Fragments.FragmentDrawer.onCreate(FragmentDrawer.java:83)
at android.support.v4.app.Fragment.performCreate(Fragment.java:2226)
at android.support.v4.app.FragmentManagerImpl.moveToState(FragmentManager.java:1290)
at android.support.v4.app.FragmentManagerImpl.moveToState(FragmentManager.java:1502)
at android.support.v4.app.FragmentManagerImpl.addFragment(FragmentManager.java:1737)
at android.support.v4.app.FragmentManagerImpl.onCreateView(FragmentManager.java:3512)
at android.support.v4.app.FragmentController.onCreateView(FragmentController.java:120)
at android.support.v4.app.FragmentActivity.dispatchFragmentsOnCreateView(FragmentActivity.java:330)
at android.support.v4.app.BaseFragmentActivityApi14.onCreateView(BaseFragmentActivityApi14.java:39)
at android.support.v4.app.FragmentActivity.onCreateView(FragmentActivity.java:75)
at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:733)
at android.view.LayoutInflater.rInflate(LayoutInflater.java:806) 
at android.view.LayoutInflater.inflate(LayoutInflater.java:504) 
at android.view.LayoutInflater.inflate(LayoutInflater.java:414) 
at android.view.LayoutInflater.inflate(LayoutInflater.java:365) 
at android.support.v7.app.AppCompatDelegateImplV9.setContentView(AppCompatDelegateImplV9.java:289) 
at android.support.v7.app.AppCompatActivity.setContentView(AppCompatActivity.java:139) 
at com.mysite.myapp.MainActivity.onCreate(MainActivity.java:65) 
at android.app.Activity.performCreate(Activity.java:6018) 
at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1130) 
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2370) 
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2480) 
at android.app.ActivityThread.access$800(ActivityThread.java:151) 
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1377) 
at android.os.Handler.dispatchMessage(Handler.java:102) 
at android.os.Looper.loop(Looper.java:155) 
at android.app.ActivityThread.main(ActivityThread.java:5725) 
at java.lang.reflect.Method.invoke(Native Method) 
at java.lang.reflect.Method.invoke(Method.java:372) 
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1030) 
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:825) 
the (MainActivity.java:65) and (FragmentDrawer.java:83) are displayed as link.
MainActivity.java:65 content:
setContentView(R.layout.activity_main);
FragmentDrawer.java:83 content:
setTargetFragment(FragmentDrawer.this, 100);
before MainActivity there is a SplashActivity and it runs without any problem!
I've just downgraded SDK Build-Tools, compileSdkVersion, targetSdkVersion, buildToolsVersion and libraries version to run again and test. there is no problem using previews versions.
Can anyone help me? How can I run my App using new SDK Version?
The problem is here:
java.lang.IllegalArgumentException:
Setting FragmentDrawer{28990c1 #0 id=0x7f0f0095} as the target of
FragmentDrawer{28990c1 #0 id=0x7f0f0095} would create a target cycle
at android.support.v4.app.Fragment.setTargetFragment(Fragment.java:636)
setTargetFragment has changed in 26.0.0. Before, it simply set the target fragment plus request code. From 26.0.0 onwards, it contains two checks before doing that:
- it checks whether the current fragment and the target fragment belong to the same fragment manager
- it checks whether setting the target fragment would create a loop, by scanning the list of target fragments in this fragment and see if the target fragment is already there.
So somehow you are setting a target fragment that you set before. That is no longer allowed.

Categories

Resources