Admob и Firebase не работают после импорта файла Unity AAR в собственное приложение - PullRequest
0 голосов
/ 28 октября 2019

Я создал игру единства с firebase и admob. Затем я экспортировал его с помощью Texture Compression: ETC2 (GLES 3.0) в Android Studio, экспортировал файл Unity, прекрасно работающий с firebase и admob. но когда я экспортирую его в файл aar и внедряю в мое родное приложение в виде библиотеки aar. я не вижу ни одного объявления от admob и firebase throws "Одна или несколько зависимостей Firebase отсутствуют. Текущий статус зависимости: UnavailableOther"

apply plugin: 'com.android.application'

android {
    //noinspection GradleCompatible
    compileSdkVersion 27
    defaultConfig {
        applicationId "com.pentasoft.socialad"
        minSdkVersion 19
        targetSdkVersion 29
        versionCode 1
        versionName "1.0"
        multiDexEnabled true
        testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
    }
    buildTypes {
        release {
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
        }
    }
}

dependencies {
    implementation project(':Tespr2-debug')
    implementation fileTree(dir: 'libs', include: ['*.jar'])
    //noinspection GradleCompatible
    implementation 'com.android.support:appcompat-v7:27.1.1'
    //noinspection GradleCompatible
    implementation 'com.android.support:design:27.1.1'
    implementation 'com.android.support.constraint:constraint-layout:1.1.3'
    //noinspection GradleCompatible
    implementation 'com.android.support:support-v4:27.1.1'
    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 "com.squareup.picasso:picasso:2.4.0"
    implementation 'de.hdodenhof:circleimageview:3.0.0'
    implementation 'com.android.volley:volley:1.1.1'
    //Add FCM//
    implementation 'com.google.firebase:firebase-database:11.0.4'
    implementation 'com.google.android.gms:play-services-ads:11.0.4'
    api 'com.tune:tune-marketing-console-sdk:6.1.1'
    implementation 'com.google.firebase:firebase-storage:11.0.4'
    implementation 'com.google.firebase:firebase-messaging:11.0.4'
    //noinspection GradleCompatible
    implementation 'com.android.support:cardview-v7:27.1.1'
}
apply plugin: 'com.google.gms.google-services'

Журналы


10-28 23:50:37.449 11383-11383/? E/Zygote: v2
10-28 23:50:37.449 11383-11383/? E/Zygote: accessInfo : 0
10-28 23:50:38.719 11383-11383/com.pentasoft.socialad E/ViewSystem: ViewRootImpl #2 Surface is not valid.
10-28 23:50:43.489 11383-11512/com.pentasoft.socialad E/Unity: AndroidJavaException: java.lang.ClassNotFoundException: android.unityembed.Start
    java.lang.ClassNotFoundException: android.unityembed.Start
        at java.lang.Class.classForName(Native Method)
        at java.lang.Class.forName(Class.java:324)
        at java.lang.Class.forName(Class.java:285)
        at com.unity3d.player.UnityPlayer.nativeRender(Native Method)
        at com.unity3d.player.UnityPlayer.c(Unknown Source)
        at com.unity3d.player.UnityPlayer$e$1.handleMessage(Unknown Source)
        at android.os.Handler.dispatchMessage(Handler.java:98)
        at android.os.Looper.loop(Looper.java:148)
        at com.unity3d.player.UnityPlayer$e.run(Unknown Source)
     Caused by: java.lang.ClassNotFoundException: Didn't find class "android.unityembed.Start" on path: DexPathList[[zip file "/data/app/com.pentasoft.socialad-1/base.apk"],nativeLibraryDirectories=[/data/app/com.pentasoft.socialad-1/lib/arm, /data/app/com.pentasoft.socialad-1/base.apk!/lib/armeabi-v7a, /vendor/lib, /system/lib]]
        at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:56)
        at
10-28 23:50:43.529 11383-11512/com.pentasoft.socialad E/Unity: AndroidJavaException: java.lang.ClassNotFoundException: com.google.android.gms.ads.initialization.OnInitializationCompleteListener
    java.lang.ClassNotFoundException: com.google.android.gms.ads.initialization.OnInitializationCompleteListener
        at java.lang.Class.classForName(Native Method)
        at java.lang.Class.forName(Class.java:324)
        at java.lang.Class.forName(Class.java:285)
        at com.unity3d.player.UnityPlayer.nativeRender(Native Method)
        at com.unity3d.player.UnityPlayer.c(Unknown Source)
        at com.unity3d.player.UnityPlayer$e$1.handleMessage(Unknown Source)
        at android.os.Handler.dispatchMessage(Handler.java:98)
        at android.os.Looper.loop(Looper.java:148)
        at com.unity3d.player.UnityPlayer$e.run(Unknown Source)
     Caused by: java.lang.ClassNotFoundException: Didn't find class "com.google.android.gms.ads.initialization.OnInitializationCompleteListener" on path: DexPathList[[zip file "/data/app/com.pentasoft.socialad-1/base.apk"],nativeLibraryDirectories=[/data/app/com.pentasoft.socialad-1/lib/arm, /data/app/com.pen
10-28 23:50:43.569 11383-11512/com.pentasoft.socialad E/Unity: Unable to find FirebaseCppApp-6_6_0
10-28 23:50:43.629 11383-11512/com.pentasoft.socialad E/Unity: DllNotFoundException: FirebaseCppApp-6_6_0
        at (wrapper managed-to-native) Firebase.AppUtilPINVOKE+SWIGExceptionHelper.SWIGRegisterExceptionCallbacks_AppUtil(Firebase.AppUtilPINVOKE/SWIGExceptionHelper/ExceptionDelegate,Firebase.AppUtilPINVOKE/SWIGExceptionHelper/ExceptionDelegate,Firebase.AppUtilPINVOKE/SWIGExceptionHelper/ExceptionDelegate,Firebase.AppUtilPINVOKE/SWIGExceptionHelper/ExceptionDelegate,Firebase.AppUtilPINVOKE/SWIGExceptionHelper/ExceptionDelegate,Firebase.AppUtilPINVOKE/SWIGExceptionHelper/ExceptionDelegate,Firebase.AppUtilPINVOKE/SWIGExceptionHelper/ExceptionDelegate,Firebase.AppUtilPINVOKE/SWIGExceptionHelper/ExceptionDelegate,Firebase.AppUtilPINVOKE/SWIGExceptionHelper/ExceptionDelegate,Firebase.AppUtilPINVOKE/SWIGExceptionHelper/ExceptionDelegate,Firebase.AppUtilPINVOKE/SWIGExceptionHelper/ExceptionDelegate)
      at Firebase.AppUtilPINVOKE+SWIGExceptionHelper..cctor () [0x000ee] in <8c7b73be776844879184b3886ba9cec3>:0 
    Rethrow as TypeInitializationException: The type initializer for 'SWIGE
Добро пожаловать на сайт PullRequest, где вы можете задавать вопросы и получать ответы от других членов сообщества.
...