ksoichiro / Android-ObservableScrollView

Android library to observe scroll events on scrollable views.
http://ksoichiro.github.io/Android-ObservableScrollView/
Apache License 2.0
9.66k stars 2.06k forks source link

Rendering problems #176

Open ObsessiveOrange opened 9 years ago

ObsessiveOrange commented 9 years ago

Hi,

I've run into rendering problems on Android Studio, v1.2.2

I've imported the library, and while using it, I am getting the following problem:

Rendering Problems
The following classes could not be found:
com.github.ksoichiro.android.observablescrollview.ObservableRecyclerView

So, rendering problems. However, the rest of my code does seem to find the right dependency (ie, alt-clicking on any of the classes brings me to the right decompiled file)

My build.gradle dependencies:

dependencies {
    compile fileTree(include: ['*.jar'], dir: 'libs')
    compile 'com.android.support:appcompat-v7:22.2.0'
    compile 'com.android.support:recyclerview-v7:22.2.0'
    compile(
            [group: 'com.fasterxml.jackson.core', name: 'jackson-core', version: '2.5.4'],
            [group: 'com.fasterxml.jackson.core', name: 'jackson-annotations', version: '2.5.4'],
            [group: 'com.fasterxml.jackson.core', name: 'jackson-databind', version: '2.5.4']
    )
    compile 'com.android.support:support-v4:22.2.0'
    compile 'com.github.ksoichiro:android-observablescrollview:1.5.2'
}

Am I missing anything? I have already invalidated caches and restarted.

eneim commented 9 years ago

You may face the huge dex file problem by which your dex could not index all of your classes as it reaches the maximum number (65K). Try to enable multidex in your app or use proguard to minify your dex ... See if it helps.

ObsessiveOrange commented 9 years ago

Thanks for your response.

My current project is rather barebones, with very few methods, so unless the AOSV library has a massive number of classes, i would be surprised if i hit 65K classes.

Also, the issue only appears while editing the layout files using the GUI. I can alt-click in Android studio, and it brings me to the right file. Thus the confusion.

eneim commented 9 years ago

Any problem occurs ''before a clean build" might related to Android Studio rather than this library. Please try to build your app and see if it crash. Android Studio Build tools sometime doesn't recognize of customized libraries. Beware it by yourself.