tylerjroach / eventsource-android

An Android EventSource (SSE - Server Sent Events) Library
Other
90 stars 21 forks source link

error: cannot access ChannelFuture #1

Closed rhyek closed 8 years ago

rhyek commented 8 years ago

I built the aar file, imported it into my project and then added it as a dependency in gradle. When I build the project I get the following error:

E:\dev\gto\portal\android-client\app\src\main\java\gt\com\gto\androidclient\sse\SSEHandler.java:43: error: cannot access ChannelFuture
                app.sse.connect();
                               ^
  class file for org.jboss.netty.channel.ChannelFuture not found

This is my gradle file:

apply plugin: 'com.android.application'
apply plugin: 'me.tatarka.retrolambda'
apply plugin: 'com.android.databinding'
apply plugin: 'com.neenbedankt.android-apt'

android {
    compileSdkVersion 23
    buildToolsVersion "23.0.2"

    defaultConfig {
        applicationId "gt.com.gto.androidclient"
        minSdkVersion 19
        targetSdkVersion 23
        versionCode 1
        versionName "1.0"
        multiDexEnabled true
    }

    compileOptions {
        sourceCompatibility JavaVersion.VERSION_1_8
        targetCompatibility JavaVersion.VERSION_1_8
    }

    buildTypes {
        release {
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
        }
        debug {
            minifyEnabled false
        }
    }
}

dependencies {
    compile fileTree(include: ['*.jar'], dir: 'libs')
    testCompile 'junit:junit:4.12'
    compile('com.fatboyindustrial.gson-jodatime-serialisers:gson-jodatime-serialisers:1.2.0') {
        exclude module: 'joda-time'
        exclude group: 'org.joda.time'
    }
    compile 'com.github.oxoooo:data-binding-support:1.1.0'
    compile 'com.android.support:appcompat-v7:23.1.1'
    compile 'com.android.support:design:23.1.1'
    compile 'com.google.code.gson:gson:2.4'
    compile 'net.danlew:android.joda:2.9.0'
    compile 'com.google.android.gms:play-services-maps:8.3.0'
    compile 'com.annimon:stream:1.0.5'
    compile 'me.tatarka:bindingcollectionadapter:0.16'
    compile 'me.tatarka:bindingcollectionadapter-recyclerview:0.16'
    compile 'co.uk.rushorm:rushandroid:1.1.11'
    compile 'com.android.support:support-v4:23.1.1'
    compile 'com.fasterxml.uuid:java-uuid-generator:3.1.4'
    compile 'org.apache.commons:commons-lang3:3.4'
    compile 'org.jdeferred:jdeferred-android-aar:1.2.4'
    compile 'com.squareup.picasso:picasso:2.5.2'
    compile 'de.hdodenhof:circleimageview:2.0.0'
    compile 'org.solovyev.android.views:linear-layout-manager:0.5@aar'
    compile 'com.android.support:cardview-v7:23.1.1'
    compile 'com.kyanogen.signatureview:signature-view:1.0'
    compile project(':eventsource_android-release')
}
rhyek commented 8 years ago

Added compile 'org.jboss.netty:netty:3.2.10.Final' to my gradle to get it working. Normal?

tylerjroach commented 8 years ago

Sorry for the late response, it looks like I did the same thing as well. When building the .aar, it doesn't look like the netty library is included so you have to include it on your project itself. I'll fix this in a future release.

tylerjroach commented 8 years ago

I've uploaded project to jCenter. You should not need to manually include netty. It should be available in a few hours.