Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Crashing on Release Build (Android) #13

Open
CmerCy132 opened this issue Dec 18, 2018 · 1 comment
Open

Crashing on Release Build (Android) #13

CmerCy132 opened this issue Dec 18, 2018 · 1 comment

Comments

@CmerCy132
Copy link

CmerCy132 commented Dec 18, 2018

I'm getting this error whenever I try to open the wikitude AR world in Release version of the app.

12-18 11:13:58.107 20994-20994/com.nationalgallerysingapore.galleryexplorer A/zygote: java_vm_ext.cc:534] JNI DETECTED ERROR IN APPLICATION: JNI GetJavaVM called with pending exception java.lang.NoSuchFieldError: no "J" field "nativePtr" in class "Lcom/wikitude/architect/util/internal/ArchitectSDKBuildInformationInternal;" or its superclasses java_vm_ext.cc:534] at void com.wikitude.architect.util.internal.ArchitectSDKBuildInformationInternal.createNative() ((null):-2)

12-18 11:13:58.108 20994-20994/com.nationalgallerysingapore.galleryexplorer A/zygote: java_vm_ext.cc:534] at void com.wikitude.architect.util.internal.ArchitectSDKBuildInformationInternal.<init>() ((null):-1) java_vm_ext.cc:534] at void com.wikitude.architect.ArchitectView.<clinit>() ((null):-1) java_vm_ext.cc:534] at com.wikitude.common.e.a com.wikitude.architect.ArchitectView.getPermissionManager() ((null):-1) java_vm_ext.cc:534] at void com.brave.wikitudebridge.WikitudePrecheck.onCreate(android.os.Bundle) ((null):-1) java_vm_ext.cc:534] at void android.app.Activity.performCreate(android.os.Bundle, android.os.PersistableBundle) (Activity.java:7009) java_vm_ext.cc:534] at void android.app.Activity.performCreate(android.os.Bundle) (Activity.java:7000) java_vm_ext.cc:534] at void android.app.Instrumentation.callActivityOnCreate(android.app.Activity, android.os.Bundle) (Instrumentation.java:1214) java_vm_ext.cc:534] at android.app.Activity android.app.ActivityThread.performLaunchActivity(android.app.ActivityThread$ActivityClientRecord, android.content.Intent) (ActivityThread.java:2731) java_vm_ext.cc:534] at void android.app.ActivityThread.handleLaunchActivity(android.app.ActivityThread$ActivityClientRecord, android.content.Intent, java.lang.String) (ActivityThread.java:2856)

@MendicantBias90
Copy link

From a non-java developer, after digging for hours in wikitude, android and java issues I randomly found a solution. In your app build.gradle, if your release buildType has minifyEnabled set to true, it seems that proguard obfuscates wikitude classes. To avoid this, add

-keep class com.wikitude.architect.** {*;}
-keep class com.wikitude.common.** {*;}

to your proguard-rules.pro

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants