Spire.PDF is a professional PDF library applied to creating, writing, editing, handling and reading PDF files without any external dependencies. Get free and professional technical support for Spire.PDF for .NET, Java, Android, C++, Python.

Wed Feb 03, 2021 1:20 pm

Hello

Whenever I try to use Spire.PDF for Android Version 3.1.0 I get the error as seen in the attachment.

I'm trying to use the library in a Flutter plugin to provide PDF functionality for Android devices.
I've included the library with Gradle and now it can't build the project.

What am I doing wrong?

RicoScheller
 
Posts: 52
Joined: Tue Jul 02, 2019 10:34 am

Thu Feb 04, 2021 10:19 am

Hello,

Thanks for your inquiry!

To help us reproduce and look into your issue, please share us with the following information:
1. Your whole project.
2. Your OS information (E.g. Win7, 64 bit) and region setting (E.g. China, Chinese)
3. Your gradle version (E.g. gradle-5.1)

Thanks in advance.

Sincerely,
Marcia
E-iceblue support team
User avatar

Marcia.Zhou
 
Posts: 858
Joined: Wed Nov 04, 2020 2:29 am

Thu Feb 04, 2021 4:43 pm

Hi

I'm on Windows 10, 64 bit, region setting is Switzerland, German.
I'm using the Android Gradle plugin with the recent version 4.1.2 and Gradle version 6.7.0.

You can easily reproduce my issue. All I did was the following:

1. Create a new Flutter plugin with Android Studio.
2. Run the example which is automatically created => Everything is ok.
3. Added the following things to the gradle.build:
3.1 In the repositories:
Code: Select all
maven{
    url "http://repo.e-iceblue.com/nexus/content/groups/public/"
}

3.2 In the dependencies:
Code: Select all
implementation 'e-iceblue:spire.pdf.android:3.1.0'

4. Run the example again => The error occurs.

If you really need my test project, I would have to provide it by another way since 9 MB is too big to add as an attachment here.

RicoScheller
 
Posts: 52
Joined: Tue Jul 02, 2019 10:34 am

Fri Feb 05, 2021 10:48 am

Hello,

Thanks for sharing more information!

We are sorry that our Spire.pdf for Android does not support a high version of SDK Build Tools, we support version 27 and below. The minimum version of the SDK required by Gradle verison 6.5 is 29. I remommend you use the lower gradle V4.4 and gradle plugins V3.1, sdk build tools 27 for your program so that it works properly.

If the issue still exists after you using the lower gradle version. Please provide us with your project for investigation. You can send it to us via email ([email protected]).

Sincerely,
Marcia
E-iceblue support team
User avatar

Marcia.Zhou
 
Posts: 858
Joined: Wed Nov 04, 2020 2:29 am

Mon Feb 08, 2021 2:52 am

Hello,

Hope you are doing well!

How is the issue now? If it still exists, could you please provide us with your project for investigation? You can send it to us via email ([email protected]).

Thanks in advance.

Sincerely,
Marcia
E-iceblue support team
User avatar

Marcia.Zhou
 
Posts: 858
Joined: Wed Nov 04, 2020 2:29 am

Tue Feb 09, 2021 5:12 pm

Hey

After a ton of errors I finally managed to get it working.
The problem was, that specifying the newest Gradle version would break Spire.PDF and specifying the Gradle version you suggested would break Flutter.

In the end I found that it works using the following combination:
- Gradle version: 4.6
- Android Gradle plugin version: 3.2
- SDK build tools: 28

So, for now, I'm happy.
However, I find it really scary, that you only officially support SDK build tools almost as old as 3 years (Android Gradle plugin 3.1 was released in March 2018 https://developer.android.com/studio/re ... ugin#3-1-0).

So it would be quite welcomed if you could ensure that Spire.PDF works when using new versions of build tools

RicoScheller
 
Posts: 52
Joined: Tue Jul 02, 2019 10:34 am

Wed Feb 10, 2021 1:49 am

Hello,

I am glad to hear that you have managed to make it work.

Regarding SDK build tools, I'm sorry about that I should have been wrong about the version of our Spire.Pdf for Android supports. We will do further investigation to check the new version we can support.

Sincerely,
Marcia
E-iceblue support team
User avatar

Marcia.Zhou
 
Posts: 858
Joined: Wed Nov 04, 2020 2:29 am

Tue Jan 18, 2022 9:17 am

Hello,

Glad to inform you that we just released Spire.PDF for Android via Java Version:4.1.0 which supports the higher Gradle and SDK versions

Please download the fix version from the following links to test.

Website link: https://www.e-iceblue.com/Download/pdf-for-android-via-java.html

Sincerely,
Marcia
E-iceblue support team
User avatar

Marcia.Zhou
 
Posts: 858
Joined: Wed Nov 04, 2020 2:29 am

Thu Jan 20, 2022 8:37 am

Hi Marcia

Thank you so much for this.
I've just successfully migrated to Gradle 7.3.3 and Android Gradle Plugin 7.0.4.

Keep up the good work!

RicoScheller
 
Posts: 52
Joined: Tue Jul 02, 2019 10:34 am

Thu Jan 20, 2022 9:25 am

Hello,

Thanks for your feedback!

Glad to hear that the latest version can be used well on your side. If you encounter any issues related to our product in the future, just feel free to contact us.

Have a nice day!

Sincerely,
Marcia
E-iceblue support team
User avatar

Marcia.Zhou
 
Posts: 858
Joined: Wed Nov 04, 2020 2:29 am

Return to Spire.PDF