【问题标题】:gradle.properties in android studio project missingandroid studio 项目中的 gradle.properties 缺失
【发布时间】:2016-10-23 00:45:20
【问题描述】:
我将 android 应用程序从 eclipse 导入到 android studio,应用程序工作正常,但缺少 gradle.properties。
我需要将 Uber SDK 集成到我的应用程序中,我需要添加以下属性
UBER_CLIENT_ID,
UBER_REDIRECT_URI,
UBER_SERVER_TOKEN,
到gradle.properties,但是没有gradle.properties。
【问题讨论】:
标签:
android
eclipse
android-studio
android-gradle-plugin
android-studio-import
【解决方案1】:
您可以将 gradle.properties 文件放在项目的 root 或 ~/home/user/.gradle/ 文件夹中
如果你使用的是 mac,请在终端中输入以下命令:
cd ~/home/user/.gradle/
nano gradle.properties
然后在打开的文件中输入以下内容:
UBER_CLIENT_ID = "abc"
UBER_REDIRECT_URI = "bcd"
UBER_SERVER_TOKEN = "cde"