2016-07-14 8 views
1

이미이 문제에 관해 많은 스레드가 이미 발견되었지만 그 중 아무 것도 나를 위해 작동하지 않습니다."com.example"이 제한되어 있기 때문에 다른 패키지 이름을 사용해야합니다.

Android Studio 2.1.2를 사용하고 있으며 아직 com.example 도메인 이름이 있습니다. 매니페스트 또는 기타 파일을 변경하면 나타나는 오류의 점수를 유발하고, 내 build.gradle는이 보여줍니다 :이 많은 시간을 보냈습니다으로

// Top-level build file where you can add configuration options common to all sub-projects/modules. 

buildscript { 
repositories { 
    jcenter() 
} 
dependencies { 
    classpath 'com.android.tools.build:gradle:2.1.2' 

    // NOTE: Do not place your application dependencies here; they belong 
    // in the individual module build.gradle files 
} 
} 

allprojects { 
repositories { 
    jcenter() 
} 
} 

task clean(type: Delete) { 
delete rootProject.buildDir 
} 

누군가가 나에게 몇 가지 조언을 제공시겠습니까 이미 앱? 미리 감사드립니다 :-)

답변

6

질문에 표시된 내용은 최상위 레벨 build.gradle입니다.

합니다 ( app 폴더 안에) 응용 프로그램 수준 build.gradle을 열고 코드에서 사방 패키지 이름을 변경할 필요가없는 applciationId

에 대한 패키지 이름을 변경합니다. 여기를 변경하면 src 폴더의 패키지 이름과 관계없이 제공된 패키지 이름으로 apk이 생성됩니다.

+0

그게 내가 원하는 부분이야! 정말 고맙습니다! –