-
Notifications
You must be signed in to change notification settings - Fork 118
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
RuntimeException when launch my app #21
Comments
Hey! AndroidDevMetrics should be initialized in Application class, not Activity (it's too late if you would do this). Here is example code: public class ExampleApplication extends Application {
@Override
public void onCreate() {
super.onCreate();
//Use it only in debug builds
if (BuildConfig.DEBUG) {
AndroidDevMetrics.initWith(this);
}
}
} |
Yes yes I've done that of course :) |
I have same issue with 4.0, getting that runtime exception. I've tried I have errors only in version 0.4, version 0.3.1 is working. Thanks. |
I have the same issue with 4.0 It crashes when I do not initialize it. It shouldn't it should just do nothing. This behavior was correct in 0.3.1 |
Me too... uff.. i would like to test AndroidDevMetrics |
It crashes when I put
on top of onCreate of all initializations, but it fine when I put it at the end. It appears that it clashes with some other initialisations. I can say that I have other ActivityLifecycleListeners might be because of it. |
The plugin for android dev metrics assumes you will be using it for any debug build. I ran into this issue because I was disabling it when certain properties were passed to gradle. In order for this to work, I did following: build:In if (project.hasProperty('ENABLE_TOOLS')) {
apply plugin: 'com.frogermcs.androiddevmetrics'
} If the tool is disabled, add a if (project.hasProperty('ENABLE_TOOLS')) {
debugCompile 'com.frogermcs.androiddevmetrics:androiddevmetrics-runtime-noop:0.5'
} If you do not have an Application subclass for Debug builds:Only initialize onCreate() {
// ...
if (BuildConfig.DEBUG) {
AndroidDevMetrics.initWith(this);
}
// ...
} If you do have a
|
i meet this problem when i update my gradle`s version, i solve this problem by decreasing the gradle's version .Maybe the problem is the compatibility of the author's plugin. |
Hi,
my app crashes with this stack trace.
I've already tried to implement
in my StartingActivity as the stack trace says but still I have the same issue.
How can I solve this problem?
Thanks
The text was updated successfully, but these errors were encountered: