cancel
Showing results for 
Search instead for 
Did you mean: 

The Android application crashes, if I compile and run the 1.06 ver, android sample code for BLUENRG-2 SoC in my Android smartphone. What is the solution?

NKall.7
Associate II

I am using the latest (1.06) android sample code for BLUENRG-2 SoC. After compiling the sample code with MobleLibrary-release.aar library, the apk file is created but when I am running the app in my mobile it crashes. I tried to debug the code and saw that the crash happens at/after : "mNetwork = mobleNetwork.createNetwork(address);" in the Configuration.java file. Kindly guide.

1 ACCEPTED SOLUTION

Accepted Solutions
udidq
Associate II

Is there a ndk path appended in the local.properties?

if yes, please remove it(keep only sdk path) , build and run it.

View solution in original post

12 REPLIES 12
alok
Senior

Did you try the App available on Play-store ? Does it crash too ?

Which is your phone model ?

In addition to compiling, Did you make any changes to the SDK before to run the App ?

NKall.7
Associate II

Answers:

1. I tried the App available on Play-store.

2. It didn't crash.

3. I have tested the compiled apk file in 3 models,

1. Redmi Note 4 (API 23),

2. Mi A1 OS upgraded to Pie (API 28)

3. Poco F1 OS upgraded to Pie (API 28) with MiUI 10

4. I didn't make any changes to SDK before compiling.

Answers:

1. I tried the App available on Play-store.

2. It didn't crash.

3. I have tested the compiled apk file in 3 models,

a. Redmi Note 4 (API 23),

b. Mi A1 OS upgraded to Pie (API 28)

c. Poco F1 OS upgraded to Pie (API 28) with MiUI 10

4. I didn't make any changes to SDK before compiling.

alok
Senior

Kindly confirm if you have used following environment as suggested in the release notes ?

  1. Application Gradle version as 2.14.1
  2. Android Plugin version(2.2.2) with the latest Android Studio

Yes​

udidq
Associate II

Is there a ndk path appended in the local.properties?

if yes, please remove it(keep only sdk path) , build and run it.

udidq
Associate II

Dont debug, just run it.

Thank you. Now it is working fine.

I have few more queries.

A. I want to create a custom Android app. Do I need to keep the following setting for the MobleLibrary-release.aar?

  1. Application Gradle version as 2.14.1
  2. Android Plugin version(2.2.2) with the latest Android Studio

Note: The ndk path automatically gets enabled every time I start/open the project i.e. during sync time.

B. What is the minimum sdk supported by library? I want it to support minimum API 19.

C. Does the library require any JSON based communication? Is there any kind of dependency of library on JSON based communication?

alok
Senior

@Nishant,

Good that your query is resolved. Kindly post a new query so that all the members of the forum who may have similar question can get benefited. Thanks