@@ -381,7 +381,7 @@ private void createAppModule(String moduleName)
381
381
382
382
// Copy any imported libraries (their libs and assets),
383
383
// and anything in the code folder contents to the project.
384
- copyImportedLibs (libsFolder , assetsFolder );
384
+ copyImportedLibs (libsFolder , mainFolder , assetsFolder );
385
385
copyCodeFolder (libsFolder );
386
386
387
387
// Copy any system libraries needed by the project
@@ -867,7 +867,8 @@ protected boolean ignorableImport(String pkg) {
867
867
* For each library, copy .jar and .zip files to the 'libs' folder,
868
868
* and copy anything else to the 'assets' folder.
869
869
*/
870
- private void copyImportedLibs (final File libsFolder ,
870
+ private void copyImportedLibs (final File libsFolder ,
871
+ final File mainFolder ,
871
872
final File assetsFolder ) throws IOException {
872
873
for (Library library : getImportedLibraries ()) {
873
874
// add each item from the library folder / export list to the output
@@ -887,7 +888,12 @@ private void copyImportedLibs(final File libsFolder,
887
888
exportName .equals ("armeabi-v7a" ) ||
888
889
exportName .equals ("x86" )) {
889
890
Util .copyDir (exportFile , new File (libsFolder , exportName ));
890
- } else {
891
+ }
892
+ // Copy jni libraries (.so files) to the correct location
893
+ else if (exportName .equals ("jniLibs" )) {
894
+ Util .copyDir (exportFile , new File (mainFolder , exportName ));
895
+ }
896
+ else {
891
897
// Copy any other directory to the assets folder
892
898
Util .copyDir (exportFile , new File (assetsFolder , exportName ));
893
899
}
0 commit comments