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

Unable to start activity ComponentInfo #110

Closed
allbdeveloper opened this issue Oct 21, 2016 · 5 comments
Closed

Unable to start activity ComponentInfo #110

allbdeveloper opened this issue Oct 21, 2016 · 5 comments

Comments

@allbdeveloper
Copy link

@allbdeveloper allbdeveloper commented Oct 21, 2016

Bug

Version Number of Plugin: 2.6.0.9 beta
Device Tested On: Samsung Galaxy s4 5.0 Lollipop (api 21)
Simulator Tested On:

Android SDK target version : Android N

Expected Behavior

Actual Behavior

Steps to reproduce the Behavior

After I Added provider tag and file_paths.xml file,
App crashes on start.

Java.Lang.RuntimeException: Unable to start activity ComponentInfo{com.alXXXc.allbx/md5010ca2fa7c1df37f0a4acf6faa4da136.SplashActivity}: java.lang.NullPointerException: Attempt to invoke virtual method 'void android.support.v7.widget.ContentFrameLayout.setId(int)' on a null object reference ---> Java.Lang.NullPointerException: Attempt to invoke virtual method 'void android.support.v7.widget.ContentFrameLayout.setId(int)' on a null object reference
at java.lang.NullPointerException: Attempt to invoke virtual method 'void android.support.v7.widget.ContentFrameLayout.setId(int)' on a null object reference
at at android.support.v7.app.AppCompatDelegateImplV7.createSubDecor(AppCompatDelegateImplV7.java:487)
at at android.support.v7.app.AppCompatDelegateImplV7.ensureSubDecor(AppCompatDelegateImplV7.java:309)
at at android.support.v7.app.AppCompatDelegateImplV7.onPostCreate(AppCompatDelegateImplV7.java:166)
at at android.support.v7.app.AppCompatActivity.onPostCreate(AppCompatActivity.java:94)
at at android.app.Instrumentation.callActivityOnPostCreate(Instrumentation.java:1200)
at at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2675)
at at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2758)
at at android.app.ActivityThread.access$900(ActivityThread.java:177)
at at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1448)
at at android.os.Handler.dispatchMessage(Handler.java:102)
at at android.os.Looper.loop(Looper.java:145)
at at android.app.ActivityThread.main(ActivityThread.java:5942)
at at java.lang.reflect.Method.invoke(Native Method)
at at java.lang.reflect.Method.invoke(Method.java:372)
at at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1388)
at at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1183)
--- End of inner exception stack trace ---
at java.lang.RuntimeException: Unable to start activity ComponentInfo{com.alXXXc.allbx/md5010ca2fa7c1df37f0a4acf6faa4da136.SplashActivity}: java.lang.NullPointerException: Attempt to invoke virtual method 'void android.support.v7.widget.ContentFrameLayout.setId(int)' on a null object reference
at at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2693)
at at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2758)
at at android.app.ActivityThread.access$900(ActivityThread.java:177)
at at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1448)
at at android.os.Handler.dispatchMessage(Handler.java:102)
at at android.os.Looper.loop(Looper.java:145)
at at android.app.ActivityThread.main(ActivityThread.java:5942)
at at java.lang.reflect.Method.invoke(Native Method)
at at java.lang.reflect.Method.invoke(Method.java:372)
at at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1388)
at at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1183)
at Caused by: java.lang.NullPointerException: Attempt to invoke virtual method 'void android.support.v7.widget.ContentFrameLayout.setId(int)' on a null object reference
at at android.support.v7.app.AppCompatDelegateImplV7.createSubDecor(AppCompatDelegateImplV7.java:487)
at at android.support.v7.app.AppCompatDelegateImplV7.ensureSubDecor(AppCompatDelegateImplV7.java:309)
at at android.support.v7.app.AppCompatDelegateImplV7.onPostCreate(AppCompatDelegateImplV7.java:166)
at at android.support.v7.app.AppCompatActivity.onPostCreate(AppCompatActivity.java:94)
at at android.app.Instrumentation.callActivityOnPostCreate(Instrumentation.java:1200)
at at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2675)
at ... 10 more

Feature Request:

Please fill in what you would like

@jamesmontemagno
Copy link
Owner

@jamesmontemagno jamesmontemagno commented Oct 22, 2016

You must follow: https://github.com/jamesmontemagno/MediaPlugin#important The sample shows an example.

@allbdeveloper
Copy link
Author

@allbdeveloper allbdeveloper commented Oct 22, 2016

If your application targets Android N (API 24) or newer, you must use version 2.6.0+.

This does not mean that I set target SDK to API 24, but Target device(smartphone)'s SDK is 24.
If so, I misunderstood.

I have been using this plugin so long time.
And I noticed new important note and added it.

@jamesmontemagno

@jamesmontemagno
Copy link
Owner

@jamesmontemagno jamesmontemagno commented Oct 22, 2016

Do you have a small sample that I could see to try to reproduce it worked great for me on device and simulators.

@jamesmontemagno
Copy link
Owner

@jamesmontemagno jamesmontemagno commented Jun 30, 2017

@Jeevamca ? what are you talking about?

@johnnyb
Copy link

@johnnyb johnnyb commented Apr 9, 2018

FYI - I was getting the same result. I had the target version set to Android 7, but the minimum Android version was set to 4.4. Bumping the minimum Android up to 6 resolved my problem.

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

Successfully merging a pull request may close this issue.

None yet
3 participants