找不到参数[com.android.volley.tests]的方法testPackageName()

找不到参数[com.android.volley.tests]的方法testPackageName(),第1张

概述我想从 eclipse迁移到工作室.我按照教程,尝试用gradle在studio中构建现有的eclipse应用程序.我在运行此评论时遇到以下问题 Rethinavels-Mac-mini:HomeStarProvider rethinavel$./gradlew clean 我是工作室和gradle的新手.如何解决这个问题?学习gradle的任何教程? FAILURE:构建因异常而失败. >哪里: 我想从 eclipse迁移到工作室.我按照教程,尝试用gradle在studio中构建现有的eclipse应用程序.我在运行此评论时遇到以下问题

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

我是工作室和gradle的新手.如何解决这个问题?学习gradle的任何教程?

FAILURE:构建因异常而失败.

>哪里:
构建文件’/Users/rethinavel/Desktop/WorkSpace/HomeStarProvIDer/Volley/build.gradle’行:9
>出了什么问题:
评估项目’:排球’时出现问题.

Could not find method testPackagename() for arguments [com.androID.volley.tests] on 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 = null,signingConfig = null,resConfig = null,mBuildConfigFIElds = {},mResValues = {},mProguardfiles = [],mConsumerProguardfiles = [],mManifestPlaceholders = {}}.

这是Build.gradle文件.

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"            }        }    }
解决方法 看起来问题出在Volley build.gradle文件中.您使用gradle版本1.0.0和更高版本,但自此版本以来,方法testPackagename已重命名为testApplicationID.您可以在 Android Tools Project Site找到所有版本的更改 总结

以上是内存溢出为你收集整理的找不到参数[com.android.volley.tests]的方法testPackageName()全部内容,希望文章能够帮你解决找不到参数[com.android.volley.tests]的方法testPackageName()所遇到的程序开发问题。

如果觉得内存溢出网站内容还不错,欢迎将内存溢出网站推荐给程序员好友。

欢迎分享,转载请注明来源:内存溢出

原文地址: http://outofmemory.cn/web/1127817.html

(0)
打赏 微信扫一扫 微信扫一扫 支付宝扫一扫 支付宝扫一扫
上一篇 2022-05-30
下一篇 2022-05-30

发表评论

登录后才能评论

评论列表(0条)

保存