This question already has answers here:
Activity Declaration in AndroidManifest.xml
(6 answers)
Closed 8 years ago.
I have a button, and when it is clicked I'd like to load a new view.
I am using this main activity class
public class MainActivity extends ActionBarActivity {
#Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
}
public void buttonPressed(View v){
Intent i = new Intent(this, SwitchedActivity.class);
startActivity(i);
}
}
And then I'd like to load this other activity
public class SwitchedActivity extends Activity {
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_two);
}
}
So what should happen, is I click the button in activity_main.xml, and then it loads the layout from activity_two.xml.
The problem is, when I click the button, the app just crashes.
I get this logcat stack trace:
08-18 11:36:09.078: E/AndroidRuntime(1232): FATAL EXCEPTION: main
08-18 11:36:09.078: E/AndroidRuntime(1232): Process: com.johncorser.myapp, PID: 1232
08-18 11:36:09.078: E/AndroidRuntime(1232): java.lang.IllegalStateException: Could not execute method of the activity
08-18 11:36:09.078: E/AndroidRuntime(1232): at android.view.View$1.onClick(View.java:3823)
08-18 11:36:09.078: E/AndroidRuntime(1232): at android.view.View.performClick(View.java:4438)
08-18 11:36:09.078: E/AndroidRuntime(1232): at android.view.View$PerformClick.run(View.java:18422)
08-18 11:36:09.078: E/AndroidRuntime(1232): at android.os.Handler.handleCallback(Handler.java:733)
08-18 11:36:09.078: E/AndroidRuntime(1232): at android.os.Handler.dispatchMessage(Handler.java:95)
08-18 11:36:09.078: E/AndroidRuntime(1232): at android.os.Looper.loop(Looper.java:136)
08-18 11:36:09.078: E/AndroidRuntime(1232): at android.app.ActivityThread.main(ActivityThread.java:5017)
08-18 11:36:09.078: E/AndroidRuntime(1232): at java.lang.reflect.Method.invokeNative(Native Method)
08-18 11:36:09.078: E/AndroidRuntime(1232): at java.lang.reflect.Method.invoke(Method.java:515)
08-18 11:36:09.078: E/AndroidRuntime(1232): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:779)
08-18 11:36:09.078: E/AndroidRuntime(1232): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:595)
08-18 11:36:09.078: E/AndroidRuntime(1232): at dalvik.system.NativeStart.main(Native Method)
08-18 11:36:09.078: E/AndroidRuntime(1232): Caused by: java.lang.reflect.InvocationTargetException
08-18 11:36:09.078: E/AndroidRuntime(1232): at java.lang.reflect.Method.invokeNative(Native Method)
08-18 11:36:09.078: E/AndroidRuntime(1232): at java.lang.reflect.Method.invoke(Method.java:515)
08-18 11:36:09.078: E/AndroidRuntime(1232): at android.view.View$1.onClick(View.java:3818)
08-18 11:36:09.078: E/AndroidRuntime(1232): ... 11 more
08-18 11:36:09.078: E/AndroidRuntime(1232): Caused by: android.content.ActivityNotFoundException: Unable to find explicit activity class {com.johncorser.myapp/com.johncorser.myapp.SwitchedActivity}; have you declared this activity in your AndroidManifest.xml?
08-18 11:36:09.078: E/AndroidRuntime(1232): at android.app.Instrumentation.checkStartActivityResult(Instrumentation.java:1628)
08-18 11:36:09.078: E/AndroidRuntime(1232): at android.app.Instrumentation.execStartActivity(Instrumentation.java:1424)
08-18 11:36:09.078: E/AndroidRuntime(1232): at android.app.Activity.startActivityForResult(Activity.java:3424)
08-18 11:36:09.078: E/AndroidRuntime(1232): at android.app.Activity.startActivityForResult(Activity.java:3385)
08-18 11:36:09.078: E/AndroidRuntime(1232): at android.support.v4.app.FragmentActivity.startActivityForResult(FragmentActivity.java:839)
08-18 11:36:09.078: E/AndroidRuntime(1232): at android.app.Activity.startActivity(Activity.java:3627)
08-18 11:36:09.078: E/AndroidRuntime(1232): at android.app.Activity.startActivity(Activity.java:3595)
08-18 11:36:09.078: E/AndroidRuntime(1232): at com.johncorser.myapp.MainActivity.buttonPressed(MainActivity.java:40)
08-18 11:36:09.078: E/AndroidRuntime(1232): ... 14 more
Fair warning, I'm probably doing something VERY stupid, I'm new.
The answer lies in your logcat:
08-18 11:36:09.078: E/AndroidRuntime(1232): Caused by: android.content.ActivityNotFoundException: Unable to find explicit activity class {com.johncorser.myapp/com.johncorser.myapp.SwitchedActivity}; have you declared this activity in your AndroidManifest.xml?
So add it to your manifest like so
<activity
android:name="SwitchedActivity"
android:label="Switched">
</activity>
Whenever you add a new activity, be sure to add it to your manifest.
I am pretty certain that you did not declare the second activity in your AndroidManifest.xml file.
You should have in your manifest:
<application ... >
<activity
android:name=".MainActivity"
... >
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<activity
android:name=".SwitchedActivity"
... >
</activity>
...
</application>
Add the second activity to your manifest file. The log you posted clearly states the problem.
Add the following to your manifest:
<activity
android:name=".SwitchedActivity"/>
Please make sure you read the logcats next time or google the logcat message.
Related
This question already has answers here:
What is a NullPointerException, and how do I fix it?
(12 answers)
Closed 5 years ago.
01-02 05:30:50.220 8776-8776/com.wordpress.alhazn.puhaba E/AndroidRuntime: FATAL EXCEPTION: main
java.lang.RuntimeException: Unable to instantiate activity ComponentInfo{com.wordpress.alhazn.puhaba/com.wordpress.alhazn.puhaba.MainActivity}: java.lang.NullPointerException
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2045)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2146)
at android.app.ActivityThread.access$700(ActivityThread.java:140)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1238)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loop(Looper.java:177)
at android.app.ActivityThread.main(ActivityThread.java:4944)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:511)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1038)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:805)
at dalvik.system.NativeStart.main(Native Method)
Caused by: java.lang.NullPointerException
at android.support.v7.app.AppCompatDelegateImplBase.<init>(AppCompatDelegateImplBase.java:117)
at android.support.v7.app.AppCompatDelegateImplV9.<init>(AppCompatDelegateImplV9.java:149)
at android.support.v7.app.AppCompatDelegateImplV11.<init>(AppCompatDelegateImplV11.java:29)
at android.support.v7.app.AppCompatDelegateImplV14.<init>(AppCompatDelegateImplV14.java:54)
at android.support.v7.app.AppCompatDelegate.create(AppCompatDelegate.java:202)
at android.support.v7.app.AppCompatDelegate.create(AppCompatDelegate.java:183)
at android.support.v7.app.AppCompatActivity.getDelegate(AppCompatActivity.java:519)
at android.support.v7.app.AppCompatActivity.findViewById(AppCompatActivity.java:190)
at com.wordpress.alhazn.puhaba.MainActivity.<init>(MainActivity.java:44)
at java.lang.Class.newInstanceImpl(Native Method)
at java.lang.Class.newInstance(Class.java:1319)
at android.app.Instrumentation.newActivity(Instrumentation.java:1068)
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2036)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2146)
at android.app.ActivityThread.access$700(ActivityThread.java:140)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1238)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loop(Looper.java:177)
at android.app.ActivityThread.main(ActivityThread.java:4944)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:511)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1038)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:805)
at dalvik.system.NativeStart.main(Native Method)
Move your findViewById() calls later in the activity lifecycle. Not in <init> i.e. constructor/field initialization but rather e.g. onCreate() after you've also called setContentView().
In My app When I go to the settings activity then back, my app force to stop the activity, I don't know which mistake is there.Please help me to solve that. Thanks for your help in advance!
08-13 11:36:36.355 21968-21968/com.example.user.dictationapp E/AndroidRuntime: FATAL EXCEPTION: main
Process: com.example.user.dictationapp, PID: 21968
java.lang.RuntimeException: Unable to start activity ComponentInfo{com.example.user.dictationapp/com.example.user.dictationapp.DictationVocab}: java.lang.ClassCastException: android.view.AbsSavedState$1 cannot be cast to android.widget.CompoundButton$SavedState
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2202)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2252)
at android.app.ActivityThread.access$800(ActivityThread.java:139)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1200)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:136)
at android.app.ActivityThread.main(ActivityThread.java:5103)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:515)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:790)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:606)
at dalvik.system.NativeStart.main(Native Method)
Caused by: java.lang.ClassCastException: android.view.AbsSavedState$1 cannot be cast to android.widget.CompoundButton$SavedState
at android.widget.CompoundButton.onRestoreInstanceState(CompoundButton.java:378)
at android.view.View.dispatchRestoreInstanceState(View.java:12842)
at android.view.ViewGroup.dispatchRestoreInstanceState(ViewGroup.java:2658)
at android.view.ViewGroup.dispatchRestoreInstanceState(ViewGroup.java:2658)
at android.view.ViewGroup.dispatchRestoreInstanceState(ViewGroup.java:2658)
at android.view.ViewGroup.dispatchRestoreInstanceState(ViewGroup.java:2658)
at android.view.ViewGroup.dispatchRestoreInstanceState(ViewGroup.java:2658)
at android.view.ViewGroup.dispatchRestoreInstanceState(ViewGroup.java:2658)
at android.view.ViewGroup.dispatchRestoreInstanceState(ViewGroup.java:2658)
at android.view.View.restoreHierarchyState(View.java:12820)
at com.android.internal.policy.impl.PhoneWindow.restoreHierarchyState(PhoneWindow.java:1874)
at android.app.Activity.onRestoreInstanceState(Activity.java:949)
at android.app.Activity.performRestoreInstanceState(Activity.java:921)
at android.app.Instrumentation.callActivityOnRestoreInstanceState(Instrumentation.java:1138)
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2180)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2252)
at android.app.ActivityThread.access$800(ActivityThread.java:139)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1200)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:136)
at android.app.ActivityThread.main(ActivityThread.java:5103)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:515)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:790)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:606)
at dalvik.system.NativeStart.main(Native Method)
android.view.AbsSavedState$1 cannot be cast to android.widget.CompoundButton$SavedState
Having experienced these ClassCastExceptions before, I'd suggest that you check that you do not have a same id being shared by different widgets. Also, check with layouts in different layout-qualifiers folders for the same condition.
My App crash rarely
i want to get off this bug for ever.
this is the log that users Report
i tried so long on this but nothing helps
java.lang.RuntimeException: Unable to start activity ComponentInfo{com.xxx.xxx/com.xxx.xxx.Master_}: java.lang.NullPointerException
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2072)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2097)
at android.app.ActivityThread.access$600(ActivityThread.java:136)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1207)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loop(Looper.java:137)
at android.app.ActivityThread.main(ActivityThread.java:4787)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:511)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:789)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:556)
at dalvik.system.NativeStart.main(Native Method)
Caused by: java.lang.NullPointerException
at com.xxx.xxx.HomeFragment.onActivityCreated(HomeFragment.java:140)
at android.support.v4.app.Fragment.performActivityCreated(Fragment.java:1508)
at android.support.v4.app.FragmentManagerImpl.moveToState(FragmentManager.java:958)
at android.support.v4.app.FragmentManagerImpl.moveToState(FragmentManager.java:1115)
at android.support.v4.app.FragmentManagerImpl.moveToState(FragmentManager.java:1097)
at android.support.v4.app.FragmentManagerImpl.dispatchActivityCreated(FragmentManager.java:1895)
at android.support.v4.app.FragmentActivity.onStart(FragmentActivity.java:566)
at android.app.Instrumentation.callActivityOnStart(Instrumentation.java:1163)
at android.app.Activity.performStart(Activity.java:5018)
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2045)
... 11 more
I looked through all questions on stack overflow with similar problem, but haven't managed to find solution, that suites my case.
I need to implement following structure:
Fragment A is being replaced with fragment B. Fragment B contains ViewPager, that switches fragments C1 and C2. This works great if I use ViewPager from support library, but the problem is, that I need a ViewPager to use vertical swipe. For that purpose I'm using library by Jake Wharton from here https://stackoverflow.com/a/14268702/1220743.
Some code:
A is being replaced by B
Fragment fragment = new FragmentB();
String tag = this.getClass().getName();
FragmentManager fm = getFragmentManager();
fm.beginTransaction().replace(R.id.container, fragment).addToBackStack(tag).commit();
B initializes DirectionalViewPager
DirectionalViewPager viewPager = (DirectionalViewPager)v.findViewById(R.id.view_pager);
FragmentManager fm = getFragmentManager();
viewPager.setAdapter(new MyViewPagerAdapter(fm));
This gives me crash when A switches to B, with following crash stack:
08-18 16:47:02.320: E/AndroidRuntime(29610): FATAL EXCEPTION: main
08-18 16:47:02.320: E/AndroidRuntime(29610): java.lang.IllegalStateException: Recursive entry to executePendingTransactions
08-18 16:47:02.320: E/AndroidRuntime(29610): at android.support.v4.app.FragmentManagerImpl.execPendingActions(FragmentManager.java:1450)
08-18 16:47:02.320: E/AndroidRuntime(29610): at android.support.v4.app.FragmentManagerImpl.executePendingTransactions(FragmentManager.java:478)
08-18 16:47:02.320: E/AndroidRuntime(29610): at android.support.v4.app.FragmentStatePagerAdapter.finishUpdate(FragmentStatePagerAdapter.java:163)
08-18 16:47:02.320: E/AndroidRuntime(29610): at android.support.v4.view.DirectionalViewPager.populate(DirectionalViewPager.java:399)
08-18 16:47:02.320: E/AndroidRuntime(29610): at android.support.v4.view.DirectionalViewPager.onAttachedToWindow(DirectionalViewPager.java:550)
08-18 16:47:02.320: E/AndroidRuntime(29610): at android.view.View.dispatchAttachedToWindow(View.java:13029)
08-18 16:47:02.320: E/AndroidRuntime(29610): at android.view.ViewGroup.dispatchAttachedToWindow(ViewGroup.java:2683)
08-18 16:47:02.320: E/AndroidRuntime(29610): at android.view.ViewGroup.dispatchAttachedToWindow(ViewGroup.java:2690)
08-18 16:47:02.320: E/AndroidRuntime(29610): at android.view.ViewGroup.dispatchAttachedToWindow(ViewGroup.java:2690)
08-18 16:47:02.320: E/AndroidRuntime(29610): at android.view.ViewGroup.addViewInner(ViewGroup.java:3778)
08-18 16:47:02.320: E/AndroidRuntime(29610): at android.view.ViewGroup.addView(ViewGroup.java:3610)
08-18 16:47:02.320: E/AndroidRuntime(29610): at android.view.ViewGroup.addView(ViewGroup.java:3555)
08-18 16:47:02.320: E/AndroidRuntime(29610): at android.view.ViewGroup.addView(ViewGroup.java:3531)
08-18 16:47:02.320: E/AndroidRuntime(29610): at android.support.v4.app.FragmentManagerImpl.moveToState(FragmentManager.java:949)
08-18 16:47:02.320: E/AndroidRuntime(29610): at android.support.v4.app.FragmentManagerImpl.moveToState(FragmentManager.java:1115)
08-18 16:47:02.320: E/AndroidRuntime(29610): at android.support.v4.app.BackStackRecord.run(BackStackRecord.java:682)
08-18 16:47:02.320: E/AndroidRuntime(29610): at android.support.v4.app.FragmentManagerImpl.execPendingActions(FragmentManager.java:1478)
08-18 16:47:02.320: E/AndroidRuntime(29610): at android.support.v4.app.FragmentManagerImpl$1.run(FragmentManager.java:446)
08-18 16:47:02.320: E/AndroidRuntime(29610): at android.os.Handler.handleCallback(Handler.java:730)
08-18 16:47:02.320: E/AndroidRuntime(29610): at android.os.Handler.dispatchMessage(Handler.java:92)
08-18 16:47:02.320: E/AndroidRuntime(29610): at android.os.Looper.loop(Looper.java:176)
08-18 16:47:02.320: E/AndroidRuntime(29610): at android.app.ActivityThread.main(ActivityThread.java:5419)
08-18 16:47:02.320: E/AndroidRuntime(29610): at java.lang.reflect.Method.invokeNative(Native Method)
08-18 16:47:02.320: E/AndroidRuntime(29610): at java.lang.reflect.Method.invoke(Method.java:525)
08-18 16:47:02.320: E/AndroidRuntime(29610): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1046)
08-18 16:47:02.320: E/AndroidRuntime(29610): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:862)
08-18 16:47:02.320: E/AndroidRuntime(29610): at dalvik.system.NativeStart.main(Native Method)
Has anyone faced similar problems?
Did you ever find the solution to this? are the two fragments already in a fragment? if so use getChildFragmentManager() whats curious to me is that getFragmentManager makes it look like you are not using support v4 or it would be getSupportFragmentManager no? but by the log, it seems the error is happening when you use the support lib.
I download the latest source code for mp4parser and use this to combine two mp4 files.
When I try to combine two mp4 videos app crashed.
when I run this line of code
MovieCreator.build("mnt/sdcard/CamVideo/0.mp4")
The app crashed with and crash log is
08-11 17:27:49.023: E/AndroidRuntime(24864): FATAL EXCEPTION: main
08-11 17:27:49.023: E/AndroidRuntime(24864): java.lang.ArrayIndexOutOfBoundsException: length=0; index=0
08-11 17:27:49.023: E/AndroidRuntime(24864): at com.googlecode.mp4parser.authoring.samples.DefaultMp4SampleList.<init>(DefaultMp4SampleList.java:52)
08-11 17:27:49.023: E/AndroidRuntime(24864): at com.coremedia.iso.boxes.mdat.SampleList.<init>(SampleList.java:33)
08-11 17:27:49.023: E/AndroidRuntime(24864): at com.googlecode.mp4parser.authoring.Mp4TrackImpl.<init>(Mp4TrackImpl.java:59)
08-11 17:27:49.023: E/AndroidRuntime(24864): at com.googlecode.mp4parser.authoring.container.mp4.MovieCreator.build(MovieCreator.java:58)
08-11 17:27:49.023: E/AndroidRuntime(24864): at com.googlecode.mp4parser.authoring.container.mp4.MovieCreator.build(MovieCreator.java:39)
08-11 17:27:49.023: E/AndroidRuntime(24864): at com.coderzheaven.pack.CustomCameraActivity.MergeVideos(CustomCameraActivity.java:200)
08-11 17:27:49.023: E/AndroidRuntime(24864): at com.coderzheaven.pack.CustomCameraActivity$1.onClick(CustomCameraActivity.java:108)
08-11 17:27:49.023: E/AndroidRuntime(24864): at android.view.View.performClick(View.java:4274)
08-11 17:27:49.023: E/AndroidRuntime(24864): at android.view.View$PerformClick.run(View.java:17357)
08-11 17:27:49.023: E/AndroidRuntime(24864): at android.os.Handler.handleCallback(Handler.java:615)
08-11 17:27:49.023: E/AndroidRuntime(24864): at android.os.Handler.dispatchMessage(Handler.java:92)
08-11 17:27:49.023: E/AndroidRuntime(24864): at android.os.Looper.loop(Looper.java:137)
08-11 17:27:49.023: E/AndroidRuntime(24864): at android.app.ActivityThread.main(ActivityThread.java:4949)
08-11 17:27:49.023: E/AndroidRuntime(24864): at java.lang.reflect.Method.invokeNative(Native Method)
08-11 17:27:49.023: E/AndroidRuntime(24864): at java.lang.reflect.Method.invoke(Method.java:511)
08-11 17:27:49.023: E/AndroidRuntime(24864): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1043)
08-11 17:27:49.023: E/AndroidRuntime(24864): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:810)
08-11 17:27:49.023: E/AndroidRuntime(24864): at dalvik.system.NativeStart.main(Native Method)
I am using the same properties files that is in sample code "isoparser-custom.properties" and "isoparser-default.properties"
I am expecting movie object should build properly. Can anyone tell me what I am doing wrong in this or can send me fully function code that merge two mp4 files.
EDITED:
I download this file "isoparser-1.0.2.jar" from maven project (http://repo1.maven.org/maven2/com/googlecode/mp4parser/isoparser/1.0.2/) and but app crashed with this crash report
08-18 17:32:20.571: E/AndroidRuntime(31446): FATAL EXCEPTION: main
08-18 17:32:20.571: E/AndroidRuntime(31446): java.lang.ExceptionInInitializerError
08-18 17:32:20.571: E/AndroidRuntime(31446): at java.lang.Class.classForName(Native Method)
08-18 17:32:20.571: E/AndroidRuntime(31446): at java.lang.Class.forName(Class.java:217)
08-18 17:32:20.571: E/AndroidRuntime(31446): at java.lang.Class.forName(Class.java:172)
08-18 17:32:20.571: E/AndroidRuntime(31446): at com.coremedia.iso.PropertyBoxParserImpl.createBox(PropertyBoxParserImpl.java:86)
08-18 17:32:20.571: E/AndroidRuntime(31446): at com.coremedia.iso.AbstractBoxParser.parseBox(AbstractBoxParser.java:102)
08-18 17:32:20.571: E/AndroidRuntime(31446): at com.googlecode.mp4parser.BasicContainer.next(BasicContainer.java:155)
08-18 17:32:20.571: E/AndroidRuntime(31446): at com.googlecode.mp4parser.BasicContainer.hasNext(BasicContainer.java:131)
08-18 17:32:20.571: E/AndroidRuntime(31446): at com.googlecode.mp4parser.util.LazyList$1.hasNext(LazyList.java:55)
08-18 17:32:20.571: E/AndroidRuntime(31446): at com.coremedia.iso.IsoFile.getMovieBox(IsoFile.java:109)
08-18 17:32:20.571: E/AndroidRuntime(31446): at com.googlecode.mp4parser.authoring.container.mp4.MovieCreator.build(MovieCreator.java:48)
08-18 17:32:20.571: E/AndroidRuntime(31446): at com.googlecode.mp4parser.authoring.container.mp4.MovieCreator.build(MovieCreator.java:35)
08-18 17:32:20.571: E/AndroidRuntime(31446): at com.coderzheaven.pack.CustomCameraActivity.MergeVideos(CustomCameraActivity.java:200)
08-18 17:32:20.571: E/AndroidRuntime(31446): at com.coderzheaven.pack.CustomCameraActivity$1.onClick(CustomCameraActivity.java:108)
08-18 17:32:20.571: E/AndroidRuntime(31446): at android.view.View.performClick(View.java:3517)
08-18 17:32:20.571: E/AndroidRuntime(31446): at android.view.View$PerformClick.run(View.java:14155)
08-18 17:32:20.571: E/AndroidRuntime(31446): at android.os.Handler.handleCallback(Handler.java:605)
08-18 17:32:20.571: E/AndroidRuntime(31446): at android.os.Handler.dispatchMessage(Handler.java:92)
08-18 17:32:20.571: E/AndroidRuntime(31446): at android.os.Looper.loop(Looper.java:137)
08-18 17:32:20.571: E/AndroidRuntime(31446): at android.app.ActivityThread.main(ActivityThread.java:4666)
08-18 17:32:20.571: E/AndroidRuntime(31446): at java.lang.reflect.Method.invokeNative(Native Method)
08-18 17:32:20.571: E/AndroidRuntime(31446): at java.lang.reflect.Method.invoke(Method.java:511)
08-18 17:32:20.571: E/AndroidRuntime(31446): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:809)
08-18 17:32:20.571: E/AndroidRuntime(31446): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:576)
08-18 17:32:20.571: E/AndroidRuntime(31446): at dalvik.system.NativeStart.main(Native Method)
08-18 17:32:20.571: E/AndroidRuntime(31446): Caused by: java.lang.NoClassDefFoundError: org.aspectj.runtime.reflect.Factory
08-18 17:32:20.571: E/AndroidRuntime(31446): at com.coremedia.iso.boxes.FileTypeBox.ajc$preClinit(FileTypeBox.java:1)
08-18 17:32:20.571: E/AndroidRuntime(31446): at com.coremedia.iso.boxes.FileTypeBox.<clinit>(FileTypeBox.java:1)
08-18 17:32:20.571: E/AndroidRuntime(31446): ... 24 more
you have not invoked the aspectJ compiler/compile time weaving when you were building the mp4parser on your own. Please either use a precompiled version - they are available on maven central - or make sure that you invoke the compile time weaving.
Newer version than on Maven Central are available in Sonatype OSS staging repositories. In the header of the repository tab please select "Nexus Managed Repositories" (instead of User Managed Repositories) and search for mp4parser.
If you do not use a dependency management tool such as maven or gradle please also make sure that you include the AspectJ runtime jar (at the moment version 1.8.0).
Grüße,
Sebastian