gpt4 book ai didi

android - ViroCore : java. lang.NoClassDefFoundError:解析失败:Lcom/google/vr/ndk/base/GvrLayout;

转载 作者:太空狗 更新时间:2023-10-29 14:38:49 30 4
gpt4 key购买 nike

我已经下载了最新版本的 ViroCore lib (virocore-release-v_1_7_2.aar),然后我将下面的依赖项添加到我的 build.gradle 文件中

dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])
implementation 'com.android.support:appcompat-v7:25.0.0'
implementation 'com.google.android.exoplayer:exoplayer:r2.2.0'
androidTestImplementation('com.android.support.test.espresso:espresso-core:2.2.2', {
exclude group: 'com.android.support', module: 'support-annotations'
})
implementation 'com.android.support.constraint:constraint-layout:1.0.2'
testImplementation 'junit:junit:4.12'
implementation (name:'virocore-release-v_1_7_2', ext: 'aar')
implementation 'com.google.protobuf.nano:protobuf-javanano:3.0.0-alpha-7'
implementation 'com.amazonaws:aws-android-sdk-core:2.2.+'
implementation 'com.amazonaws:aws-android-sdk-ddb:2.2.+'
implementation 'com.amazonaws:aws-android-sdk-ddb-mapper:2.2.+'
implementation 'com.amazonaws:aws-android-sdk-cognito:2.2.+'
implementation 'com.amazonaws:aws-android-sdk-cognitoidentityprovider:2.2.+'}

然后写到我下面的 ViroActivity 代码中:

private ViroView createGVRView() {
return new ViroViewGVR(this, new ViroViewGVR.StartupListener() {

@Override
public void onSuccess() {
onRendererStart();
}

@Override
public void onFailure(ViroViewGVR.StartupError error, String errorMessage) {
onRendererFailed(error.toString(), errorMessage);
}
}, new Runnable() {
@Override
public void run() {
}
});

但是当运行应用程序时,我总是会看到下一个异常:

E/AndroidRuntime: FATAL EXCEPTION: main
Process: com.example.virosample.gvr.ovr, PID: 17304
java.lang.NoClassDefFoundError: Failed resolution of: Lcom/google/vr/ndk/base/GvrLayout;
at com.viro.core.ViroViewGVR.init(ViroViewGVR.java:287)
at com.viro.core.ViroViewGVR.<init>(ViroViewGVR.java:211)
at com.example.panorama.ui.view.ViroActivityVR.createGVRView(ViroActivityVR.java:104)
at com.example.panorama.ui.view.ViroActivityVR.onCreate(ViroActivityVR.java:90)
...

有人知道如何解决这个异常吗?

最佳答案

我解决了这个问题。我只添加了 viro 库到我的依赖项中,但我必须另外添加 sdk-common.aar 和 core.aar,您可以在官方 virocore 站点下载它们。

关于android - ViroCore : java. lang.NoClassDefFoundError:解析失败:Lcom/google/vr/ndk/base/GvrLayout;,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/51652079/

30 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com