0

I am using using Android Studio 0.8.9 and I am trying to import Chilkat Android libs to my project by following the instructions given here. I have done all the imports and my project structure looks something like this.

but the statement

import com.chilkatsoft.*; 

gives the error

Error:(8, 1) error: package com.chilkatsoft does not exist

Can anyone help me to integrate the Chilkat Android libs and help me to create the first instance of CkXml class?

enter image description here

Goppinath
  • 10,569
  • 4
  • 22
  • 45

1 Answers1

1

Seems like a subModule why dont you add its as a Module, you can add it in File->Import Module and select the folder under src. It will be added as a module, then go to project settings or project structure and in your main module click on the Dependencies tab and in the green Plus Icon you can add a submodule as Dependency, select that module and Rebuild if necesary this has to be enough.

Otherwise if this dont work add the folder and be sure to hit Build->Rebuild Project so android studio recognize the new classes.

Good Luck

Eefret
  • 4,724
  • 4
  • 30
  • 46
  • While importing it says that I have to Specify location of the Gradle or Android Eclipse project. – Goppinath Oct 07 '14 at 19:42
  • I downloaded the chilkat library and in the Instructions says to copy the source directory and rebuild the project, did you Pressed `Build->Rebuild Project` ? That worked for me – Eefret Oct 07 '14 at 19:50
  • I tried but it didn't help. Will you please check my import from the above screenshot. – Goppinath Oct 07 '14 at 19:58
  • ok Below `src` Create another folder called `main` then inside it another called `java` and then add the com folder below it, confirm that the folder turns out blue – Eefret Oct 07 '14 at 20:18
  • hmm it has helped :) but now I am getting some other error. `Couldn't load chilkat from loader dalvik.system.PathClassLoader[DexPathList[[zip file "/data/app/com.goppinath.chilkattest-1.apk"],nativeLibraryDirectories=[/data/app-lib/com.goppinath.chilkattest-1, /vendor/lib, /system/lib]]]: findLibrary returned null` – Goppinath Oct 07 '14 at 20:34
  • You have reached the answer... please consider lib and libs from the Chilkat documentation: libs/armeabi, libs/armeabi-v7a, lib/mips, lib/x86 – Goppinath Oct 07 '14 at 20:45
  • Look in [here](http://stackoverflow.com/questions/24357687/how-to-include-so-library-in-android-studio-really) how to add a native-library in Android Studio, its just add it into the lib folder and add some clauses to your build.gradle – Eefret Oct 07 '14 at 20:50
  • Thanks, but I could not over come the last problem. – Goppinath Oct 07 '14 at 21:04