【问题标题】:Error _504 or error - 108 appears when app is downloaded from Google PlayStore ..What can be causes of this errors in the code?从 Google PlayStore 下载应用程序时出现错误 _504 或错误 - 108 .. 代码中出现此错误的原因可能是什么?
【发布时间】:2018-05-07 11:49:48
【问题描述】:

从 Playstore 下载应用程序时出现错误 -504 或错误 - 108。 我已经努力工作了大约一年,并创建了一个应用程序。签署它并将其作为 Beta 版上传到 Playstore。我已经调试并测试了该应用程序 - 该应用程序似乎运行良好。6/10 人能够安装该应用程序并运行它。但在其余设备上,应用商店显示错误代码 - 504 和错误代码 - 108。 在我的 gradle 中,我支持了许多 minSdk 低至 15 的设备。 该应用程序在一台设备的 android 7.1 中似乎可以正常工作。但是具有相同 android 版本和配置的其他设备在安装过程中显示错误..或下载..!(代码 504 / 代码 -108) 这些错误是否会由于我的 gradle 或 mainifest 文件而出现..?

这是我的文件的 sn-p:-

build.gradle(项目)

// Top-level build file where you can add configuration options common to all sub-projects/modules.

buildscript {
    
    repositories {
        google()
        jcenter()
    }
    dependencies {
        classpath 'com.android.tools.build:gradle:3.1.2'
        classpath 'com.google.gms:google-services:3.2.0'
        

        // NOTE: Do not place your application dependencies here; they belong
        // in the individual module build.gradle files
    }
}

allprojects {
    repositories {
        google()
        jcenter()
        maven { url "https://jitpack.io" }
        maven { url "https://maven.google.com" }
    }
}

task clean(type: Delete) {
    delete rootProject.buildDir
}

build.gradle(模块)

apply plugin: 'com.android.application'

android {
    compileSdkVersion 27
    defaultConfig {
        applicationId "com.backbenchers.administrator.instaclone"
        minSdkVersion 15
        targetSdkVersion 27
        versionCode 2
        versionName "1.1"
        testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
    }
    buildTypes {
        release {
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
        }
    }
}

dependencies {
    implementation fileTree(dir: 'libs', include: ['*.jar'])
    implementation 'com.android.support:appcompat-v7:27.0.2'
    implementation 'com.android.support:design:27.0.2'
    implementation 'com.android.support.constraint:constraint-layout:1.0.2'
    testImplementation 'junit:junit:4.12'
    androidTestImplementation 'com.android.support.test:runner:1.0.1'
    androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.1'

    //firebase core
    implementation 'com.google.firebase:firebase-core:10.2.6'

    //bottom navigation view lib
    implementation 'com.github.ittianyu:BottomNavigationViewEx:1.2.4'

    //circle image view
    implementation 'de.hdodenhof:circleimageview:2.2.0'

    //universal image loader
    implementation 'com.nostra13.universalimageloader:universal-image-loader:1.9.5'

    //firebase authentication
    implementation 'com.google.firebase:firebase-auth:10.2.6'

    //firebase realtime database
    implementation 'com.google.firebase:firebase-database:10.2.6'

    //firebase storage
    implementation 'com.google.firebase:firebase-storage:10.2.6'



    //recycler view
    implementation 'com.android.support:recyclerview-v7:27.0.2'

    //cardview
    implementation 'com.android.support:cardview-v7:27.0.2'



    //custom tabs chrome lib
    implementation 'com.android.support:customtabs:27.0.2'

    //play services auth
    implementation 'com.google.android.gms:play-services-identity:10.2.6'
    implementation 'com.google.android.gms:play-services-auth:10.2.6'


///there are more library implemetations...


    //youtube api
    implementation files('libs/YouTubeAndroidPlayerApi.jar')

}

///Firebase
apply plugin: 'com.google.gms.google-services'

清单.xml

<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:tools="http://schemas.android.com/tools"
    package="com.backbenchers.administrator.instaclone">

    <uses-permission android:name="android.permission.INTERNET" />
    <uses-permission android:name="android.permission.CAMERA" />
    <uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />
    <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />

    <uses-sdk android:minSdkVersion="15" android:targetSdkVersion="27" />

    <application
        android:name=".Utils.FirebaseOffline"
        android:allowBackup="true"
        android:icon="@mipmap/ic_launcher"
        android:label="@string/app_name"
        android:roundIcon="@mipmap/ic_launcher_round"
        android:supportsRtl="true"
        android:theme="@style/AppTheme">
        <activity android:name=".Register.NewRegisterActivity">
            <intent-filter>
                <action android:name="android.intent.action.MAIN" />

                <category android:name="android.intent.category.LAUNCHER" />
            </intent-filter>
        </activity>
        
        
        .....all other activities used in the app...remains here

该错误不是由于这些设备的捕获或设置中的某些问题..我认为代码中有问题..

请帮助我了解代码中可能导致这些错误的潜在原因......!......我迷路了......!

【问题讨论】:

  • 试试这些troubleshooting tips
  • 谢谢先生,但它不起作用。
  • 我认为这是设备或其网络连接的问题,而不是您的应用程序。要进行故障排除,您可以询问看到错误的用户在下载其他应用时是否有类似的故障。

标签: java android firebase android-studio google-play-services


【解决方案1】:

错误 504 是网关超时错误,通常与较慢的互联网连接或移动数据网络有关。您可以查看此link 中提供的方法。

方法一:

  • 转到设置>>应用程序管理器或应用程序>>打开“所有”应用程序
  • 从应用列表中找到 Google Play 商店>>清除数据和清除缓存
  • 从应用列表中找到 Google Service Framework >> Clear Data and Clear Cache
  • 现在从 Google Play 商店安装或更新应用

方法二:

  • 转到系统设置>>帐户>>Google>>删除您的Gmail帐户
  • 现在从设置>>应用>>所有>强制停止、清除 Google Play 商店、Google 服务框架和下载管理器的数据和缓存(如方法 1)
  • 现在再次转到设置>>帐户>>Google>>添加您的 gmail 帐户
  • 重新启动您的 android,然后接受所有 Google 条款和 504setup Google 设置
  • 重新运行 Google Play 商店并更新或安装您的应用。

希望这会有所帮助!

【讨论】:

  • 谢谢..但这没有帮助..我在这里问他们之前做了谷歌问题..我已经在问题中提到问题不是由于您在此处发布的原因..我有提到它是由于代码中的一些问题而发生的......!......无论如何,谢谢
【解决方案2】:

我后来找到了问题的解决方案。 这是由于在 java 文件夹中命名包时使用了“大写”字母。 在 android 版本 N 或更高版本中,它没有显示任何解析或错误 -504 或错误 - 108。 但该软件包无法在低于 N 的 android 版本中正确安装。 问题是 android studio 在命名 java 文件夹中的包时从不显示警告.. 就像在命名资源时一样 总是在 JAVA 文件夹中以小写形式命名包*

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 2012-03-16
    • 2017-02-20
    • 2019-10-23
    • 1970-01-01
    • 2019-05-01
    • 1970-01-01
    • 2022-11-22
    相关资源
    最近更新 更多