Android activity crashes as it tries to add a native (C++) library (Visual Studio)

First I’ll clarify my environment: Windows 10, Visual Studio 2017.

That being said, I’m trying to build an Android app that includes a library in the same solution:

I have a red arrow pointing something suspicious about the reference of AndroidLib added to my AndroidApp.

My C++ code in AndroidLib is minimal:

#include "AndroidLib.h"

#include <iostream>



void Java_com_AndroidApp_AndroidLib_nativeHelloWorld()
    std::cout << "Oh hi!" << std::endl;

My code located in is as follow:

package com.AndroidApp;

import android.widget.TextView;
import android.os.Bundle;

public class AndroidApp extends Activity
    //static {
    /** Called when the activity is first created. */
    public void onCreate(Bundle savedInstanceState)

        /* Create a TextView and set its text to "Hello world" */
        TextView  tv = new TextView(this);
        tv.setText("Hello World!");


    public native void nativeHelloWorld();

Also very simple.

This is how both projects were created (red is AndroidLib, yellow is AndroidApp):

enter image description here

And, last but not least, this is how the projects properties look like:

enter image description here
enter image description here

This is the output during the application crash:

Stopped due to shared library event (no libraries added or removed)
Stopped due to shared library event:
  Inferior loaded /data/app/com.AndroidApp-zF3CfzRuPZ6vmQ_RuevS7A==/oat/arm/base.odex
Loaded '/data/app/com.AndroidApp-zF3CfzRuPZ6vmQ_RuevS7A==/oat/arm/base.odex'. Cannot find or open the symbol file.

(I’m debugging using a Samsung Galaxy S7 Edge).


RoW Rules Silent on Deployment of Small Cells in India: COAI DG, SP Kochhar

Project for Student Management System and use of CURD Operation