Note that there are some explanatory texts on larger screens.

plurals
  1. POandroid native method not found
    primarykey
    data
    text
    <p>i get No implementation found for native Lcom/vb/HAR/VBHARActivity;.nativeMain:()V error on windows 7. i have compiled and run sanangeles and hello-jni samples with no problem on emulator and device. here are the specs window 7, ndk-9rb, adt 22(comes with eclipse), java 1.7, mingw, no cygwin, ndk-build and android project build gives no errors. the android project has minimum sdk of 10 and target 19. libvbhar.so is 29k in the libs directory but much larger in obj directory. verified that the shared lib is copied to emulator.</p> <p>the paths for the project are src\com\vb\HAR\VBHARActivity.java</p> <pre><code>public class VBHARActivity extends Activity { static {System.loadLibrary("vbhar");} public static native void nativeMain(); private Button btn; @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.vbhar); this.btn = (Button)this.findViewById(R.id.button1); Log.i("", "vb_har before button"); this.btn.setOnClickListener(new OnClickListener() { @Override public void onClick(View v) { Log.i("", "vb_har calling native c code"); nativeMain(); } }); } } </code></pre> <h1>c code</h1> <pre><code>#include &lt;jni.h&gt; #include "HARCVB.h" void Java_com_vb_vbHarC_VBHARActivity_nativeMain(JNIEnv* env) { maincall(); } </code></pre> <h1>android.mk</h1> <pre><code>LOCAL_PATH := $(call my-dir) include $(CLEAR_VARS) LOCAL_CFLAGS := -DANDROID_NDK --std=c99 LOCAL_MODULE := vbhar LOCAL_SRC_FILES := HARCVB.cpp \ vbMain.c \ vbHarApp.c \ vbHarUtil.c \ vbSensorData.c \ vbSupport.c \ include $(BUILD_SHARED_LIBRARY) </code></pre> <p>thank you for your help alex</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload