IT이야기/Android
No manifest file found at .\src\main\AndroidManifest.xml 문제 해결
FelixShin
2015. 12. 1. 15:25
반응형
WARNING: No manifest file found at .\src\main\AndroidManifest.xml.Falling back to the Android OS resources only.
To remove this warning, annotate your test class with @Config(manifest=Config.NONE).
Android Studio에서 Robolectric Test Case를 작성할 때 위와 같은 오류가 났었는데, 아래와 같이 @Config에서
@Config(constants = BuildConfig.class, sdk=21, manifest = "/src/main/AndroidManifest.xml")
manifest = "app/src/main/AndroidManifest.xml" 로 바꾸었더니 문제가 해결되었다.
@Config(constants = BuildConfig.class, sdk=21, manifest = "app/src/main/AndroidManifest.xml")
그리고 app폴더 안에 build.gradle에서
android{ } 안에
packagingOptions {
//exclude 'META-INF/DEPENDENCIES'
//exclude 'META-INF/NOTICE'
//exclude 'META-INF/LICENSE'
exclude 'META-INF/LICENSE.txt'
exclude 'META-INF/NOTICE.txt'
}
이것도 추가했었다...