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

Library crashed app, Theme.AppCompat. #14

Open
jmodrako opened this issue Mar 18, 2016 · 3 comments
Open

Library crashed app, Theme.AppCompat. #14

jmodrako opened this issue Mar 18, 2016 · 3 comments

Comments

@jmodrako
Copy link

Hi! I want to let you know that library crashed my app with following stack-trace:

Caused by: java.lang.IllegalStateException: You need to use a Theme.AppCompat theme (or descendant) with this activity.
       at android.support.v7.app.AppCompatDelegateImplV7.createSubDecor(AppCompatDelegateImplV7.java:340)
       at android.support.v7.app.AppCompatDelegateImplV7.ensureSubDecor(AppCompatDelegateImplV7.java:309)
       at android.support.v7.app.AppCompatDelegateImplV7.setContentView(AppCompatDelegateImplV7.java:273)
       at android.support.v7.app.AppCompatActivity.setContentView(AppCompatActivity.java:139)
       at pl.polskikraft.android.android.activity.HomeActivity_.setContentView(HomeActivity_.java:102)
       at pl.polskikraft.android.android.activity.HomeActivity_.onCreate_aroundBody0(HomeActivity_.java:78)
       at pl.polskikraft.android.android.activity.HomeActivity_$AjcClosure1.run(HomeActivity_.java:1)
       at org.aspectj.runtime.reflect.JoinPointImpl.proceed(JoinPointImpl.java:149)
       at com.frogermcs.androiddevmetrics.aspect.ActivityLifecycleAnalyzer.logAndExecute(ActivityLifecycleAnalyzer.java:62)
       at pl.polskikraft.android.android.activity.HomeActivity_.onCreate(HomeActivity_.java:74)
@frogermcs
Copy link
Owner

Hey,

Are you sure that it's not your code? In stacktrace it seems that you use wrong Theme in your HomeActivity class.

@jmodrako
Copy link
Author

I have following theme: Theme.AppCompat.Light.NoActionBar. I just forked your repo and update SupportLibrary, and also change the android:Theme.Light to AppCompact one, but I noticed that when I click on the notification, MetricsActivity do not open itself.

UPDATE: When I've moved MetricsActivity declaration to my manifest the following error occured:

Caused by: java.lang.ClassNotFoundException: Didn't find class "org.aspectj.runtime.reflect.Factory" on path: 
DexPathList[[zip file "/data/app/pl.polskikraft.android.productiondbglg-1/base.apk"],
nativeLibraryDirectories=[/data/app/pl.polskikraft.android.productiondbglg-1/lib/arm, 
/data/app/pl.polskikraft.android.productiondbglg-1/base.apk!/lib/armeabi-v7a, /vendor/lib, /system/lib]]

I must to give up with this library...

@williamwebb
Copy link
Contributor

@jmodrako you do not have to add the activity to your manifest. & can you provide an example to reproduce? Likely there is a conflict in the version of support library your app is using with the one this library brings in. Also a ./gradlew app:dependencies output would be helpful.

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

No branches or pull requests

3 participants