Forums - Android Studio 2.3.3

11 posts / 0 new
Last post
Android Studio 2.3.3
Rex
Join Date: 8 Aug 15
Posts: 45
Posted: Fri, 2017-08-11 10:40

Hi,

Thanks for SNPE - it's the fastest solution for Android.

I am integrating SNPE into Android Studio application using the procedure in snpe-1.2.2/doc/html/android_tutorial.html

Everything compiles just fine except when merging the libraries, Android Studio complains when stripping the SO files.

:app:transformNativeLibsWithStripDebugSymbolForDebug
/Users/me/Library/Android/sdk/ndk-bundle/toolchains/arm-linux-androideabi-4.9/prebuilt/darwin-x86_64/bin/arm-linux-androideabi-strip: error: the input file '/Users/ten/10imaging/Camera0/app/build/intermediates/transforms/mergeJniLibs/debug/folders/2000/1f/main/lib/armeabi-v7a/libsnpe_dsp_skel.so' has no sections

 

This causes the build to fail in Android Studio but not when building on the command line using "./gradlew build"
 
Anyone seen this problem?
 
Thanks.
 
Rex
  • Up0
  • Down0
ANN
Join Date: 21 Dec 16
Posts: 22
Posted: Mon, 2017-08-14 23:51

Hello,

While rebuilding /snpe-1.2.2/examples/android/image-classifiers/app I also get similar error message.

/home/*******/Android/Sdk/ndk-bundle/toolchains/arm-linux-androideabi-4.9/prebuilt/linux-x86_64/bin/arm-linux-androideabi-strip
Error:error: the input file '/home/****/snpe-1.2.2/examples/android/image-classifiers/app/build/intermediates/transforms/mergeJniLibs/debug/folders/2000/1f/main/lib/armeabi-v7a/libsnpe_dsp_skel.so' has no sections

I am on Ubuntu 14.04 VM and Android Studio 2.3.3

Thank you.

 

  • Up0
  • Down0
Rex
Join Date: 8 Aug 15
Posts: 45
Posted: Thu, 2017-08-31 13:53

Android Studio will fail the first time and silently succeed the second time. Also, building from the command line (./gradlew build) also works without erroring out.

  • Up0
  • Down0
mityal
Join Date: 22 Sep 17
Posts: 1
Posted: Mon, 2017-09-25 21:59

I met similar problem.

Increase Java heap size for your Android Studio (see configuration file in Android Studio folder)

+ increase java heap size for the gradle in gradle.properties file (located in project):

org.gradle.jvmargs=-Xms1548m -Xmx2048m
  • Up0
  • Down0
aleksei.c
Join Date: 21 Sep 17
Posts: 1
Posted: Tue, 2017-09-26 02:16

Thanks mityal, it worked!

  • Up0
  • Down0
Rex
Join Date: 8 Aug 15
Posts: 45
Posted: Tue, 2017-10-10 15:04

org.gradle.jvmargs=-Xms1548m -Xmx2048m

Does not solve the problem for me.

  • Up0
  • Down0
Rex
Join Date: 8 Aug 15
Posts: 45
Posted: Tue, 2017-10-10 15:04

org.gradle.jvmargs=-Xms1548m -Xmx2048m

Does not solve the problem for me.

  • Up0
  • Down0
viredery
Join Date: 19 Nov 17
Posts: 3
Posted: Thu, 2017-11-23 22:57
Hi Rex.
Currently I encounter the same question as yours. I also run Android Studio on Mac. I hope to know whether you have solved this problem or not.
 
./opt/android-ndk-r11/toolchains/aarch64-linux-android-4.9/prebuilt/darwin-x86_64/bin/aarch64-linux-android-strip: error: the input file './opt/snpe-1.8.0/examples/android/image-classifiers/app/build/intermediates/transforms/mergeJniLibs/debug/folders/2000/1f/main/lib/arm64-v8a/libsnpe_dsp_skel.so' has no sections
 
 
Thanks
 
  • Up0
  • Down0
viredery
Join Date: 19 Nov 17
Posts: 3
Posted: Thu, 2017-11-23 23:00

I also run "aarch64-linux-android-strip libsnpe_dsp_skel.so" on Linux and the problem hasn't been solved.

maybe I should use 32-bit machine?

  • Up0
  • Down0
Rex
Join Date: 8 Aug 15
Posts: 45
Posted: Fri, 2017-11-24 11:54

Try this in your app build.gradle

android {
    buildTypes {
        debug {
            packagingOptions {
                doNotStrip "**/*/*.so"
            }
        }
    }
}

 

  • Up0
  • Down0
viredery
Join Date: 19 Nov 17
Posts: 3
Posted: Sun, 2017-11-26 21:41

Amazing! Thank you Rex! It works!

  • Up0
  • Down0
or Register

Opinions expressed in the content posted here are the personal opinions of the original authors, and do not necessarily reflect those of Qualcomm Incorporated or its subsidiaries (“Qualcomm”). The content is provided for informational purposes only and is not meant to be an endorsement or representation by Qualcomm or any other party. This site may also provide links or references to non-Qualcomm sites and resources. Qualcomm makes no representations, warranties, or other commitments whatsoever about any non-Qualcomm sites or third-party resources that may be referenced, accessible from, or linked to this site.