Skip to content
Guides

How to Make an Android App

  1. Use Android Studio to create a Phone & Tablet project in Kotlin.

  2. Copy ComPDFkitConversion.aar to the libs directory of the app.

  3. Add the following code into the app’s "build.gradle" file.

    groovy
    android{
        	...
        	
     	defaultConfig {
     	    ...
     	    ndk {
     	        abiFilters "armeabi-v7a", "arm64-v8a", "x86", "x86_64"
     	    }
     	}
        	 
        	...
        	 
        	compileOptions {
             sourceCompatibility JavaVersion.VERSION_1_8
             targetCompatibility JavaVersion.VERSION_1_8
         }
         
         kotlinOptions {
             jvmTarget = '1.8'
         }
    }
    
    dependencies {
    		implementation(fileTree('libs'))
    		//implementation fileTree(dir: 'libs', includes: ['*.aar'])
    		//implementation(name: 'ComPDFKitConversion', ext: 'aar')
    	 	...
    }
  4. Apply for read and write permissions in "AndroidManifest.xml".

xml
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />