Android Studio 0.5.1
내가 Gradle을 빌드 파일을 생성하여 내 이클립스 프로젝트 LocationLab
및 LocationLabTest
을 수출하고 있습니다.클래스는 테스트 패키지의 범위 내에 있지 않은
그런 다음 Android Studio로 가져 왔습니다. LocationLabTest에 대한 모듈 종속성은 Project Stucture의 LocationLab에 따라 달라 지므로이를 설정했습니다.
테스트해야하는 클래스가 테스트 패키지의 범위에 포함되지 않은 것으로 보입니다.
문제 LocationLabTest가 LocationLab 패키지 course.labs.locationlab LocationLabTest 매니페스트 파일에서
이 TargetPackage android:targetPackage="course.labs.locationlab"
의 붉은 색을 가지고에 대한 가져 오기 패키지를 찾을 수 있다는 것입니다. 어떤 제안에 대한
많은 감사합니다, 여기에
내 구조의 스크린 샷입니다 :build.grade (LocationLabTest)
apply plugin: 'android'
dependencies {
compile project(':LocationLab')
compile fileTree(dir: 'libs', include: '*.jar')
}
android {
compileSdkVersion 18
buildToolsVersion '19.0.1'
sourceSets {
main {
manifest.srcFile 'AndroidManifest.xml'
java.srcDirs = ['src']
resources.srcDirs = ['src']
aidl.srcDirs = ['src']
renderscript.srcDirs = ['src']
res.srcDirs = ['res']
assets.srcDirs = ['assets']
}
// Move the tests to tests/java, tests/res, etc...
instrumentTest.setRoot('tests')
// Move the build types to build-types/<type>
// For instance, build-types/debug/java, build-types/debug/AndroidManifest.xml, ...
// This moves them out of them default location under src/<type>/... which would
// conflict with src/ being used by the main source set.
// Adding new build types or product flavors should be accompanied
// by a similar customization.
debug.setRoot('build-types/debug')
release.setRoot('build-types/release')
}
buildTypes {
}
}
build.grade (LocationLab)
apply plugin: 'android'
dependencies {
compile fileTree(dir: 'libs', include: '*.jar')
}
android {
compileSdkVersion 18
buildToolsVersion '19.0.1'
sourceSets {
main {
manifest.srcFile 'AndroidManifest.xml'
java.srcDirs = ['src']
resources.srcDirs = ['src']
aidl.srcDirs = ['src']
renderscript.srcDirs = ['src']
res.srcDirs = ['res']
assets.srcDirs = ['assets']
}
// Move the tests to tests/java, tests/res, etc...
instrumentTest.setRoot('tests')
// Move the build types to build-types/<type>
// For instance, build-types/debug/java, build-types/debug/AndroidManifest.xml, ...
// This moves them out of them default location under src/<type>/... which would
// conflict with src/ being used by the main source set.
// Adding new build types or product flavors should be accompanied
// by a similar customization.
debug.setRoot('build-types/debug')
release.setRoot('build-types/release')
}
}