Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

After trying for almost a month now got the solution. Putting it here if anyone faces similar issue in future.

So, before my opencv gradle file looked this sourceSets { main { jniLibs.srcDirs = ['native/libs'] java.srcDirs = ['java/src'] aidl.srcDirs = ['java/src'] res.srcDirs = ['java/res'] manifest.srcFile 'java/AndroidManifest.xml' } }

I just added a single line in my sourceSets which is this jni.srcDirs = ['native/jni', 'native/libs/'] So basically my jni.srcDirs path was missing. Also, I have added the entire OpenCV sdk and not only Java folder unlike others.

After trying for almost a month now got the solution. Putting it here if anyone faces similar issue in future.

So, before my opencv gradle file looked this sourceSets { main { jniLibs.srcDirs = ['native/libs'] java.srcDirs = ['java/src'] aidl.srcDirs = ['java/src'] res.srcDirs = ['java/res'] manifest.srcFile 'java/AndroidManifest.xml' } }

I just added a single line in my sourceSets which is this jni.srcDirs = ['native/jni', 'native/libs/'] So basically my jni.srcDirs path was missing. Also, I have added the entire OpenCV sdk and not only Java folder unlike others.

UPDATE:

After adding above code I generated signed Bundle and tried uploading to Play Store but the Play Store refused the app. Then I removed

debuggable true

from app gradle file and kept it only inside the opencv gradle file and it worked despite removing the above code. So, play store doesn't accepts the bundle if you have set

debuggable true

for your app level gradle file but accepts if any module which has

debuggable true

in it's gradle.

The problem was not in the jni.