Skip to content
This repository has been archived by the owner on Aug 1, 2023. It is now read-only.

Proguard rules #173

Closed
FrankyHo opened this issue Dec 16, 2019 · 3 comments
Closed

Proguard rules #173

FrankyHo opened this issue Dec 16, 2019 · 3 comments

Comments

@FrankyHo
Copy link

after enable minify and generate apk of "/example" tutorial, app crash

A/art: art/runtime/thread.cc:1105] No pending exception expected: ### java.lang.ClassNotFoundException: Didn't find class "com.eclipsesource.v8.V8Object" on path: DexPathList[[zip file "/data/app/org.blockstack.android.sample-2/base.apk"],nativeLibraryDirectories=[/data/app/org.blockstack.android.sample-2/lib/arm, /vendor/lib, /system/lib]]

Then I modify proguard-rules.pro -keep class com.eclipsesource.v8.** { *; } ,then I got another crash

12-16 18:17:37.982 22157-22157/? E/AndroidRuntime: FATAL EXCEPTION: main
Process: org.blockstack.android.sample, PID: 22157
java.lang.RuntimeException: Unable to start activity ComponentInfo{org.blockstack.android.sample/org.blockstack.android.MainActivity}: java.lang.IllegalStateException: java.lang.NoSuchMethodException: log [class java.lang.String]
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2819)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2889)
at android.app.ActivityThread.access$900(ActivityThread.java:181)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1493)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:145)
at android.app.ActivityThread.main(ActivityThread.java:6219)
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:1399)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1194)
Caused by: java.lang.IllegalStateException: java.lang.NoSuchMethodException: log [class java.lang.String]
at com.eclipsesource.v8.V8Object.registerJavaMethod()
at com.eclipsesource.v8.V8Object.registerJavaMethod()
at org.blockstack.android.b.e.d()
at org.blockstack.android.b.e.()
at org.blockstack.android.b.e.()
at org.blockstack.android.MainActivity.onCreate()
at android.app.Activity.performCreate(Activity.java:6374)
at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1119)
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2763)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2889) 
at android.app.ActivityThread.access$900(ActivityThread.java:181) 
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1493) 
at android.os.Handler.dispatchMessage(Handler.java:102) 
at android.os.Looper.loop(Looper.java:145) 
at android.app.ActivityThread.main(ActivityThread.java:6219) 
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:1399) 
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1194) 

Is any any instruction of proguard rules? thanks for help

@friedger
Copy link
Collaborator

friedger commented Dec 16, 2019 via email

@FrankyHo
Copy link
Author

Thank you, it works. BTW I am using blockstack-react-native but seems only support in version 0.4.6. Hope can upgrade soon.

@friedger
Copy link
Collaborator

@FrankyHo In the context of stacks-archive/blockstack-react-native#26 the android SDK will be upgraded to 0.5.0.... work in progress.

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

No branches or pull requests

2 participants