Skip to main content
NKall.7
Associate II
January 31, 2019
Solved

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?

  • January 31, 2019
  • 12 replies
  • 2439 views

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.

This topic has been closed for replies.
Best answer by udidq

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

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

12 replies

alok
Visitor II
January 31, 2019

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
NKall.7Author
Associate II
February 1, 2019

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.

NKall.7
NKall.7Author
Associate II
February 1, 2019

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.

alok
Visitor II
February 2, 2019

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
NKall.7
NKall.7Author
Associate II
February 2, 2019

Yes​

udidq
udidqBest answer
Associate II
February 4, 2019

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
February 4, 2019

Dont debug, just run it.

NKall.7
NKall.7Author
Associate II
February 4, 2019

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
Visitor II
February 4, 2019

@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

udidq
Associate II
February 4, 2019

hello,

A. No, thats only for demo. For your custom app from scratch you can use any higher gradle version.

B.Its 23, Api 19 deprecated in mesh library.

C. JSON requirement is as per Mesh specification. Library uses JSON passed to it while restoring the network, without it you will not be able to restore(once app is relaunched) or transfer the network information to cloud or another smartphone(android or ios)

NKall.7
NKall.7Author
Associate II
February 4, 2019

Thank you.