在Android工作室更改项目名称 [英] Change project name on Android Studio

查看:174
本文介绍了在Android工作室更改项目名称的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想改变我的项目和模块的名称。但是,如果我试图重新命名他们的Andr​​oid工作室通知我一些错误...


例如我想的名字从MyApplication的到AndroidApp改变如下面的图片。



在第一个矩形我想改变它:


  

AndroidApp (G:\\ Android的\\ AndroidApp)。


在第二个矩形我想改变它:


  

AndroidApp [AndroidApp-AndroidApp]


编辑:这是日志:


  

摇篮:项目AndroidApp没有根项目找到MyApplicationProject


的build.gradle:

  buildscript {
    库{
        mavenCentral()
    }
    依赖{
        类路径'com.android.tools.build:gradle:0.5.+
    }
}
应用插件:'机器人'库{
    mavenCentral()
}安卓{
    compileSdkVersion 18
    buildToolsVersion18.0.1    defaultConfig {
        7的minSdkVersion
        targetSdkVersion 16
    }
}依赖{
    编译com.android.support:support-v4:18.0.0
}

settings.gradle:

 包括':为MyApplication


解决方案

您可以更改的文件.idea / .NAME在标题栏中显示的名称。

I want to change the name of my project and module. But if I try to rename them Android Studio notify me some errors...

e.g. I want to change the name from "MyApplication" to "AndroidApp" as shown in the image below.

In the first rectangle I want to change it in:

AndroidApp ("G:...\Android\AndroidApp).

In the second rectangle I want to change it in:

AndroidApp [AndroidApp-AndroidApp]

edit: This is the log:

Gradle: Project 'AndroidApp' not found in root project 'MyApplicationProject'.

build.gradle:

buildscript {
    repositories {
        mavenCentral()
    }
    dependencies {
        classpath 'com.android.tools.build:gradle:0.5.+'
    }
}
apply plugin: 'android'

repositories {
    mavenCentral()
}

android {
    compileSdkVersion 18
    buildToolsVersion "18.0.1"

    defaultConfig {
        minSdkVersion 7
        targetSdkVersion 16
    }
}

dependencies {
    compile 'com.android.support:support-v4:18.0.0'
}

settings.gradle:

include ':MyApplication'

解决方案

You can change the name that is shown in the title bar in the file ".idea/.name".

这篇关于在Android工作室更改项目名称的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆