Could not find testPackageName () method for arguments [com.android.volley.tests]

I wanted to migrate from the eclipse to the studio. I followed the tutorial and tried to create an existing eclipse application in the studio using gradle. Before executing this comment, I ran into the following problem:

 Rethinavels-Mac-mini:HomeStarProvider rethinavel$ ./gradlew clean

I am new to studio and gradle. How to fix it? Any tutorials for learning gradle?

FAILURE: assembly failure with exception.

  • Where: Create the file '/Users/rethinavel/Desktop/WorkSpace/HomeStarProvider/Volley/build.gradle': 9

  • What went wrong: There was a problem evaluating the Volley project.

    Could not find testPackageName () method for [com.android.volley.tests] arguments in ProductFlavor_Decorated {name = main, minSdkVersion = null, targetSdkVersion = null, renderscriptTargetApi = null,

    renderscriptSupportModeEnabled = null, renderscriptNdkModeEnabled = null, versionCode = null, versionName = null, applicationId = null, testApplicationId = null, testInstrumentationRunner = null, testHandleProfiling = null, testFunctionalTest = nullFullFullFullFig = {}, MProguardFiles = [], mConsumerProguardFiles = [], mManifestPlaceholders = {}}.

Here is the Build.gradle file.

buildscript {
                    repositories {
                        mavenCentral()
                    }
                    dependencies {
                        classpath 'com.android.tools.build:gradle:1.0.+'
                    }
                }

    apply plugin: 'android'
    dependencies {
        compile fileTree(dir: 'libs', include: '*.jar')
        compile project(':SliderLibrary')
        compile project(':Volley')
        compile project(':Google Play Services Library')
        compile project(':viewanimationLibrary')
    }

    android {
        compileSdkVersion 19
        buildToolsVersion "20.0.0"

        compileOptions {
            sourceCompatibility JavaVersion.VERSION_1_7
            targetCompatibility JavaVersion.VERSION_1_7
        }


        sourceSets {
            main {
                manifest.srcFile 'AndroidManifest.xml'
                java.srcDirs = ['src']
                resources.srcDirs = ['src']
                aidl.srcDirs = ['src']
                renderscript.srcDirs = ['src']
                res.srcDirs = ['res']
                assets.srcDirs = ['assets']
            }

            // Move the tests to tests/java, tests/res, etc...
            androidTestCompile.setRoot('tests')

            // Move the build types to build-types/<type>
            // For instance, build-types/debug/java, build-types/debug/AndroidManifest.xml, ...
            // This moves them out of them default location under src/<type>/... which would
            // conflict with src/ being used by the main source set.
            // Adding new build types or product flavors should be accompanied
            // by a similar customization.
            debug.setRoot('build-types/debug')
            release.setRoot('build-types/release')
        }

        productFlavors {
            flavor1 {
                applicationId "com.homestar.provider"
            }
        }

    }
+4
source share
1 answer

, Volley build.gradle. gradle 1.0.0 , testPackageName testApplicationId . Android Tools

+3

Source: https://habr.com/ru/post/1585093/


All Articles