0

I've looked at the similar questions at: Javah Error android.app.Activity not found

and

Javah still won't find class files in OSX / Android Studio

But my error still isn't resolved. The first link suggests adding Android 8, I don't have Android 8 as I am building for Android 15 or higher. So I do have the correct Android15 in my classpath.

The other link isn't too specific for a beginner like myself.

This is what I have so far as my Javah file, I've included additional classes into my classpath to try to fix the error. This is my one Javah line:

javah  -classpath <path-to-sdk>/Android/sdk/platforms/android-15.android.jar:<path-to-sdk>Android/sdk/extras/android/support/v7/appcompat/libs/android-support-v7-appcompat.jar:<path-to-sdk>/sdk/extras/android/support/v7/appcompat/libs/android-support-v4.jar:./build/intermediates/classes/debug  -d src/main/jni com.tawu.MainActivity

By adding "android-support-v7-appcompat.jar" and "android-support-v4.jar" I thought it would fix the issue but it hasn't.

I appreciate any help and thanks in advance!

Community
  • 1
  • 1
Sabzo
  • 31
  • 1
  • 7

1 Answers1

0

The error was solved by removing the .jar files and actually using the CORRECT path to the Android SDK version.

This ended up working: javah -classpath ./build/intermediates/classes/debug://Android/sdk/extras/android/support/v7/appcompat/libs -d src/main/jni

:)

Sabzo
  • 31
  • 1
  • 7