当我尝试运行项目时,signingConfig.storeFile不存在 [英] signingConfig.storeFile does not exist when I try to run the project
问题描述
我从GitHub下载了一个项目,并由Android Studio打开了它.所有必需的构建工具和Android支持存储库都是通过Android Studio自动下载的.
I downloaded a project from GitHub and opened it by Android Studio. All required build tools and Android support repositories were automatically downloaded through Android Studio.
https://github.com/DrKLO/Telegram
现在,我尝试运行项目,我在按摩"中遇到错误.
Now that I try to run the project, I get an error in Massages.
Error:A problem was found with the configuration of task ':TMessagesProj:packageDebug'.
> File 'G:\AndroidDev\AndroidStudioProjects\Telegram-master\TMessagesProj\config\release.keystore' specified for property 'signingConfig.storeFile' does not exist.
我在Stack Exchange上发现了其他一些线程:
I found some other threads on Stack Exchange:
带有packageRelease没有为属性'signingConfig.storeFile'指定的"的Gradle签名应用
为属性"signingConfig.storeFile"指定的Android不存在
,并且按照他们的建议创建了密钥库,但是单击运行"按钮时仍然出现该错误.他们似乎与我不同.
and I created the keystores as they suggested, but I'm still getting that error when I click the run button. They seem to be different from mine.
我还生成了签名的APK,当我尝试将其安装在设备上时,程序崩溃并停止运行,我猜它可能是由上述问题引起的.
I also generated the signed APK and when I tried to install it on a device, the program crashed and stopped and I guess it might be caused by the mentioned problem.
我确定它应该可以正常工作,因为它是Telegram Messenger的官方来源. https://github.com/DrKLO/Telegram
I'm sure it should work correctly because it's the official source of Telegram messenger. https://github.com/DrKLO/Telegram
如果您需要文件build.gradle:
In case you need the file build.gradle:
apply plugin: 'com.android.application'
repositories {
mavenCentral()
}
dependencies {
compile 'com.android.support:support-v4:23.1.+'
compile 'com.google.android.gms:play-services:3.2.+'
compile 'net.hockeyapp.android:HockeySDK:3.6.+'
compile 'com.googlecode.mp4parser:isoparser:1.0.+'
}
android {
compileSdkVersion 23
buildToolsVersion '23.0.2'
useLibrary 'org.apache.http.legacy'
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_7
targetCompatibility JavaVersion.VERSION_1_7
}
signingConfigs {
debug {
storeFile file("config/release.keystore")
storePassword RELEASE_STORE_PASSWORD
keyAlias RELEASE_KEY_ALIAS
keyPassword RELEASE_KEY_PASSWORD
}
release {
storeFile file("config/release.keystore")
storePassword RELEASE_STORE_PASSWORD
keyAlias RELEASE_KEY_ALIAS
keyPassword RELEASE_KEY_PASSWORD
}
}
buildTypes {
debug {
debuggable true
jniDebuggable true
signingConfig signingConfigs.debug
applicationIdSuffix ".beta"
}
release {
debuggable false
jniDebuggable false
signingConfig signingConfigs.release
}
foss {
debuggable false
jniDebuggable false
signingConfig signingConfigs.release
}
}
sourceSets.main {
jniLibs.srcDir 'libs'
jni.srcDirs = [] //disable automatic ndk-build call
}
sourceSets.debug {
manifest.srcFile 'config/debug/AndroidManifest.xml'
}
sourceSets.release {
manifest.srcFile 'config/release/AndroidManifest.xml'
}
sourceSets.foss {
manifest.srcFile 'config/foss/AndroidManifest.xml'
}
defaultConfig {
minSdkVersion 8
targetSdkVersion 23
versionCode 695
versionName "3.3.2"
}
}
推荐答案
1)检查storeFile是否存在于路径G:\AndroidDev\AndroidStudioProjects\Telegram-master\TMessagesProj\config\release.keystore
1) check if storeFile exists at the path G:\AndroidDev\AndroidStudioProjects\Telegram-master\TMessagesProj\config\release.keystore
2)如果不是,请在其中重命名/移动密钥库文件,或将路径更改为密钥库文件位置.
2) if not - rename / move your keystore file there or change the path to your keystore file location.
现在应该可以工作了.如果您在涉及本机代码时遇到构建问题,请尝试使用本主题 Android电报应用程序-> java.lang.UnsatisfiedLinkError:找不到无效的实现
It should work now. If you have a build problem while concerning native code try this topic Android Telegram App --> java.lang.UnsatisfiedLinkError: No implementation found for void
这篇关于当我尝试运行项目时,signingConfig.storeFile不存在的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!