Skip to content
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

app crash with exception #2332

Closed
6 of 17 tasks
didi-droid opened this issue Oct 24, 2019 · 8 comments
Closed
6 of 17 tasks

app crash with exception #2332

didi-droid opened this issue Oct 24, 2019 · 8 comments
Labels

Comments

@didi-droid
Copy link

didi-droid commented Oct 24, 2019

Please read contributing guidelines. Thanks.

Describe the bug
点开服务器配置,应用闪退

To Reproduce
Steps to reproduce the behavior:

  1. 打开app
  2. 点开服务器配置
  3. app闪退

Expected behavior
A clear and concise description of what you expected to happen.

Screenshots
If applicable, add screenshots to help explain your problem.

Smartphone (please complete the following information):

  • Android 10
  • Device: xiaomi miui 11
  • Version: 4e23960
  • Last version that did not exhibit the issue: [not applicable]

Configuration
Put an x inside the [ ] that applies.

  • IPv4 server address
  • IPv6 server address
  • Client IPv4 availability
  • Client IPv6 availability
  • Encrypt method: rc4-md5
  • Route
    • All
    • Bypass LAN
    • Bypass China
    • Bypass LAN & China
    • GFW List
    • China List
    • Custom rules
  • IPv6 route
  • Apps VPN mode
    • Bypass mode
  • Remote DNS: 8.8.8.8
  • DNS over UDP
  • Plugin configuration (if applicable):
  • Auto Connect
  • TCP Fast Open
  • If you're not using VPN mode, please supply more details here:

Additional context

androidx.fragment.app.Fragment$InstantiationException: Unable to instantiate fragment com.github.shadowsocks.ProfileConfigFragment: could not find Fragment constructor
 at androidx.fragment.app.Fragment.instantiate(Fragment.java:563)
 at androidx.fragment.app.FragmentContainer.instantiate(FragmentContainer.java:57)
 at androidx.fragment.app.FragmentManager$3.instantiate(FragmentManager.java:402)
 at androidx.fragment.app.FragmentContainerView.onAttachedToWindow(FragmentContainerView.java:172)
 at android.view.View.dispatchAttachedToWindow(View.java:19601)
 at android.view.ViewGroup.dispatchAttachedToWindow(ViewGroup.java:3452)
 at android.view.ViewGroup.dispatchAttachedToWindow(ViewGroup.java:3459)
 at android.view.ViewGroup.dispatchAttachedToWindow(ViewGroup.java:3459)
 at android.view.ViewGroup.dispatchAttachedToWindow(ViewGroup.java:3459)
 at android.view.ViewGroup.dispatchAttachedToWindow(ViewGroup.java:3459)
 at android.view.ViewGroup.dispatchAttachedToWindow(ViewGroup.java:3459)
 at android.view.ViewGroup.dispatchAttachedToWindow(ViewGroup.java:3459)
 at android.view.ViewRootImpl.performTraversals(ViewRootImpl.java:2089)
 at android.view.ViewRootImpl.doTraversal(ViewRootImpl.java:1782)
 at android.view.ViewRootImpl$TraversalRunnable.run(ViewRootImpl.java:7785)
 at android.view.Choreographer$CallbackRecord.run(Choreographer.java:1031)
 at android.view.Choreographer.doCallbacks(Choreographer.java:854)
 at android.view.Choreographer.doFrame(Choreographer.java:789)
 at android.view.Choreographer$FrameDisplayEventReceiver.run(Choreographer.java:1016)
 at android.os.Handler.handleCallback(Handler.java:883)
 at android.os.Handler.dispatchMessage(Handler.java:100)
 at android.os.Looper.loop(Looper.java:221)
 at android.app.ActivityThread.main(ActivityThread.java:7520)
 at java.lang.reflect.Method.invoke(Native Method)
 at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:539)
 at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:950)
Caused by: java.lang.NoSuchMethodException: com.github.shadowsocks.ProfileConfigFragment.<init> []
 at java.lang.Class.getConstructor0(Class.java:2332)
 at java.lang.Class.getConstructor(Class.java:1728)
 at androidx.fragment.app.Fragment.instantiate(Fragment.java:548)
 ... 25 more
@madeye
Copy link
Contributor

madeye commented Oct 24, 2019

Cannot reproduce on Android 10 emulator.

@didi-droid
Copy link
Author

Cannot reproduce on Android 10 emulator.

那我现在从哪方面帮你定位故障呢?

@mokitoo
Copy link

mokitoo commented Nov 21, 2019

@madeye @Mygod I can reproduce in xiaomi Android 7.1.2 with same error above , by the way , tag 4.8.5 works fine . So maybe due to this commit Refine code style like didi-droid said

@shadowsocksRb
Copy link
Contributor

问题由 4e23960 引入,AndroidX团队已取消此替换建议:https://issuetracker.google.com/issues/142601969#comment3

撤销修改直到aapt2支持,或添加keep规则。

shadowsocksRb added a commit to shadowsocksRb/shadowsocksRb-android that referenced this issue Nov 30, 2019
@Mygod
Copy link
Contributor

Mygod commented Nov 30, 2019

Nice. Thanks guy.

@runtimesmart
Copy link

问题由 4e23960 引入,AndroidX团队已取消此替换建议:https://issuetracker.google.com/issues/142601969#comment3

撤销修改直到aapt2支持,或添加keep规则。


this issue still exists in oneplus 7 android 10.

@madeye
Copy link
Contributor

madeye commented Dec 2, 2019

Let's wait for next release of aapt2.

@runtimesmart
Copy link

Let's wait for next release of aapt2.


found it.this issue occurs when you build release version,
so the proguard-rules.pro should be add :
-keep class com.google.android.material.** {*;} -keep class androidx.** {*;} -keep public class * extends androidx.** -keep interface androidx.** {*;} -dontwarn com.google.android.material.** -dontnote com.google.android.material.** -dontwarn androidx.**

to avoid the fragment being obfuscated.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

6 participants