Closed Fleker closed 8 years ago
Before that crash, the log shows:
VFY: unable to find class referenced in signature
VFY: Ljava/lang/Object; is not instance of Lcom/sromku/simple/fb/listeners/OnPublishListener;
VFY: bad arg 3 (into Lcom/sromku/simple/fb/listeners/OnPublishListener;)
VFY: rejecting call to Lcom/sromku/simple/fb/SimpleFacebook;.publish (Ljava/lang/String;Lcom/sromku/simple/fb/entities/Publishable;Lcom/sromku/simple/fb/listeners/OnPublishListener;)V
VFY: rejecting opcode 0x6e at 0x0002
VFY: rejected Lcom/sromku/simple/fb/SimpleFacebook;.create (Lcom/sromku/simple/fb/entities/Story$StoryObject;Lcom/sromku/simple/fb/listeners/OnCreateStoryObject;)V
Verifier rejected class Lcom/sromku/simple/fb/SimpleFacebook;
@xsorifc28 you are using String.valueOf(R.string.fb_app_id)
but instead, you should use: getResources().getString(R.string.fb_app_id)
and same for namespace. let me know if it works for you. thanks.
I will try this. Any ideas as to why this would relate to the verifier error ?
I'm trying to figure out why it says VFY: unable to find class referenced in signature (Lcom/sromku/simple/fb/listeners/OnCreateStoryObject;)
I tried updating the dependencies/libraries of simple-fb but the error continues. The project's sample app seems to work fine, however, I'm having the issue in my app. Wondering if it is due to multidex issues/ I do have multidex enabled.
Are you using Proguard in your app?
No, minifyEnabled is false.
Indeed, it sounds like multidexing issue. Truly, didn't play too much with multidexing, so it's hard to say, what exactly doesn't play well. But from your log Verifier rejected class
looks, like this an indication for runtime issue to come. On SO, I found similar problems.
I am not going to dive into multidexing right now, but if you have any enlightenments, please share :)
SimpleFacebook.setConfiguration(configuration);
was inside the constructor for MyApplication()
, I moved it to onCreate()
within MyApplication
, seems to work fine now.
Weird how this was an issue on +/- API 16, but not on >API 21.
I think it was related to the multidex calls.
Wasn't MyApplication
your extended application class?
Previously, what caused the verify error:
public class MyAplication extends Application {
public MyApplication() {
super();
...
SimpleFacebook.setConfiguration(configuration);
}
@Override
public onCreate () {
super.onCreate();
}
}
The above code worked for API 21+
Now, with error gone:
public class MyAplication extends Application {
public MyApplication() {
super();
}
@Override
public onCreate () {
super.onCreate();
...
SimpleFacebook.setConfiguration(configuration);
}
}
Cool. It's interesting why would it work on 21+. Since constructor shouldn't be extended and used and still, it worked. nice. Anyway, much thanks for sharing!
I'm seeing a pretty weird error in an app and I haven't found much documentation on it.
It occurs on two phones, both running Android 4.4
The code in question is:
Do you have any clue as to where this error is originating? Thanks.