I cannot import the lib aacdecoder correctly

Asked

Viewed 171 times

0

Although I have already unpacked the lib contents in both the libs folder and jniLibs folder, I can’t import the classes. I’ve already rebuilt.

inserir a descrição da imagem aqui

Any help is welcome. Thanks in advance.

UPDATE -> Gradle

apply plugin: 'com.android.application'

android {
compileSdkVersion 21
buildToolsVersion "21.1.2"

defaultConfig {
    applicationId "com.informatheus.radiodasantigaschat"
    minSdkVersion 10
    targetSdkVersion 22
    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:22.1.1'
compile 'com.astuetz:pagerslidingtabstrip:1.0.1'
compile 'com.android.support:support-v4:22.1.1'
compile 'org.pircbotx:pircbotx:2.0.1'
compile 'org.slf4j:slf4j-android:1.7.12'
compile 'com.android.support:recyclerview-v7:21.0.+'
}
  • I think just add the jar and the native libraries in the folder libs, does not need to be in the folder as well jniLibs. Another thing you need to check is whether you added the configuration sourceSets in the build.gradle. It could also include the build.gradle?

  • updated. thank you.

1 answer

1


My suggestion is this::

1) Remove native libraries from folder libs, leaving them only in the folder jniLibs.

2) Remove the jar from the aacdecoder of the briefcase jniLibs, leaving it only in the folder libs.

A good practice is to use the folder jniLibs for native libraries and the libs for Java/Android libraries.

  • Can you explain to me what are native and non-native libraries? Sorry but I didn’t quite understand the answer. Thank you.

  • @Informatheus, native libraries are those specific writings for certain platforms/architectures, for example MIPS, ARM, X86, and are usually written in C/C++, sometimes Assembly. They use processor-specific instructions for greater performance gain, access to certain features, etc... In your case it is the Decoder, which are in the jniLibs folder. The non-native library is the jar, which interfaces (providing an API) between the native libraries and their application.

  • I think it’s all right now. Anything I come back to. Mto thanks. Hugs.

  • Just to complete, I had to right-click on the . jar and select "Add as library". .

Browser other questions tagged

You are not signed in. Login or sign up in order to post.