Android compile library error

Luis

I'm try using library NCHART3D

My build.gradle

android {
    compileSdkVersion 21
    buildToolsVersion "21.1.2"

    defaultConfig {
        applicationId "com.example.android.test3dchart"
        minSdkVersion 16
        targetSdkVersion 21
        versionCode 1
        versionName "1.0"
    }
    buildTypes {
        release {
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
        }
    }
}

dependencies {
    compile fileTree(dir: 'libs', include: ['*.jar'])
    compile 'com.android.support:appcompat-v7:21.0.3'
    compile files('libs/NChart3D.jar')
}

and logcat print :

Couldn't load nchart3d from loader dalvik.system.PathClassLoader[DexPathList[[zip file "/data/app/com.example.android.test3dchart-2.apk"],nativeLibraryDirectories=[/data/app-lib/com.example.android.test3dchart-2, /vendor/lib, /system/lib]]]: findLibrary returned null

01-15 13:29:50.177    2793-2793/com.example.android.chart D/dalvikvm﹕ Late-enabling CheckJNI
01-15 13:29:50.267    2793-2793/com.example.android.chart W/dalvikvm﹕ Exception Ljava/lang/UnsatisfiedLinkError; thrown while initializing Lcom/nulana/NChart/NChartView;
01-15 13:29:50.267    2793-2793/com.example.android.chart W/dalvikvm﹕ Class init failed in Constructor.constructNative (Lcom/nulana/NChart/NChartView;)
01-15 13:29:50.267    2793-2793/com.example.android.chart D/AndroidRuntime﹕ Shutting down VM
01-15 13:29:50.267    2793-2793/com.example.android.chart W/dalvikvm﹕ threadid=1: thread exiting with uncaught exception (group=0x415778b0)
01-15 13:29:50.277    2793-2793/com.example.android.chart E/AndroidRuntime﹕ FATAL EXCEPTION: main

UPDATE in xml preview

<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:layout_width="fill_parent"
    android:layout_height="fill_parent">
    <com.nulana.NChart.NChartView
        android:id="@+id/surface"
        android:layout_height="fill_parent"
        android:layout_width="fill_parent"/>
</LinearLayout>

Rendering Problems The following classes could not be found: - com.nulana.NChart.NChartView (Fix Build Path, Create Class) Tip: Try to build the project.

Vilen

I guess this because of redundancy, in following code first line already including your jar.

compile fileTree(dir: 'libs', include: ['*.jar'])
compile files('libs/NChart3D.jar')

try to remove compile files('libs/NChart3D.jar'), then clean project and rebuild

make sure you have following project structure, and note that your jar should go into libs folder and other lib components in jniLibs. This is for android studio 1.0

project tree

Collected from the Internet

Please contact [email protected] to delete if infringement.

edited at
0

Comments

0 comments
Login to comment

Related

From Dev

FloatingActionButton library compile error

From Dev

Pascal Library Compile Error

From Dev

Pascal Library Compile Error

From Dev

FloatingActionButton library compile error

From Dev

Adding butterknife to android library project gives compile time error "package does not exists" for library classes

From Dev

Unable to Compile WebRTC Library for Android

From Dev

How to fix compile time error while implementing sliding menu using jeremyfeinstein library in android

From Dev

PJSIP compile error - library not found on Xcode 5.1.1

From Dev

Compile error when using FFMPEG library

From Dev

C++ Complex library compile error

From Dev

How to compile and use FFMPEG library in Android Studio?

From Dev

TabLayout crash when compile a library in Android

From Dev

How to compile latest FFmpeg Library for Android?

From Dev

Is it possible to compile a Xamarin project as a library for iOS and Android?

From Dev

TabLayout crash when compile a library in Android

From Dev

How to compile latest FFmpeg Library for Android?

From Dev

How to compile vlc library for android using MAC?

From Dev

android BaseGamesUtils library error

From Dev

Library build error on Android

From Dev

android BaseGamesUtils library error

From Dev

Android compile error using buildozer

From Dev

Android JB 4.2.2 Compile Error

From Dev

Solve Compile error in Android Studio?

From Dev

Cross compile qemu for android error

From Dev

Android library - Need to add compile lib in both the library and main app?

From Java

How to import android project as library and NOT compile it as apk (Android studio 1.0)

From Dev

Android Studio add library error?

From Dev

Android Import library error DefaultGroovyMavenDeveloper

From Dev

error in android pdf view library

Related Related

  1. 1

    FloatingActionButton library compile error

  2. 2

    Pascal Library Compile Error

  3. 3

    Pascal Library Compile Error

  4. 4

    FloatingActionButton library compile error

  5. 5

    Adding butterknife to android library project gives compile time error "package does not exists" for library classes

  6. 6

    Unable to Compile WebRTC Library for Android

  7. 7

    How to fix compile time error while implementing sliding menu using jeremyfeinstein library in android

  8. 8

    PJSIP compile error - library not found on Xcode 5.1.1

  9. 9

    Compile error when using FFMPEG library

  10. 10

    C++ Complex library compile error

  11. 11

    How to compile and use FFMPEG library in Android Studio?

  12. 12

    TabLayout crash when compile a library in Android

  13. 13

    How to compile latest FFmpeg Library for Android?

  14. 14

    Is it possible to compile a Xamarin project as a library for iOS and Android?

  15. 15

    TabLayout crash when compile a library in Android

  16. 16

    How to compile latest FFmpeg Library for Android?

  17. 17

    How to compile vlc library for android using MAC?

  18. 18

    android BaseGamesUtils library error

  19. 19

    Library build error on Android

  20. 20

    android BaseGamesUtils library error

  21. 21

    Android compile error using buildozer

  22. 22

    Android JB 4.2.2 Compile Error

  23. 23

    Solve Compile error in Android Studio?

  24. 24

    Cross compile qemu for android error

  25. 25

    Android library - Need to add compile lib in both the library and main app?

  26. 26

    How to import android project as library and NOT compile it as apk (Android studio 1.0)

  27. 27

    Android Studio add library error?

  28. 28

    Android Import library error DefaultGroovyMavenDeveloper

  29. 29

    error in android pdf view library

HotTag

Archive