THEOplayer / android-sdk-starter-project

This Android project is an example how to integrate THEOplayer into an Android app.
https://www.theoplayer.com
8 stars 2 forks source link

Crash while opening player #2

Open balavishnu opened 4 years ago

balavishnu commented 4 years ago

Hi,

I get the following error when we open the Activity which has the player integrated into it.

2020-07-23 12:30:32.464 6245-6245/tt.com.channelwall E/AndroidRuntime: FATAL EXCEPTION: main Process: tt.com.channelwall, PID: 6245 java.lang.RuntimeException: Unable to start activity ComponentInfo{tt.com.channelwall/tt.com.channelwall.activities.PlayVideoTheo}: android.view.InflateException: Binary XML file line #21: Binary XML file line #21: Error inflating class com.theoplayer.android.api.THEOplayerView at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:3037) at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:3172) at android.app.servertransaction.LaunchActivityItem.execute(LaunchActivityItem.java:78) at android.app.servertransaction.TransactionExecutor.executeCallbacks(TransactionExecutor.java:108) at android.app.servertransaction.TransactionExecutor.execute(TransactionExecutor.java:68) at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1906) at android.os.Handler.dispatchMessage(Handler.java:106) at android.os.Looper.loop(Looper.java:193) at android.app.ActivityThread.main(ActivityThread.java:6863) at java.lang.reflect.Method.invoke(Native Method) at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:537) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:858) Caused by: android.view.InflateException: Binary XML file line #21: Binary XML file line #21: Error inflating class com.theoplayer.android.api.THEOplayerView Caused by: android.view.InflateException: Binary XML file line #21: Error inflating class com.theoplayer.android.api.THEOplayerView Caused by: java.lang.reflect.InvocationTargetException at java.lang.reflect.Constructor.newInstance0(Native Method) at java.lang.reflect.Constructor.newInstance(Constructor.java:343) at android.view.LayoutInflater.createView(LayoutInflater.java:647) at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:790) at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:730) at android.view.LayoutInflater.rInflate(LayoutInflater.java:863) at android.view.LayoutInflater.rInflateChildren(LayoutInflater.java:824) at android.view.LayoutInflater.rInflate(LayoutInflater.java:866) at android.view.LayoutInflater.rInflateChildren(LayoutInflater.java:824) at android.view.LayoutInflater.rInflate(LayoutInflater.java:866) at android.view.LayoutInflater.rInflateChildren(LayoutInflater.java:824) at android.view.LayoutInflater.inflate(LayoutInflater.java:515) at android.view.LayoutInflater.inflate(LayoutInflater.java:423) at android.view.LayoutInflater.inflate(LayoutInflater.java:374) at androidx.appcompat.app.AppCompatDelegateImpl.setContentView(AppCompatDelegateImpl.java:555) at androidx.appcompat.app.AppCompatActivity.setContentView(AppCompatActivity.java:161) at tt.com.channelwall.activities.PlayVideoTheo.onCreate(PlayVideoTheo.java:127) at android.app.Activity.performCreate(Activity.java:7149) at android.app.Activity.performCreate(Activity.java:7140) at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1288) at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:3017) at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:3172) at android.app.servertransaction.LaunchActivityItem.execute(LaunchActivityItem.java:78) at android.app.servertransaction.TransactionExecutor.executeCallbacks(TransactionExecutor.java:108) at android.app.servertransaction.TransactionExecutor.execute(TransactionExecutor.java:68) at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1906) at android.os.Handler.dispatchMessage(Handler.java:106) at android.os.Looper.loop(Looper.java:193) at android.app.ActivityThread.main(ActivityThread.java:6863) at java.lang.reflect.Method.invoke(Native Method) at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:537) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:858) Caused by: java.lang.NoClassDefFoundError: Failed resolution of: Lcom/google/ads/interactivemedia/v3/api/AdsLoader$AdsLoadedListener; 2020-07-23 12:30:32.466 6245-6245/tt.com.channelwall E/AndroidRuntime: at com.theoplayer.android.api.THEOplayerView.(THEOplayerView.java:137) at com.theoplayer.android.api.THEOplayerView.(THEOplayerView.java:196) ... 32 more Caused by: java.lang.ClassNotFoundException: Didn't find class "com.google.ads.interactivemedia.v3.api.AdsLoader$AdsLoadedListener" on path: DexPathList[[zip file "/data/app/tt.com.channelwall-cfvbn0iApHKrsPl5xLoYbA==/base.apk"],nativeLibraryDirectories=[/data/app/tt.com.channelwall-cfvbn0iApHKrsPl5xLoYbA==/lib/arm64, /system/lib64, /system/vendor/lib64]] at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:169) at java.lang.ClassLoader.loadClass(ClassLoader.java:379) at java.lang.ClassLoader.loadClass(ClassLoader.java:312) ... 34 more 2020-07-23 12:30:32.517 6245-6245/tt.com.channelwall E/AndroidRuntime: FATAL EXCEPTION: main Process: tt.com.channelwall, PID: 6245 java.lang.RuntimeException: Unable to start activity ComponentInfo{tt.com.channelwall/tt.com.channelwall.activities.PlayVideoTheo}: android.view.InflateException: Binary XML file line #21: Binary XML file line #21: Error inflating class com.theoplayer.android.api.THEOplayerView at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:3037) at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:3172) at android.app.servertransaction.LaunchActivityItem.execute(LaunchActivityItem.java:78) at android.app.servertransaction.TransactionExecutor.executeCallbacks(TransactionExecutor.java:108) at android.app.servertransaction.TransactionExecutor.execute(TransactionExecutor.java:68) at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1906) at android.os.Handler.dispatchMessage(Handler.java:106) at android.os.Looper.loop(Looper.java:193) at android.app.ActivityThread.main(ActivityThread.java:6863) at java.lang.reflect.Method.invoke(Native Method) at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:537) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:858) Caused by: android.view.InflateException: Binary XML file line #21: Binary XML file line #21: Error inflating class com.theoplayer.android.api.THEOplayerView Caused by: android.view.InflateException: Binary XML file line #21: Error inflating class com.theoplayer.android.api.THEOplayerView Caused by: java.lang.reflect.InvocationTargetException at java.lang.reflect.Constructor.newInstance0(Native Method) at java.lang.reflect.Constructor.newInstance(Constructor.java:343) at android.view.LayoutInflater.createView(LayoutInflater.java:647) at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:790) at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:730) at android.view.LayoutInflater.rInflate(LayoutInflater.java:863) at android.view.LayoutInflater.rInflateChildren(LayoutInflater.java:824) at android.view.LayoutInflater.rInflate(LayoutInflater.java:866) at android.view.LayoutInflater.rInflateChildren(LayoutInflater.java:824) at android.view.LayoutInflater.rInflate(LayoutInflater.java:866) at android.view.LayoutInflater.rInflateChildren(LayoutInflater.java:824) at android.view.LayoutInflater.inflate(LayoutInflater.java:515) at android.view.LayoutInflater.inflate(LayoutInflater.java:423) at android.view.LayoutInflater.inflate(LayoutInflater.java:374) at androidx.appcompat.app.AppCompatDelegateImpl.setContentView(AppCompatDelegateImpl.java:555) at androidx.appcompat.app.AppCompatActivity.setContentView(AppCompatActivity.java:161) at tt.com.channelwall.activities.PlayVideoTheo.onCreate(PlayVideoTheo.java:127) at android.app.Activity.performCreate(Activity.java:7149) at android.app.Activity.performCreate(Activity.java:7140) at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1288) at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:3017) at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:3172) at android.app.servertransaction.LaunchActivityItem.execute(LaunchActivityItem.java:78) at android.app.servertransaction.TransactionExecutor.executeCallbacks(TransactionExecutor.java:108) at android.app.servertransaction.TransactionExecutor.execute(TransactionExecutor.java:68) at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1906) at android.os.Handler.dispatchMessage(Handler.java:106) at android.os.Looper.loop(Looper.java:193) at android.app.ActivityThread.main(ActivityThread.java:6863) at java.lang.reflect.Method.invoke(Native Method) at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:537) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:858) Caused by: java.lang.NoClassDefFoundError: Failed resolution of: Lcom/google/ads/interactivemedia/v3/api/AdsLoader$AdsLoadedListener; 2020-07-23 12:30:32.523 6245-6245/tt.com.channelwall E/AndroidRuntime: at com.theoplayer.android.api.THEOplayerView.(THEOplayerView.java:137) at com.theoplayer.android.api.THEOplayerView.(THEOplayerView.java:196) ... 32 more Caused by: java.lang.ClassNotFoundException: Didn't find class "com.google.ads.interactivemedia.v3.api.AdsLoader$AdsLoadedListener" on path: DexPathList[[zip file "/data/app/tt.com.channelwall-cfvbn0iApHKrsPl5xLoYbA==/base.apk"],nativeLibraryDirectories=[/data/app/tt.com.channelwall-cfvbn0iApHKrsPl5xLoYbA==/lib/arm64, /system/lib64, /system/vendor/lib64]] at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:169) at java.lang.ClassLoader.loadClass(ClassLoader.java:379) at java.lang.ClassLoader.loadClass(ClassLoader.java:312) ... 34 more

Danesz commented 4 years ago

Hi, based on the stack trace it seems you are using a THEOplayer SDK build that has native Google DAI enabled, but you forgot to add the DAI library to your project.

Here you can find more details about it: https://docs.portal.theoplayer.com/how-to-guides/01-ads/08-google-dai.md

balavishnu commented 3 years ago

@Danesz Can I get the link to download TheoPlayer SDK without Google DAI?

Danesz commented 3 years ago

You can get one via our Portal: https://portal.theoplayer.com/login