toro: Trying to Inflate in RecyclerView -> InflateException / ClassNotFoundException
Greetings! I don’t believe this is an issue with your library so much as a configuration issue for which you may be able to offer valuable advice. I am trying to inflate a layout for a viewholder in my recyclerview which contains your Toro view. Unfortunately, I keep receiving both an InflateException and a ClassNotFoundException.
Any ideas on how to best configure my project?
gradle-wrapper.properties
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-2.11-all.zip
app/build.gradle
plugin: 'com.android.application'
android {
compileSdkVersion 23
buildToolsVersion "23.0.1"
defaultConfig {
applicationId "twitcher.twitcherurlconnect"
minSdkVersion 23
targetSdkVersion 23
versionCode 1
versionName "1.0"
multiDexEnabled true
}
dexOptions {
javaMaxHeapSize "4g"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
}
ext {
toro_latest_version = '1.2.0'
}
dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
compile 'com.android.support:multidex:1.0.0'
compile 'com.android.support:appcompat-v7:23.2.1'
compile 'com.github.bumptech.glide:glide:3.6.1'
compile 'com.android.support:design:23.2.1'
compile 'com.yqritc:recyclerview-flexibledivider:1.4.0'
compile "com.github.eneim:Toro:${toro_latest_version}"
compile "com.github.eneim:Toro:1.2.0"
}
Device: Android: Nexus 5 API 23 x86 Emulator
Stack Tr
> E/AndroidRuntime: FATAL EXCEPTION: main
> Process: twitcher.twitcherurlconnect, PID: 29559
> android.view.InflateException: Binary XML file line #84: Binary XML file line #84: Error inflating class im.ene.lab.toro.player.widget.ToroVideoView
> at android.view.LayoutInflater.inflate(LayoutInflater.java:539)
> at android.view.LayoutInflater.inflate(LayoutInflater.java:423)
> at twitcher.twitcherurlconnect.StatusesAdapter.onCreateViewHolder(StatusesAdapter.java:160)
> at android.support.v7.widget.RecyclerView$Adapter.createViewHolder(RecyclerView.java:5464)
> at android.support.v7.widget.RecyclerView$Recycler.getViewForPosition(RecyclerView.java:4689)
> at android.support.v7.widget.RecyclerView$Recycler.getViewForPosition(RecyclerView.java:4599)
> at android.support.v7.widget.LinearLayoutManager$LayoutState.next(LinearLayoutManager.java:1988)
> at android.support.v7.widget.LinearLayoutManager.layoutChunk(LinearLayoutManager.java:1384)
> at android.support.v7.widget.LinearLayoutManager.fill(LinearLayoutManager.java:1347)
> at android.support.v7.widget.LinearLayoutManager.scrollBy(LinearLayoutManager.java:1174)
> at android.support.v7.widget.LinearLayoutManager.scrollVerticallyBy(LinearLayoutManager.java:1031)
> at android.support.v7.widget.RecyclerView$ViewFlinger.run(RecyclerView.java:4043)
> at android.view.Choreographer$CallbackRecord.run(Choreographer.java:858)
> at android.view.Choreographer.doCallbacks(Choreographer.java:670)
> at android.view.Choreographer.doFrame(Choreographer.java:603)
> at android.view.Choreographer$FrameDisplayEventReceiver.run(Choreographer.java:844)
> at android.os.Handler.handleCallback(Handler.java:739)
> at android.os.Handler.dispatchMessage(Handler.java:95)
> at android.os.Looper.loop(Looper.java:148)
> at android.app.ActivityThread.main(ActivityThread.java:5417)
> at java.lang.reflect.Method.invoke(Native Method)
> at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:726)
> at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:616)
> Caused by: android.view.InflateException: Binary XML file line #84: Error inflating class im.ene.lab.toro.player.widget.ToroVideoView
> at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:776)
> at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:704)
> at android.view.LayoutInflater.rInflate(LayoutInflater.java:835)
> at android.view.LayoutInflater.rInflateChildren(LayoutInflater.java:798)
> at android.view.LayoutInflater.inflate(LayoutInflater.java:515)
> at android.view.LayoutInflater.inflate(LayoutInflater.java:423)
> at twitcher.twitcherurlconnect.StatusesAdapter.onCreateViewHolder(StatusesAdapter.java:160)
> at android.support.v7.widget.RecyclerView$Adapter.createViewHolder(RecyclerView.java:5464)
> at android.support.v7.widget.RecyclerView$Recycler.getViewForPosition(RecyclerView.java:4689)
> at android.support.v7.widget.RecyclerView$Recycler.getViewForPosition(RecyclerView.java:4599)
> at android.support.v7.widget.LinearLayoutManager$LayoutState.next(LinearLayoutManager.java:1988)
> at android.support.v7.widget.LinearLayoutManager.layoutChunk(LinearLayoutManager.java:1384)
> at android.support.v7.widget.LinearLayoutManager.fill(LinearLayoutManager.java:1347)
> at android.support.v7.widget.LinearLayoutManager.scrollBy(LinearLayoutManager.java:1174)
> at android.support.v7.widget.LinearLayoutManager.scrollVerticallyBy(LinearLayoutManager.java:1031)
> at android.support.v7.widget.RecyclerView$ViewFlinger.run(RecyclerView.java:4043)
> at android.view.Choreographer$CallbackRecord.run(Choreographer.java:858)
> at android.view.Choreographer.doCallbacks(Choreographer.java:670)
> at android.view.Choreographer.doFrame(Choreographer.java:603)
> at android.view.Choreographer$FrameDisplayEventReceiver.run(Choreographer.java:844)
> at android.os.Handler.handleCallback(Handler.java:739)
> at android.os.Handler.dispatchMessage(Handler.java:95)
> at android.os.Looper.loop(Looper.java:148)
> at android.app.ActivityThread.main(ActivityThread.java:5417)
> at java.lang.reflect.Method.invoke(Native Method)
> at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:726)
> at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:616)
> Caused by: java.lang.ClassNotFoundException: Didn't find class "im.ene.lab.toro.player.widget.ToroVideoView" on path: DexPathList[[zip file "/data/app/twitcher.twitcherurlconnect-1/base.apk"],nativeLibraryDirectories=[/data/app/twitcher.twitcherurlconnect-1/lib/x86, /vendor/lib, /system/lib]]
> at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:56)
> at java.lang.ClassLoader.loadClass(ClassLoader.java:511)
> at java.lang.ClassLoader.loadClass(ClassLoader.java:469)
> at android.view.LayoutInflater.createView(LayoutInflater.java:583)
> at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:764)
> at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:704)
> at android.view.LayoutInflater.rInflate(LayoutInflater.java:835)
> at android.view.LayoutInflater.rInflateChildren(LayoutInflater.java:798)
> at android.view.LayoutInflater.inflate(LayoutInflater.java:515)
> at android.view.LayoutInflater.inflate(LayoutInflater.java:423)
> at twitcher.twitcherurlconnect.StatusesAdapter.onCreateViewHolder(StatusesAdapter.java:160)
> at android.support.v7.widget.RecyclerView$Adapter.createViewHolder(RecyclerView.java:5464)
> at android.support.v7.widget.RecyclerView$Recycler.getViewForPosition(RecyclerView.java:4689)
> at android.support.v7.widget.RecyclerView$Recycler.getViewForPosition(RecyclerView.java:4599)
> at android.support.v7.widget.LinearLayoutManager$LayoutState.next(LinearLayoutManager.java:1988)
> at android.support.v7.widget.LinearLayoutManager.layoutChunk(LinearLayoutManager.java:1384)
> at android.support.v7.widget.LinearLayoutManager.fill(LinearLayoutManager.java:1347)
> at android.support.v7.widget.LinearLayoutManager.scrollBy(LinearLayoutManager.java:1174)
> at android.support.v7.widget.LinearLayoutManager.scrollVerticallyBy(LinearLayoutManager.java:1031)
> at android.support.v7.widget.RecyclerView$ViewFlinger.run(RecyclerView.java:4043)
> at android.view.Choreographer$CallbackRecord.run(Choreographer.java:858)
> at android.view.Choreographer.doCallbacks(Choreographer.java:670)
> at android.view.Choreographer.doFrame(Choreographer.java:603)
> at android.view.Choreographer$FrameDisplayEventReceiver.run(Choreographer.java:844)
> at android.os.Handler.handleCallback(Handler.java:739)
> at android.os.Handler.dispatchMessage(Handler.java:95)
> at android.os.Looper.loop(Looper.java:148)
> at android.app.ActivityThread.main(ActivityThread.java:5417)
> at java.lang.reflect.Method.invoke(Native Method)
> at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:726)
> at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:616)
> Suppressed: java.lang.ClassNotFoundException: Didn't find class "im.ene.lab.toro.player.widget.ToroVideoView" on path: DexPathList[[dex file "/data/data/twitcher.twitcherurlconnect/files/instant-run/dex/slice-support-annotations-23.2.1_cc3ada849a687348dbc9a6080b8f35b918a42c4f-classes.dex", dex file "/data/data/twitcher.twitcherurlconnect/files/instant-run/dex/slice-slice_9-classes.dex", dex file "/data/data/twitcher.twitcherurlconnect/files/instant-run/dex/slice-slice_8-classes.dex", dex file "/data/data/twitcher.twitcherurlconnect/files/instant-run/dex/slice-slice_7-classes.dex", dex file "/data/data/twitcher.twitcherurlconnect/files/instant-run/dex/slice-slice_6-classes.dex", dex file "/data/data/twitcher.twitcherurlconnect/files/instant-run/dex/slice-slice_5-classes.dex", dex file "/data/data/twitcher.twitcherurlconnect/files/instant-run/dex/slice-slice_4-classes.dex", dex file "/data/data/twitcher.twitcherurlconnect
>
>
About this issue
- Original URL
- State: closed
- Created 8 years ago
- Comments: 26 (11 by maintainers)
Thank you! I have it added into my project and will now begin trying to develop a working implementation.
You have been very helpful, and I appreciate it.
@adventurist You need to add corresponding repository. Please refer to README again, I have just updated it.
No problem. Hopefully I’ll have more time to play with it tonight. If I learn anything, I will post updates here. Thanks!
@langrenfengzi That’s right, final release will have kind of many changes with RC5, so sorry for the inconvenient, but I would like to prevent future conflict with normal naming. For now, the spec is almost done (in me), I’m testing and reviewing to make sure everything works well.