나는 안드로이드 개발에 초보자입니다.
Use '$' instead of '.' for inner classes (or use only lowercase letters in package names) AndroidManifest.xml
내가이 link에 대한 몇 가지 정보를 찾았 나는 최신 버전으로 내 이클립스와 안드로이드 SDK를 업데이트 한 후, 나는 경고를 받았습니다.
"When you reference an inner class in a manifest file, you must use '$' instead of '.' " +
"as the separator character, e.g. Outer$Inner instead of Outer.Inner.\n" +
"\n" +
"(If you get this warning for a class which is not actually an inner class, it's " +
"because you are using uppercase characters in your package name, which is not " +
"conventional.)"
저는 서브 패키지 이름에 com.abc.app.Promotion
과 같이 대문자를 사용한다고 생각합니다.
질문 : manifest.xml에서이 경고를 제거하는 가장 좋은 방법은 무엇입니까? 그것은 여전히 구축하고 실행할 수 있지만 나는 그것이 너무 짜증나 찾아.
나는 패키지의 이름을 변경 리팩토링을 사용하여 시도하고 manifest.xml android:name="com.abc.app.promotion.Promotion"
을 수정하지만,이 오류를 가지고 : 돕는
java.lang.RuntimeException: Unable to start activity ComponentInfo{com.abc.app/com.abc.app.TabView}: android.content.ActivityNotFoundException: Unable to find explicit activity class {com.abc.app/com.abc.app.promotion.Promotion}; have you declared this activity in your AndroidManifest.xml?
감사합니다!
편집 : 원래 manifest.xml
<activity android:name=".Promotion.Promotion" ></activity>
업데이트 manifest.xml 실제로 내부 클래스가 아닌 클래스에 대한이 경고를받을 경우 사용하고 있기 때문에, 그것의
<activity android:name="promotion.Promotion" ></activity>
사용 소문자 문자 만 패키지 이름을. – Alex
예, 이해합니다. 나는 이전 버전의 SDK에서 경고없이 그 실수를했고 지금 다시 변경하고 싶습니다. 감사! – siutsin
매니페스트 게시 – njzk2