0

There are several third-party jars I have to use in my project.

At the first, each jar provides a .so file in app/src/main/jniLibs/armeabi directory.

After android studio run 'app', there was only an armeabi directory in app-debug.apk/lib, and every thing was OK.

However, since I imported an .aar to app/aars in my project, there were x86, x86_64, armeabi-v7a, arm64-v8a and armeabi directories in app-debug.apk/lib after adroid studio run 'app', and the app just broken when launched. After I manually deleted x86, x86_64, armeabi-v7a, arm64-v8a directories and keep only armeabi directory in app-debug.apk/lib. Then I installed the apk, every thing was OK again.

So I want to know how to keep only armeabi in an apk after android studio run 'app'?

Csharp Stark
  • 31
  • 1
  • 8
  • Now, I have to manually delete x86, x86_64, armeabi-v7a, arm64-v8a directories in app-debug.apk/lib after Android Studio creates apk. And then install this apk on my smartphone by command line. Who can help me? – Csharp Stark Mar 26 '16 at 07:04
  • In fact, there were x86, x86_64, armeabi-v7a, arm64-v8a and armeabi directories in the .aar/jni at first, but I deleted x86, x86_64, armeabi-v7a, arm64-v8a directories and kept only armeabi in .aar/jni. Should I modify some configuration documents in the .aar file? – Csharp Stark Mar 27 '16 at 18:03

1 Answers1

0

I have solved my own question. The issue was caused by the new comer -- the .aar file.

The solution is:

step 1: open the .aar file with winRAR
step 2: pull the .jar in the .aar file to app/libs directory
step 3: pull the jni/armeabi/xxx.so in the .aar file to app/src/main/jniLibs/armeabi directory
step 4: remove the .aar file in app/aars and relevant codes in app/build.gradle

Csharp Stark
  • 31
  • 1
  • 8