无法打开仅在Play商店java.lang.UnsatisfiedLinkError中上传的应用程序:

时间:2019-01-27 23:28:43

标签: android facebook

很好,我有一个Stikers wsp应用程序,https://github.com/WhatsApp/stickers,以前我没有问题,昨天尝试更新它,我添加了一些广告和更多按钮。从Android Studio进行测试时,效果很好,但在上载应用程序并打开它时,已经从Play商店下载的应用程序会关闭,并且游戏控制台会告诉我以下内容:

     java.lang.RuntimeException: 
  at android.os.AsyncTask$3.done (AsyncTask.java:318)
  at java.util.concurrent.FutureTask.finishCompletion (FutureTask.java:354)
  at java.util.concurrent.FutureTask.setException (FutureTask.java:223)
  at java.util.concurrent.FutureTask.run (FutureTask.java:242)
  at android.os.AsyncTask$SerialExecutor$1.run (AsyncTask.java:243)
  at java.util.concurrent.ThreadPoolExecutor.runWorker (ThreadPoolExecutor.java:1133)
  at java.util.concurrent.ThreadPoolExecutor$Worker.run (ThreadPoolExecutor.java:607)
  at java.lang.Thread.run (Thread.java:762)
Caused by: java.lang.UnsatisfiedLinkError: 
  at com.facebook.soloader.SoLoader.b (Unknown Source)
  at com.facebook.soloader.SoLoader.a (Unknown Source)
  at com.facebook.soloader.SoLoader.a (Unknown Source)
  at com.facebook.soloader.SoLoader.a (Unknown Source)
  at com.facebook.imagepipeline.nativecode.d.a (Unknown Source)
  at com.facebook.animated.webp.WebPImage.a (Unknown Source)
  at com.Stikers.Strikers.i.a (Unknown Source)
  at com.Stikers.Strikers.i.a (Unknown Source)
  at com.Stikers.Strikers.i.a (Unknown Source)
  at com.Stikers.Strikers.h.a (Unknown Source)
  at com.Stikers.Strikers.EntryActivity$a.a (Unknown Source)
  at com.Stikers.Strikers.EntryActivity$a.doInBackground (Unknown Source)
  at android.os.AsyncTask$2.call (AsyncTask.java:304)
  at java.util.concurrent.FutureTask.run (FutureTask.java:237)

删除我所做的这些修改以排除可能的错误,然后问题不再出现。每当我将其上传到Play商店时,都会产生此错误,而我碰巧就离开了Gradle。

      apply plugin: 'com.android.application'

android {
    //the compression of webp file during build causes problem with FileDescriptor in ContentProvider.
    aaptOptions {
        noCompress "webp"
    }
    compileSdkVersion 28
    defaultConfig {
        applicationId "com.Stikers.Stikers"
        minSdkVersion 15
        targetSdkVersion 28
        versionCode 12
        versionName "3.1"
        testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
        def contentProviderAuthority = applicationId + ".stickercontentprovider"
        // Creates a placeholder property to use in the manifest.
        manifestPlaceholders =
                [contentProviderAuthority: contentProviderAuthority]
        // Adds a new field for the authority to the BuildConfig class.
        buildConfigField("String",
                "CONTENT_PROVIDER_AUTHORITY",
                "\"${contentProviderAuthority}\"")
        ndk {
            abiFilters "armeabi-v7a", "x86", 'armeabi', 'arm64-v8a'
        }

        packagingOptions {
            exclude "lib/arm64-v8a/libgnustl_shared.so"
            exclude '/lib/mips64/**'
            exclude '/lib/arm64-v8a/**'
            exclude '/lib/x86_64/**'
        }
    }
    buildTypes {
        debug {
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
        }
        release {
            minifyEnabled true
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
        }
    }
    compileOptions {
        sourceCompatibility JavaVersion.VERSION_1_8
        targetCompatibility JavaVersion.VERSION_1_8
    }
}

task checkDebug {
    doLast {
        println("checkDebug")
        if (android.defaultConfig.applicationId.startsWith("com.whatsapp")) {
            throw new GradleException("applicationId in defaultConfig cannot start with com.whatsapp, please change your applicationId in app/build.gradle");
        }
        checkApplicationIdInDebug()
    }
}

private void checkApplicationIdInDebug() {
    Properties properties = new Properties()
    properties.load(project.rootProject.file('local.properties').newDataInputStream())
    def ignoreApplicationIdCheck = properties.getProperty('ignoreApplicationIdCheck')
    if (ignoreApplicationIdCheck == null) {
        if (android.defaultConfig.applicationId.equals("com.example.samplestickerapp")) {
            throw new GradleException("Your applicationId is currently com.example.samplestickerapp, please change your applicationId to a different string in app/build.gradle in line 16");
        }
    } else {
        println("application id check ignored")
    }
}


task checkRelease {
    doLast {
        println("checkRelease")
        if (android.defaultConfig.applicationId.startsWith("com.example")) {
            throw new GradleException("applicationId in defaultConfig cannot start with com.example, please change your applicationId in app/build.gradle");
        }
    }
}

tasks.whenTaskAdded { task ->
    println(task.name)
    if (task.name.contains("assembleDebug")) {
        task.dependsOn checkDebug
    }
    if (task.name.contains("assembleRelease")) {
        task.dependsOn checkRelease
    }
}


dependencies {
    implementation fileTree(include: ['*.jar'], dir: 'libs')
    //noinspection GradleCompatible
    implementation 'com.android.support:appcompat-v7:28.0.0'
    implementation 'com.android.support:design:28.0.0'
    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.android.support:recyclerview-v7:28.0.0'
    implementation 'com.android.support.constraint:constraint-layout:1.1.3'
    implementation 'com.facebook.fresco:fresco:1.11.0'
    implementation 'com.facebook.fresco:webpsupport:1.11.0'
    implementation 'com.facebook.fresco:animated-webp:1.11.0'
    implementation 'com.facebook.fresco:fresco:1.11.0'
    implementation 'com.facebook.fresco:animated-gif:1.11.0'
    implementation 'com.facebook.fresco:animated-webp:1.11.0'
    implementation 'com.facebook.fresco:webpsupport:1.11.0'
    implementation 'com.facebook.soloader:soloader:0.5.1'
    implementation 'com.google.android.gms:play-services-ads:17.1.2'
}



download the 
再次使用

github应用程序代码https://github.com/WhatsApp/stickers,更改包的名称,对应用程序签名并作为测试上传。骨头根本没有改变,问题仍然存在。

0 个答案:

没有答案