GitHubPopular icon indicating copy to clipboard operation
GitHubPopular copied to clipboard

按照步骤,执行run-android报错

Open Ariel08081214 opened this issue 8 years ago • 7 comments

2017-12-22_20-13-48

Ariel08081214 avatar Dec 22 '17 12:12 Ariel08081214

请问是什么原因呢?

Ariel08081214 avatar Dec 22 '17 12:12 Ariel08081214

请问解决了吗

milk-coffee-tea avatar Apr 28 '18 08:04 milk-coffee-tea

我也是 这个问题

1064989385 avatar May 10 '18 05:05 1064989385

刚开始编译项目的时候,我也遇到了这个问题。我的情况中的解决方案是移除他的签名相关的配置。你可以用Android Studio打开该项目,然后在Terminal中输入gradlew --info,这样你可以获取到更多的输出的错误信息。然后,我发现是他的签名那里出的问题,然后我对代码做了几处修改(全部都是在app下面的build.gradle文件里面):

1.首先把def enableProguardInReleaseBuilds = true修改为false 2.然后移除

def getPassword(String currentUser, String keyChain) {
    def stdout = new ByteArrayOutputStream()
    def stderr = new ByteArrayOutputStream()
    exec {
        commandLine 'security', '-q', 'find-generic-password', '-a', currentUser, '-s', keyChain, '-w'
        standardOutput = stdout
        errorOutput = stderr
        ignoreExitValue true
    }
    //noinspection GroovyAssignabilityCheck
    stdout.toString().trim()
}
def pass = getPassword("jph","jph_android_keystore")

3.再移除

    signingConfigs {//签名配置
        release {
            storeFile file(MYAPP_RELEASE_STORE_FILE)
            storePassword pass
            keyAlias MYAPP_RELEASE_KEY_ALIAS
            keyPassword pass
        }
    }

4.最后把buildTypes中的下面代码移除

            signingConfig signingConfigs.release

再次编译就可以编译通过了

Shouheng88 avatar May 11 '18 10:05 Shouheng88

我后来没试过了,楼上的解决方法可以试试 @milk-coffee-tea @1064989385

Ariel08081214 avatar May 29 '18 07:05 Ariel08081214

Follow these steps to solve the problem.

YanChenYuan avatar Jun 12 '18 09:06 YanChenYuan

按照这位仁兄@Shouheng88 的方法去做,我的也可以编译了,虽然跑到虚拟机后还是有报错

chlbeyond93 avatar Jul 04 '18 13:07 chlbeyond93