gpt4 book ai didi

android - 当我尝试运行项目时,signingConfig.storeFile 不存在

转载 作者:行者123 更新时间:2023-11-30 01:39:54 25 4
gpt4 key购买 nike

我从GitHub上下载了一个工程,用Android Studio打开。所有必需的构建工具和 Android 支持存储库均通过 Android Studio 自动下载。

https://github.com/DrKLO/Telegram

现在我尝试运行项目,但在 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 上发现了一些其他线程:

Gradle signing app with packageRelease “specified for property 'signingConfig.storeFile' does not exist”

Android specified for property 'signingConfig.storeFile' does not exist

并且我按照他们的建议创建了 keystore ,但是当我单击运行按钮时我仍然收到该错误。他们似乎和我的不一样。

我还生成了已签名的 APK,当我尝试将其安装到设备上时,程序崩溃并停止,我猜这可能是由上述问题引起的。

我确信它应该可以正常工作,因为它是 Telegram Messenger 的官方来源。 https://github.com/DrKLO/Telegram

如果您需要文件 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"
}
}

最佳答案

您的问题是:Android Studio 正在搜索您告诉它应该存在的 key 文件...但实际上不存在。

您告诉 Android Studio 文件会在哪里?

storeFile file("config/release.keystore")

如何创建这个丢失的文件? https://developer.android.com/studio/publish/app-signing.html

如果您已经创建了 keystore ,请检查它是否在正确的位置,通常我使用名为“keystore”的文件夹而不是“config”,当您浏览搜索它时更直观;)

storeFile rootProject.file("keystore/release.keystore")

关于android - 当我尝试运行项目时,signingConfig.storeFile 不存在,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/34629723/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com