小编SIL*_*NIK的帖子

Gradle 执行失败:未知的命令行选项“--daemon”

我使用最新的 Android Studio (0.8.2)。在我的另一台 PC 上,成功构建了相同的代码。

这意味着构建脚本是正确的。

所以我假设它与 Gradle 配置有关,但我再次检查了所有配置:

  • 我完全删除了 C:\Windows\Users{MyUser}.gradle 下的 .gradle 文件夹以删除旧配置;
  • gradle.properties 文件没有任何未注释的选项

在此处输入图片说明

我想念什么?

笔记!我没有指定 '--daemon' 选项。或者我只这么认为:( 我在 Gradle 默认和项目特定设置中找不到它

此外,我在工作室中创建了全新的项目。它没有帮助 - 同样的错误(

android gradle android-studio

5
推荐指数
1
解决办法
7432
查看次数

使用TargetApi注释无法从较新的API中找到方法

从4开始,我想使用下一个代码为所有Android API应用SharedPreferences.

/**
 * The apply method was introduced 
 * in Android API level 9.<br> Calling it causes a safe asynchronous write 
 * of the SharedPreferences.Editor object to be performed. Because
 * it is asynchronous, it is the preferred technique for saving SharedPreferences.<br> 
 * So we should use appropriate method if we doesn`t need confirmation of success.
 * In this case we should use old commit method.
 */
@TargetApi(9)
    public static void applySharedPreferences(SharedPreferences.Editor editor){
    if (Build.VERSION.SDK_INT < 9){
        editor.commit();
    } …
Run Code Online (Sandbox Code Playgroud)

eclipse android

2
推荐指数
1
解决办法
1253
查看次数

标签 统计

android ×2

android-studio ×1

eclipse ×1

gradle ×1