I'm using mp4parser
to merge videos
. The app runs perfect when running from A.S. but if I install the app manually (transfer and run the APK
) or if I run it from TestFairy
, the app crashes.
This started happening when I updated my Target Sdk
to Lollipop
.
I've added the
`aspectjrt-1.7.3.jar`
`isoparser-1.0-RC-27.jar`
into the libs
dir in my project.
I've also tried with below versions
`aspectjrt-1.8.5.jar`
`isoparser-1.0-RC-37.jar`
`isoparser-1.0.6.jar`.
Not sure if its the right way but it works from Android Studio
then crashes from TestFairy
or Manual install
.
The error says
com.coremedia.iso.boxes.FileTypeBox
missing
but its there in the isoparser jar
.
What am I missing, is this a version issue?
My device is running Android 4.2.2
could this also be a problem if my target SDK
is Android 5.0
The exception is:
Caused by: java.lang.ClassNotFoundException:com.coremedia.iso.boxes.FileTypeBox
Caused by: java.lang.ClassNotFoundException: Didn't find class "com.coremedia.iso.boxes.FileTypeBox" on path: /data/app/com.myapp.appname-1.apk
Whenever you get a ClassNotFound exception your classloader can't find the class it needs to operate. It has nothing to do with MP4 parser not working on 4.2.2 as suggested above.
Do you use Gradle? Is the class bundled as a library in your gradle build file?
Try to add this under dependencies { } in your app's build.gradle file:
This will include all the jar-files in your libs folder in the final build.
Sorry late answer, I found after much frustration, that gradle was not packaging my lib files in the apk, it had nothing to do with mp4Parser, eventually after updating Android Studio, all SDK's and Gradle the apk packaged properly.
Add these 2 lines in your
proguard-rules.pro
. This worked for me.make your
build.gradle
to useproguard-rules.pro
like this :