klinker24 / talon-for-twitter-android

The most powerful and beautiful Twitter client available.
https://klinkerapps.com/talon-overview
1.19k stars 183 forks source link

self-compiled: app crashes on timeline refresh #126

Closed macearl closed 4 years ago

macearl commented 5 years ago

I'm trying to build the app myself and it generates an apk without a problem however when i try to refresh my timeline the app crashes.

logcat:

07-30 19:59:17.980  8677  8786 E AndroidRuntime: FATAL EXCEPTION: Thread-30
07-30 19:59:17.980  8677  8786 E AndroidRuntime: Process: com.klinker.android.twitter_l, PID: 8677
07-30 19:59:17.980  8677  8786 E AndroidRuntime: java.lang.AssertionError: java.lang.ClassNotFoundException: twitter4j.conf.PropertyConfigurationFactory
07-30 19:59:17.980  8677  8786 E AndroidRuntime:    at m.y0.d.<clinit>(Unknown Source:38)
07-30 19:59:17.980  8677  8786 E AndroidRuntime:    at m.y0.d.a(Unknown Source:0)
07-30 19:59:17.980  8677  8786 E AndroidRuntime:    at m.o0.<clinit>(Unknown Source:0)
07-30 19:59:17.980  8677  8786 E AndroidRuntime:    at com.klinker.android.twitter_l.utils.k0.a(Unknown Source:43)
07-30 19:59:17.980  8677  8786 E AndroidRuntime:    at com.klinker.android.twitter_l.activities.e.b.b.u(Unknown Source:103)
07-30 19:59:17.980  8677  8786 E AndroidRuntime:    at com.klinker.android.twitter_l.activities.e.b.b$n.run(Unknown Source:7)
07-30 19:59:17.980  8677  8786 E AndroidRuntime:    at java.lang.Thread.run(Thread.java:764)
07-30 19:59:17.980  8677  8786 E AndroidRuntime: Caused by: java.lang.ClassNotFoundException: twitter4j.conf.PropertyConfigurationFactory
07-30 19:59:17.980  8677  8786 E AndroidRuntime:    at java.lang.Class.classForName(Native Method)
07-30 19:59:17.980  8677  8786 E AndroidRuntime:    at java.lang.Class.forName(Class.java:453)
07-30 19:59:17.980  8677  8786 E AndroidRuntime:    at java.lang.Class.forName(Class.java:378)
07-30 19:59:17.980  8677  8786 E AndroidRuntime:    at m.y0.d.<clinit>(Unknown Source:8)
07-30 19:59:17.980  8677  8786 E AndroidRuntime:    ... 6 more
07-30 19:59:17.980  8677  8786 E AndroidRuntime: Caused by: java.lang.ClassNotFoundException: Didn't find class "twitter4j.conf.PropertyConfigurationFactory" on path: DexPathList[[zip file "/data/app/com.klinker.android.twitter_l-RZ0bLJ3WXPeyshYAVtilTg==/base.apk"],nativeLibraryDirectories=[/data/app/com.klinker.android.twitter_l-RZ0bLJ3WXPeyshYAVtilTg==/lib/arm64, /system/lib64, /vendor/lib64]]
07-30 19:59:17.980  8677  8786 E AndroidRuntime:    at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:134)
07-30 19:59:17.980  8677  8786 E AndroidRuntime:    at java.lang.ClassLoader.loadClass(ClassLoader.java:379)
07-30 19:59:17.980  8677  8786 E AndroidRuntime:    at java.lang.ClassLoader.loadClass(ClassLoader.java:312)
07-30 19:59:17.980  8677  8786 E AndroidRuntime:    ... 10 more

a bit of googling seems to indicate that this is a problem with proguard stripping out the class, however adding:

-keep class twitter4j.conf.PropertyConfigurationFactory
-dontwarn twitter4j.**

to either $ANDROID_SDK_DIR/tools/proguard/proguard-android.txt or the proguard-rules.pro does not help

klinker24 commented 4 years ago

I have fixed this. It should work fine for you, now.

macearl commented 4 years ago

Not sure if i'm missing something obvious but now it crashes with:

08-07 02:49:53.401  1569  1745 E AndroidRuntime: Process: com.klinker.android.twitter_l, PID: 1569
08-07 02:49:53.401  1569  1745 E AndroidRuntime: java.lang.AssertionError: java.lang.ClassNotFoundException: twitter4j.TwitterImpl
08-07 02:49:53.401  1569  1745 E AndroidRuntime:    at m.p0.<clinit>(Unknown Source:102)
08-07 02:49:53.401  1569  1745 E AndroidRuntime:    at com.klinker.android.twitter_l.utils.k0.a(Unknown Source:43)
08-07 02:49:53.401  1569  1745 E AndroidRuntime:    at com.klinker.android.twitter_l.activities.e.b.b.u(Unknown Source:103)
08-07 02:49:53.401  1569  1745 E AndroidRuntime:    at com.klinker.android.twitter_l.activities.e.b.b$n.run(Unknown Source:7)
08-07 02:49:53.401  1569  1745 E AndroidRuntime:    at java.lang.Thread.run(Thread.java:764)
08-07 02:49:53.401  1569  1745 E AndroidRuntime: Caused by: java.lang.ClassNotFoundException: twitter4j.TwitterImpl
08-07 02:49:53.401  1569  1745 E AndroidRuntime:    at java.lang.Class.classForName(Native Method)
08-07 02:49:53.401  1569  1745 E AndroidRuntime:    at java.lang.Class.forName(Class.java:453)
08-07 02:49:53.401  1569  1745 E AndroidRuntime:    at java.lang.Class.forName(Class.java:378)
08-07 02:49:53.401  1569  1745 E AndroidRuntime:    at m.p0.<clinit>(Unknown Source:36)
08-07 02:49:53.401  1569  1745 E AndroidRuntime:    ... 4 more
08-07 02:49:53.401  1569  1745 E AndroidRuntime: Caused by: java.lang.ClassNotFoundException: Didn't find class "twitter4j.TwitterImpl" on path: DexPathList[[zip file "/data/app/com.klinker.android.twitter_l-R3WjEcwRurITuZfyGBSTHw==/base.apk"],nativeLibraryDirectories=[/data/app/com.klinker.android.twitter_l-R3WjEcwRurITuZfyGBSTHw==/lib/arm64, /system/lib64, /vendor/lib64]]
08-07 02:49:53.401  1569  1745 E AndroidRuntime:    at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:134)
08-07 02:49:53.401  1569  1745 E AndroidRuntime:    at java.lang.ClassLoader.loadClass(ClassLoader.java:379)
08-07 02:49:53.401  1569  1745 E AndroidRuntime:    at java.lang.ClassLoader.loadClass(ClassLoader.java:312)
08-07 02:49:53.401  1569  1745 E AndroidRuntime:    ... 8 more
klinker24 commented 4 years ago

That seems like an error on your side. Sorry, I am not sure what the issue is. The code is now working for all versions of Android and my compiled app is being distributed to the Play Store, with no changes from what is here on GitHub

macearl commented 4 years ago

Just set up a clean environment and tried building it again without changing anything in the source.

Still crashes with the same error, if i build and run the debug version instead of the release version everything works fine.

Do i still need to add something to the proguard files?

edit: haven't changed anything, just tried again with current master branch, seems to work fine now