-
Notifications
You must be signed in to change notification settings - Fork 40
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
I jump native(MainActivity) to flutter,but can not jump back. #12
Comments
Samsung SM-G9350 Android 6.0,and when I add FLAG_ACTIVITY_NEW_TASK flag to intent,I jump native(MainActivity) to flutter,but can not jump back. |
@jinyulei0710 |
@kangwang1988 here is the demo: https://github.com/jinyulei0710/hybridDemo.git [✓] Android toolchain - develop for Android devices (Android SDK version 28.0.3) [!] iOS toolchain - develop for iOS devices (Xcode 10.1) [✓] Android Studio (version 3.2) [!] IntelliJ IDEA Community Edition (version 2018.3.2) [✓] Connected device (1 available) |
@kangwang1988 The strangest thing is that ,after click to open FlutterPage some times, it maybe can go back. |
@kangwang1988 I met the same problem. I think the root cause is in the
|
@jinyulei0710 I see they have fixed this issue on master branch, but haven't publish it. You can switch to github master in your pubspec file. |
当调用类没有集成FlutterWrapperActivity 就会有问题 这样? |
01-01 09:45:55.374 14183-14183/? E/AndroidRuntime: FATAL EXCEPTION: main
Process: com.greentownit.parkmanagement, PID: 14183
android.util.AndroidRuntimeException: Calling startActivity() from outside of an Activity context requires the FLAG_ACTIVITY_NEW_TASK flag. Is this really what you want?
at android.app.ContextImpl.startActivity(ContextImpl.java:734)
at android.app.ContextImpl.startActivity(ContextImpl.java:721)
at android.content.ContextWrapper.startActivity(ContextWrapper.java:345)
at com.taobao.hybridstackmanager.XURLRouter.openUrlWithQueryAndParams(XURLRouter.java:38)
at com.greentownit.parkmanagement.ui.MainActivity$1.onClick(MainActivity.java:39)
at android.view.View.performClick(View.java:5697)
at android.widget.TextView.performClick(TextView.java:10814)
at android.view.View$PerformClick.run(View.java:22526)
at android.os.Handler.handleCallback(Handler.java:739)
at android.os.Handler.dispatchMessage(Handler.java:95)
at android.os.Looper.loop(Looper.java:158)
at android.app.ActivityThread.main(ActivityThread.java:7224)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1230)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1120)
The text was updated successfully, but these errors were encountered: