You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

Android Studio报错:未找到‘default’配置(Volley与ArcMenu场景)

Fixing "Configuration with name 'default' not found" in Old Volley/ArcMenu Project

Hey there, let's get your old Lollipop-targeted project up and running again. That error usually pops up when Gradle can't find the proper build configuration for the local subprojects (Volley and ArcMenu) you're referencing. Here's how to fix it:

1. Verify Subproject Structure & Setup

First, double-check that the volley and arcmenu folders are in the root of your main project (same level as your app module). Each of these folders needs to be recognized as an Android Library module:

  • Open Android Studio's Project view (left sidebar) and make sure each subfolder has a build.gradle file.
  • If they don't show up as library modules, right-click the folder > Add Module and follow the prompts to set them up as Android Library.

2. Fix the Subproject Build.gradle Files

Each subproject's build.gradle needs to be configured as a library (not an app). For your API 21 target, use this template for both volley/build.gradle and arcmenu/build.gradle:

apply plugin: 'com.android.library'

android {
    compileSdkVersion 21
    buildToolsVersion "21.1.2" // Use a build tool version compatible with API 21

    defaultConfig {
        minSdkVersion 14 // Adjust based on the library's requirements
        targetSdkVersion 21
    }

    buildTypes {
        release {
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
        }
    }
}

dependencies {
    // Add any dependencies the library needs (most won't need extra here)
}

This tells Gradle to generate the "default" configuration it's looking for.

3. Update Settings.gradle

Make sure your root settings.gradle includes both subprojects. It should look like this:

include ':app', ':volley', ':arcmenu'

If either subproject is missing here, Gradle won't know to include them in the build.

4. Replace Deprecated compile with implementation

While your old project used compile, that's been deprecated in newer Gradle versions. Swap out the lines in your app/build.gradle to use implementation instead:

// Old lines:
// compile project('volley')
// compile project('arcmenu')

// New lines:
implementation project(':volley')
implementation project(':arcmenu')

If you're still using a very old Gradle plugin (pre-3.0), you can stick with compile, but implementation is more reliable for newer setups.

5. Alternative: Use Maven Dependencies (Easier!)

If dealing with local subprojects is too much hassle, you can replace them with pre-built Maven dependencies. This avoids the configuration error entirely:

  • For Volley:
    implementation 'com.android.volley:volley:1.2.1'
    
  • For ArcMenu: Find a stable Maven version (check the library's original repo for the correct coordinates). Example:
    implementation 'com.github.specialcyci:arcmenu:1.0.0'
    

6. Clean & Rebuild

After making these changes:

  1. Click File > Sync Project with Gradle Files
  2. Go to Build > Clean Project
  3. Then Build > Rebuild Project

That should resolve the "default configuration not found" error.

内容的提问来源于stack exchange,提问作者Andromeda

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.05.22 09:57:51