由于我已迁移到 androidx,因此无法运行 Renderscript。我收到以下异常:
2018-10-12 16:27:58.328 27195-27195/pl.qus.xenoamp2 A/zygote64: java_vm_ext.cc:504] 应用程序中检测到 JNI 错误:调用 JNI NewGlobalRef 时出现未决异常 java.lang.ClassNotFoundException:没有在路径上找到类“android.support.v8.renderscript.RenderScript”:DexPathList[[zip 文件“/data/app/pl.qus.xenoamp2-xHJAddeg9oM-uGSxlvMp7A==/base.apk”],nativeLibraryDirectories=[/data /app/pl.qus.xenoamp2-xHJAddeg9oM-uGSxlvMp7A==/lib/arm64, /data/app/pl.qus.xenoamp2-xHJAddeg9oM-uGSxlvMp7A==/base.apk!/lib/arm64-v8a, /system/ lib64,/system/vendor/lib64]] 2018-10-12 16:27:58.328 27195-27195/pl.qus.xenoamp2 A/zygote64: java_vm_ext.cc:504] 在 java.lang.Class dalvik.system.BaseDexClassLoader .findClass(java.lang.String) (BaseDexClassLoader.java:93) 2018-10-12 16:27:58.328 27195-27195/pl.qus。xenoamp2 A/zygote64: java_vm_ext.cc:504] 在 java.lang.Class java.lang.ClassLoader.loadClass(java.lang.String, boolean) (ClassLoader.java:379) 2018-10-12 16:27:58.328 27195-27195/pl.qus.xenoamp2 A/zygote64: java_vm_ext.cc:504] 在 java.lang.Class java.lang.ClassLoader.loadClass(java.lang.String) (ClassLoader.java:312) 2018-10- 12 16:27:58.328 27195-27195/pl.qus.xenoamp2 A/zygote64: java_vm_ext.cc:504] 在 java.lang.String java.lang.Runtime.nativeLoad(java.lang.String, java.lang.ClassLoader , java.lang.String) (Runtime.java:-2) 2018-10-12 16:27:58.328 27195-27195/pl.qus.xenoamp2 A/zygote64: java_vm_ext.cc:504] 在 java.lang.String java.lang.Runtime.doLoad(java.lang.String, java.lang.ClassLoader) (Runtime.java:1099) 2018-10-12 16:27:58.328 27195-27195/pl.qus.xenoamp2 A/zygote64: java_vm_ext.cc:504] 在 void java.lang。Runtime.loadLibrary0(java.lang.ClassLoader, java.lang.String) (Runtime.java:1014) 2018-10-12 16:27:58.328 27195-27195/pl.qus.xenoamp2 A/zygote64: java_vm_ext.cc: 504] 在 void java.lang.System.loadLibrary(java.lang.String) (System.java:1657) 2018-10-12 16:27:58.328 27195-27195/pl.qus.xenoamp2 A/zygote64: java_vm_ext. cc:504] 在 androidx.renderscript.RenderScript androidx.renderscript.RenderScript.internalCreate(android.content.Context, int, androidx.renderscript.RenderScript$ContextType, int) (RenderScript.java:1408) 2018-10-12 16: 27:58.328 27195-27195/pl.qus.xenoamp2 A/zygote64: java_vm_ext.cc:504] 在 androidx.renderscript.RenderScript androidx.renderscript.RenderScript.create(android.content.Context, int, androidx.renderscript.RenderScript$ ContextType, int) (RenderScript.java:1599) 2018-10-12 16:27:58。328 27195-27195/pl.qus.xenoamp2 A/zygote64: java_vm_ext.cc:504] 在 androidx.renderscript.RenderScript androidx.renderscript.RenderScript.create(android.content.Context, androidx.renderscript.RenderScript$ContextType, int) (RenderScript.java:1549) 2018-10-12 16:27:58.328 27195-27195/pl.qus.xenoamp2 A/zygote64: java_vm_ext.cc:504] 在 androidx.renderscript.RenderScript androidx.renderscript.RenderScript.create( android.content.Context, androidx.renderscript.RenderScript$ContextType) (RenderScript.java:1525) 2018-10-12 16:27:58.328 27195-27195/pl.qus.xenoamp2 A/zygote64: java_vm_ext.cc:504]在 androidx.renderscript.RenderScript androidx.renderscript.RenderScript.create(android.content.Context) (RenderScript.java:1512)renderscript.RenderScript.create(android.content.Context, androidx.renderscript.RenderScript$ContextType, int) (RenderScript.java:1549) 2018-10-12 16:27:58.328 27195-27195/pl.qus.xenoamp2 A/ zygote64: java_vm_ext.cc:504] 在 androidx.renderscript.RenderScript androidx.renderscript.RenderScript.create(android.content.Context, androidx.renderscript.RenderScript$ContextType) (RenderScript.java:1525) 2018-10-12 16: 27:58.328 27195-27195/pl.qus.xenoamp2 A/zygote64: java_vm_ext.cc:504] 在 androidx.renderscript.RenderScript androidx.renderscript.RenderScript.create(android.content.Context) (RenderScript.java:1512)renderscript.RenderScript.create(android.content.Context, androidx.renderscript.RenderScript$ContextType, int) (RenderScript.java:1549) 2018-10-12 16:27:58.328 27195-27195/pl.qus.xenoamp2 A/ zygote64: java_vm_ext.cc:504] 在 androidx.renderscript.RenderScript androidx.renderscript.RenderScript.create(android.content.Context, androidx.renderscript.RenderScript$ContextType) (RenderScript.java:1525) 2018-10-12 16: 27:58.328 27195-27195/pl.qus.xenoamp2 A/zygote64: java_vm_ext.cc:504] 在 androidx.renderscript.RenderScript androidx.renderscript.RenderScript.create(android.content.Context) (RenderScript.java:1512)504] 在 androidx.renderscript.RenderScript androidx.renderscript.RenderScript.create(android.content.Context, androidx.renderscript.RenderScript$ContextType) (RenderScript.java:1525) 2018-10-12 16:27:58.328 27195-27195 /pl.qus.xenoamp2 A/zygote64: java_vm_ext.cc:504] 在 androidx.renderscript.RenderScript androidx.renderscript.RenderScript.create(android.content.Context) (RenderScript.java:1512)504] 在 androidx.renderscript.RenderScript androidx.renderscript.RenderScript.create(android.content.Context, androidx.renderscript.RenderScript$ContextType) (RenderScript.java:1525) 2018-10-12 16:27:58.328 27195-27195 /pl.qus.xenoamp2 A/zygote64: java_vm_ext.cc:504] 在 androidx.renderscript.RenderScript androidx.renderscript.RenderScript.create(android.content.Context) (RenderScript.java:1512)
我在gradle中有通常的条目:
renderscriptTargetApi 18
renderscriptSupportModeEnabled true
还有什么我需要改变的吗?