按照步骤,执行run-android报错
Ariel08081214 opened this issue · comments
Ariel commented
Ariel commented
请问是什么原因呢?
bing commented
请问解决了吗
1064989385 commented
我也是 这个问题
WiSH commented
刚开始编译项目的时候,我也遇到了这个问题。我的情况中的解决方案是移除他的签名相关的配置。你可以用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
再次编译就可以编译通过了
Ariel commented
我后来没试过了,楼上的解决方法可以试试 @milk-coffee-tea @1064989385
彦辰渊 commented
Follow these steps to solve the problem.
chlbeyond93 commented
按照这位仁兄@Shouheng88 的方法去做,我的也可以编译了,虽然跑到虚拟机后还是有报错