Search code examples
androidphotoeditorsdk

Android configuration errors


I am trying to configure the photoeditorSDK for Android, however I need to limit the tools that are presented to the user. I want only the Text and Brush tools to be available (and my license is for these functions only).

Let me preface with I don't do much java programming - so this is a stretch.

I am trying to add the code from https://docs.photoeditorsdk.com/guides/android/v5/introduction/configuration however it is giving me compile errors. After adding the required imports, it is still giving me compile errors on the line

config.setTools(tools);

The error is the following:

Error:(92, 27) error: no suitable method found for setTools(ArrayList) method PESDKConfig.setTools(ArrayList) is not applicable (argument mismatch; ArrayList cannot be converted to ArrayList) method PESDKConfig.setTools(ToolConfigInterface...) is not applicable (varargs mismatch; ArrayList cannot be converted to ToolConfigInterface)

I am wondering if it is a version issue - in the build.grade, it looks like I am adding version 4 (although referenced from version 5 documentation here - https://docs.photoeditorsdk.com/guides/android/v5/introduction/getting_started)

compile 'ly.img.android:photo-editor-sdk:4.0.1' 

Here's my questions: 1. How the heck do I determine the latest version of the SDK? 2. Why do I have to add code to reflect the tools that should show on the bar - my license already does this doesn't it?


Solution

  • Thank you for your request. You're right, there is actually a mistake in our documentation. The latest version of the SDK is 5.0.8 and you can find it in our documentations sidebar under Resources -> Releases:

    https://artifactory.9elements.com/artifactory/imgly/ly/img/android/photo-editor-sdk/

    Try:

    compile 'ly.img.android:photo-editor-sdk:5.0.8‘
    

    to get our latest SDK. Your code looks fine though. If you have further questions, just let me know!