android - com.android.volley.ServerError 错误 instanceof VolleyError

标签 android android-gradle-plugin android-volley build.gradle

早上好

我有问题 “com.android.volley.ServerError

这是我的 build.gradle 文件 'app'

apply plugin: 'com.android.application'

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

dependencies {
    implementation project(':volley')
    implementation 'com.mcxiaoke.volley:library:1.0.19'
    implementation 'com.android.support:design:26.1.0'
    implementation 'com.android.support:support-annotations:27.1.1'
    implementation fileTree(include: ['*.jar'], dir: 'libs')
    implementation 'com.android.support:appcompat-v7:26.1.0'
    implementation 'com.android.support.constraint:constraint-layout:1.1.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'
}

文件: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.0.1'


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

allprojects {
    repositories {
        google()
        jcenter()
    }
}

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

在 logcat 中,我看到“

找不到图层

(com.example.azizsana.espacemembre2/com.example.azizsana.espacemembre2.RegisterActivity#0) 在父层(无父层)中。

最佳答案

根据您的错误代码,您的后端可能存在问题。 您可以查看更多表格 https://www.w3.org/Protocols/HTTP/HTRESP.htmlhttp://www.restapitutorial.com/httpstatuscodes.html这个文档。

Unexpected response code 404 for http://192.168.3.101/android/tutoEspaceMembre/register.php

404状态码表示:

Not found 404
The server has not found anything matching the URI given

关于android - com.android.volley.ServerError 错误 instanceof VolleyError,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/50679576/

相关文章:

Android Firebase NoClassDefFoundError : com. google.firebase.FirebaseOptions 更新到新的 firebase 后

android - 定期从远程数据库更新本地数据库的最佳方法

android - 如果 SQLite 数据库达到存储限制,插入会发生什么情况?

java - 使用exp4j数学表达式评估器

android - 适用于 Android 的 ISO 适用于 VirtualBox 的 Google API

android - 如何修复 ".gradle\nodejs\node-v6.7.0-win-x64\node.exe' '以非零退出值 1 完成”

android - 如何设置确定性圆形进度条的二次色

android-gradle-plugin - httpclient 与 Android 现在提供的类冲突

android - Volley 错误输出服务器端发送的错误信息

Android 截击 : how to make json request without returned object?