meraki-analytics / orianna

A Java framework for the Riot Games League of Legends API (http://developer.riotgames.com/).
MIT License
182 stars 56 forks source link

java.lang.TypeNotPresentException: Type Ljava/awt/image/BufferedImage; not present #87

Closed CodyBontecou closed 5 years ago

CodyBontecou commented 6 years ago

Running into this error on any query while attempting to develop an android app utilizing Orianna. From what I've read, it seems like BufferedImage is not for Android development. I am using the compile 'com.merakianalytics.orianna:orianna-android:3.0.3', so I'm confused as to why I'm running into this error, assuming the orianna-android is optimized/made for android app development.

GammaPii commented 5 years ago

Same here, just run into it on any query.

robrua commented 5 years ago

Hey - sorry for taking so long to get this working. I just pushed some changes that should be available on the latest 4.0.0-SNAPSHOT build on the sonatype snapshot repository. They use Bitmap instead of BufferedImage. Let me know if they work properly. Also, I'm not much of an android dev, so let me know if there's a more appropriate class than Bitmap that is more "standard" to return in place of BufferedImages.

We're also prioritizing putting together a kernel Data Source that you should be able to swap with the RiotAPIDataSource to avoid leaking your API key in android apps while using Orianna, w/o impacting the other features. I'll post again here when that's ready.

robrua commented 5 years ago

Alright, all this should finally be worked out. We've added a new DataSource in Orianna that hits our Kernel proxy server with Riot API requests instead of hitting the Riot API directly. This should allow you to easily develop android applications w/ori without leaking your API key.

Here's an example Orianna config that uses the new DataSource: https://gist.github.com/robrua/c9248aa80212849e95e9002fac1970eb

I'm closing this issue for now, as the Bitmap issue should be fixed. Let me know if you run into any issues with the new android fixings.

wo11ven commented 5 years ago

Hey there, I'm getting some errors when trying to compile for android with latest snapshot:

Error: Program type already present: com.merakianalytics.orianna.types.core.staticdata.Sprite$1
Error: Program type already present: com.merakianalytics.orianna.datapipeline.ImageDownloader$1

I'm using:

maven {
            url 'https://oss.sonatype.org/content/repositories/snapshots/'
        }

implementation "com.merakianalytics.orianna:orianna-android:4.0.0-SNAPSHOT"

If i switch to com.merakianalytics.orianna:orianna:4.0.0-SNAPSHOT it compiles but wont work because of BufferedImage