timroes / EnhancedListView

[DEPRECATED] An Android ListView with enhanced functionality (e.g. Swipe To Dismiss or Undo)
Other
463 stars 147 forks source link

java.lang.NoClassDefFoundError: com.nineoldandroids.view.ViewHelper #21

Closed Cidro closed 10 years ago

Cidro commented 10 years ago

I'm getting this error whenever i try to slide one of the items of the list. I've found a few posts on this but all of them are Eclipse specific and i'm using Android Studio. Any ideas on how to solve this?

Thanks.

Cidro commented 10 years ago

Had to add NineOldAndroids (http://nineoldandroids.com/) library to my prject to make it work.

timroes commented 10 years ago

Actually you shouldn't include this by hand, but Gradle seems to be a bit buggy when it comes to resolves transitive dependencies. Sometimes a ./gradlew clean from the command line helps other times it seems not to. Unfortunately I couldn't reproduce right now any of these errors.

ntdb commented 10 years ago

I've also experienced this today on Android Studio 0.4.3.

Randomly and probably unhelpfully, removing "@aar" from my dependency declaration in build.gradle caused NOA to be included and ELV to be excluded.

draskosaric commented 10 years ago

I had the same issue here and resolved it by adding library (from https://github.com/JakeWharton/NineOldAndroids/downloads) to my project. Using Android Studio 0.4.3 as ntdb.

aalemayhu commented 10 years ago

I had the same issue today and resolved it by adding compile 'com.nineoldandroids:library:2.4.0' to dependencies in my build.gradle file.

timroes commented 10 years ago

Actually there shouldn't be a need to add it (that's what gradle should do). Could someone send me (best per mail to mail@timroes.de) the output of ./gradlew app:dependencies where app is the name of the module (not the whole project). It should put out a long list of dependencies for each task. Perhaps I can find something that helps track that down.

chenxxpro commented 10 years ago

Thinks :+1: adding compile 'com.nineoldandroids:library:2.4.0' to dependencies in my build.gradle file.

slisznia commented 10 years ago

I'm having the exact same issue using Gradle 1.12.

E/AndroidRuntime( 5338): FATAL EXCEPTION: main E/AndroidRuntime( 5338): java.lang.NoClassDefFoundError: com.nineoldandroids.view.ViewHelper E/AndroidRuntime( 5338): at de.timroes.android.listview.EnhancedListView.onTouchEvent(EnhancedListView.java:776) E/AndroidRuntime( 5338): at android.view.View.dispatchTouchEvent(View.java:7263)

Dependencies: compile - Classpath for compiling the main sources. +--- project :Interface:Connect +--- project :Library:Core | --- com.pushcoin.lib:pcos:1.0 +--- project :Library:Integrator | --- project :Interface:Connect +--- project :Library:SlidingMenu:library | --- com.android.support:support-v4:13.0.0 --- de.timroes.android:EnhancedListView:0.3.2

build.gradle: ... dependencies { compile project(':Interface:Connect') compile project(':Library:Core') compile project(':Library:Integrator') compile project(':Library:SlidingMenu:library') compile 'de.timroes.android:EnhancedListView:0.3.2@aar' compile fileTree(dir: 'libs', include: '*.jar'); }

Naturally, I'd prefer not to add nineoldandroids as a dependency to my project -- it belongs in the EnhangedListView.