java.lang.ClassNotFoundException: com.vuforia.VuforiaUnityPlayer.VuforiaInitializer - PullRequest
0 голосов
/ 21 марта 2019

Мое приложение предназначено для запуска приложения Android, и при нажатии кнопки оно должно перейти к операции единства и поместить объект на наземную плоскость на основе имени объекта, переданного действием Android, вот ошибка, которую я получаю во время работы.

  java.lang.ClassNotFoundException: com.vuforia.VuforiaUnityPlayer.VuforiaInitializer
            at java.lang.Class.classForName(Native Method)
            at java.lang.Class.forName(Class.java:453)
            at java.lang.Class.forName(Class.java:378)
            at com.unity3d.player.UnityPlayer.nativeRender(Native Method)
            at com.unity3d.player.UnityPlayer.c(Unknown Source:23)
            at com.unity3d.player.UnityPlayer$e$2.queueIdle(Unknown Source:94)
            at android.os.MessageQueue.next(MessageQueue.java:395)
            at android.os.Looper.loop(Looper.java:160)
            at com.unity3d.player.UnityPlayer$e.run(Unknown Source:48)

вот файл gradle

apply plugin: 'com.android.application'

android {
    compileSdkVersion 28
    defaultConfig {
        applicationId "com.example.test2"
        minSdkVersion 26
        targetSdkVersion 28
        versionCode 1
        versionName "1.0"
        testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
    }
    buildTypes {
        release {
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
        }
    }
}

dependencies {
    implementation fileTree(dir: 'libs', include: ['*.jar'])
    implementation 'com.android.support:appcompat-v7:28.0.0'
    implementation 'com.android.support.constraint:constraint-layout:1.1.3'
    testImplementation 'junit:junit:4.12'
    androidTestImplementation 'com.android.support.test:runner:1.0.2'
    androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.2'
    implementation project(':GroundPlaneDetection')
}

вот основной код активности

Button b;
        b = findViewById(R.id.hello);
        b.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {

                Intent intent = new Intent(MainActivity.this, UnityPlayerActivity.class);
                intent.putExtra("arguments", "kitchen_stool");
                startActivity(intent);
            }
        });

здесь я импортировал aar файл единства, и он отлично работает, но яполучаю эту ошибку, пожалуйста, помогите спасибо заранее.

...