2016-11-11 1 views
1

마침내 Eclipse에서 Android Studio로 이전 중이며 작은 모듈을 연결할 수도 없습니다.모듈에서 'R'기호를 확인할 수 없습니다.

여기에 자원이 유일한 파일 - 당신은 스크린 샷에서 볼 수 있듯이, 거기에 오류

enter image description here

는 없다 그러나이 'R'을 필요한 클래스에 해결되지 않습니다. 그래서 혼란 스러워요 - 나는 아직 모든 라이브러리 후크하지 않았다 같은 응용 프로그램의 모듈에 문제가 있지만, 'dragsortlib'모듈에 명백한 문제가있다

enter image description here

들여다 너무 많이가 없다. 청소하고 프로젝트를 재건했지만 도움이되지 않았습니다.

매니페스트 :

<?xml version="1.0" encoding="utf-8"?> 
<manifest xmlns:android="http://schemas.android.com/apk/res/android" 
    package="com.mobeta.android.dslv" 
    android:versionCode="4" 
    android:versionName="0.6.1"> 
    <uses-sdk android:targetSdkVersion="7" 
     android:minSdkVersion="7" /> 
</manifest> 

Gradle을 : 빌드에

apply plugin: 'com.android.library' 

android { 
    compileSdkVersion 25 
    buildToolsVersion "24.0.2" 

    defaultConfig { 
     minSdkVersion 9 
     targetSdkVersion 25 
     versionCode 1 
     versionName "1.0" 

     testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner" 

    } 
    buildTypes { 
     release { 
      minifyEnabled false 
      proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' 
     } 
    } 
} 

dependencies { 
    compile fileTree(include: ['*.jar'], dir: 'libs') 
    androidTestCompile('com.android.support.test.espresso:espresso-core:2.2.2', { 
     exclude group: 'com.android.support', module: 'support-annotations' 
    }) 
    compile 'com.android.support:appcompat-v7:25.0.0' 
    compile files('libs/android-support-v4.jar') 
    testCompile 'junit:junit:4.12' 
} 
+0

시도해보십시오 파일> 캐시 무효화/재시작 ... –

+0

매니페스트에 오류가 있습니까? – Raghavendra

+1

R을 가져 오는 것을 잊지 마세요 – Enzokie

답변

2

클릭 -> 도구를 클릭 한 다음 프로젝트를 다시 빌드 -> 안드로이드 - Gradle을 파일로> 동기화 프로젝트.

당신은 먼저 here

+0

완료했습니다. didnt 도움 :( – user2976267

0
  1. 수동
  2. 삭제 빌드 폴더 응용 프로그램에서 R 파일의 가져 오기를 확인하고 다시 프로젝트를 빌드 참조 할 수 있습니다.
  3. xml 파일을 확인하십시오. xml 파일에 오류가 있으면 R.java가 생성되지 않습니다.
  4. 마지막으로 빌드 도구를 업데이트하십시오.
관련 문제