-1

I want to create an application that extracts text from .docx and .pptx files. Am using poi libraries. When I tried compiling it, it throws error of having too many methods.

In order to bypass this error (cause I need this poi libraries to effectively achieved this), after so many search on the internet, I observed that I can only do this by splitting the application into two applications. But the two applications will need to communicate among them. Especially, I would like to call some methods from one of the application in the second one. Can someone help me on how to achieve this?

Green Onyeji
  • 259
  • 5
  • 18

1 Answers1

0

There are several ways of doing this.

Check the answer on the stack overflow link.

android communication between two applications

But if you are getting

When I tried compiling it, it throws error of having too many methods.

while compiling your application, then you can add the following in build.gradle in order to bypass the error

android {
    compileSdkVersion 21
    buildToolsVersion "21.1.0"

    defaultConfig {
        ...
        minSdkVersion 14
        targetSdkVersion 21
        ...

        // Enabling multidex support.
        multiDexEnabled true
    }
    ...
}

dependencies {
  compile 'com.android.support:multidex:1.0.0'
} 

Please refer the documentation here

https://developer.android.com/tools/building/multidex.html

Community
  • 1
  • 1
nkz
  • 144
  • 2
  • 9