2017-12-13 29 views
2

Android 3.0 버전으로 기존 프로젝트를 실행하고 싶습니다. 하지만 누군가가 내 문제를 해결하는 데 도움이 제발 런타임 오류가 표시됩니다.3.0 버전으로 업그레이드하는 동안 컴파일 오류가 발생했습니다.

내 프로젝트에 하위 모듈이 있습니다.

내가 compile으로 변경하면 implementationgradle이 표시됩니다. apt error이 표시됩니다. 내가하는 일. 도와주세요. 미리 감사드립니다.

여기에 오류가 있습니다.

 buildscript { 
repositories { 
    jcenter() 
    google() 
} 
dependencies { 
    classpath 'com.android.tools.build:gradle:3.0.1' 
    classpath 'com.github.dcendents:android-maven-gradle-plugin:1.3' 
    classpath 'com.jfrog.bintray.gradle:gradle-bintray-plugin:1.1' 
    classpath 'com.google.gms:google-services:3.0.0' 
    classpath 'com.neenbedankt.gradle.plugins:android-apt:1.8' 


} 
} 

allprojects { 
repositories { 
    jcenter() 
    maven { 
     url "https://github.com/QuickBlox/quickblox-android-sdk-releases/raw/master/" 
    } 
    google() 
} 


ext { 
    compileSdkVersion = 26 
    buildToolsVersion = "26.0.1" 

    minSdkVersion = 14 
    targetSdkVersion = 23 

    sourceCompatibility = JavaVersion.VERSION_1_7 
    targetCompatibility = JavaVersion.VERSION_1_7 

    lintAbortOnError = false 

    // QuickBlox SDK version 
    qbSdkVersion = '3.1.0' 

    versionName = "3.0" 

    testRunnerVersion = "0.4.1" 


    // Dependency versions 
    playServicesVersion = '9.8.0' 
    supportV4Version = '23.1.1' 
    appcompatV7Version = '23.1.1' 
    recyclerviewV7Version = '23.2.1' 
    supportAnnotationsVersion = '23.1.1' 
    designVersion = '23.1.1' 

    uilVersion = '1.9.0' 
    glideVersion = '3.6.1' 
    pullToRefreshVersion = '3.2.3' 
    stickyListHeaders = '2.7.0' 
    robotoTextViewVersion = '2.4.3' 
    stickersVersion = '0.7.3' 
    crashlyticsVersion = '2.2.2' 
} 


} 

여기

apply plugin: 'com.android.application' 
apply plugin: 'com.neenbedankt.android-apt' 

android { 
compileSdkVersion 26 
buildToolsVersion '26.0.2' 
useLibrary 'org.apache.http.legacy' 
defaultConfig { 
    applicationId "com.sample" 
    minSdkVersion 19 
    targetSdkVersion 26 
    multiDexEnabled true 
} 
lintOptions { 
    checkReleaseBuilds false 
    abortOnError false 
} 
configurations{ 
    all*.exclude module: 'servlet-api' 
} 
dexOptions { 
    javaMaxHeapSize "4g" 
} 
buildTypes { 
    release { 
     minifyEnabled false 
     proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.txt' 
    } 
} 
packagingOptions { 
    exclude 'META-INF/DEPENDENCIES.txt' 
    exclude 'META-INF/LICENSE.txt' 
    exclude 'META-INF/NOTICE.txt' 
    exclude 'META-INF/NOTICE' 
    exclude 'META-INF/LICENSE' 
    exclude 'META-INF/DEPENDENCIES' 
    exclude 'META-INF/notice.txt' 
    exclude 'META-INF/license.txt' 
    exclude 'META-INF/dependencies.txt' 
    exclude 'META-INF/LGPL2.1' 

} 
configurations.all { 
    resolutionStrategy { 
     force 'com.android.support:support-annotations:23.3.0' 
    } 
} 
configurations { 
    // Initializes placeholder configurations that the Android plugin can use when targeting 
    // the corresponding variant of the app. 
    demoDebugCompile {} 
    fullReleaseCompile {} 

} 
} 

dependencies { 
compile project(':library') 
compile project(':simpl3r') 

compile project(':androidHorizontalListView') 


compile 'com.google.code.gson:gson:2.2.4' 
compile files('libs/acra-4.5.0.jar') 
compile files('libs/bugsense-3.6.jar') 
compile files('libs/espresso-1.1-bundled.jar') 
compile files('libs/sample-2.4.1.jar') 
compile files('libs/signpost-commonshttp4-1.2.1.1.jar') 
compile files('libs/signpost-core-1.2.1.1.jar') 
compile files('libs/twitter4j-core-4.0.2.jar') 
compile files('libs/universal-image-loader-1.9.2-SNAPSHOT-with-sources.jar') 
compile files('libs/volley.jar') 
compile files('libs/YouTubeAndroidPlayerApi.jar') 
compile files('libs/gcm.jar') 

compile files('libs/mint-5.2.1.jar') 
compile project(':swipelibrary') 


compile files('libs/glide-3.7.0.jar') 
compile files('libs/glide-3.7.0-javadoc.jar') 
compile 'org.jsoup:jsoup:1.8.3' 
compile 'org.mozilla:rhino:1.7.7' 
compile 'info.guardianproject.netcipher:netcipher:1.2' 
compile 'com.nineoldandroids:library:2.4.0' 
compile 'com.thefinestartist:utils:0.9.1' 
apt 'com.thefinestartist:compilers:0.9.1' 
compile 'com.android.support:recyclerview-v7:23.0.+' 
compile 'in.srain.cube:grid-view-with-header-footer:1.0.12' 
compile 'joda-time:joda-time:2.9.2' 
compile 'com.writingminds:FFmpegAndroid:0.3.2' 

//implemented retrofit. 
testCompile 'junit:junit:4.12' 
compile 'com.android.support:appcompat-v7:25.0.1' 
compile 'com.squareup.retrofit:retrofit:1.9.0' 

compile 'com.google.android.gms:play-services-analytics:9.8.0' 
compile 'com.facebook.android:facebook-android-sdk:4.26.0' 

compile 'com.android.support:design:23.4.0' 
compile 'com.flurry.android:analytics:6.3.1' 
compile project(':sample-chat') 
compile project(':sample-pushnotifications') 


compile 'com.quickblox:quickblox-android-sdk-core:3.1.0' 
compile "com.google.android.gms:play-services-gcm:9.8.0" 

compile project(':sample-core') 


} 

ext { 
compileSdkVersion = 26 
buildToolsVersion = "23.0.2" 

minSdkVersion = 14 
targetSdkVersion = 23 

sourceCompatibility = JavaVersion.VERSION_1_7 
targetCompatibility = JavaVersion.VERSION_1_7 

lintAbortOnError = false 

// QuickBlox SDK version 
qbSdkVersion = '3.1.0' 

versionName = "3.0" 

testRunnerVersion = "0.4.1" 


// Dependency versions 
playServicesVersion = '9.8.0' 
supportV4Version = '23.1.1' 
appcompatV7Version = '23.1.1' 
recyclerviewV7Version = '23.2.1' 
supportAnnotationsVersion = '23.1.1' 
designVersion = '23.1.1' 

uilVersion = '1.9.0' 
glideVersion = '3.6.1' 
pullToRefreshVersion = '3.2.3' 
stickyListHeaders = '2.7.0' 
robotoTextViewVersion = '2.4.3' 
stickersVersion = '0.7.3' 
crashlyticsVersion = '2.2.2' 
} 

이 내 문제를 해결하기 위해 도와주세요 Gradle을

내 응용 프로그램입니다 :

Error:Cannot choose between the following configurations of project :library: 
    - debugApiElements 
    - debugRuntimeElements 
    - releaseApiElements 
    - releaseRuntimeElements 
All of them match the consumer attributes: 
    - Configuration 'debugApiElements': 
    - Found com.android.build.api.attributes.BuildTypeAttr 'debug' but wasn't required. 
    - Found com.android.build.gradle.internal.dependency.AndroidTypeAttr 'Aar' but wasn't required. 
    - Found com.android.build.gradle.internal.dependency.VariantAttr 'debug' but wasn't required. 
    - Found org.gradle.api.attributes.Usage 'java-api' but wasn't required. 
- Configuration 'debugRuntimeElements': 
    - Found com.android.build.api.attributes.BuildTypeAttr 'debug' but wasn't required. 
    - Found com.android.build.gradle.internal.dependency.AndroidTypeAttr 'Aar' but wasn't required. 
    - Found com.android.build.gradle.internal.dependency.VariantAttr 'debug' but wasn't required. 
    - Found org.gradle.api.attributes.Usage 'java-runtime' but wasn't required. 
    - Configuration 'releaseApiElements': 
    - Found com.android.build.api.attributes.BuildTypeAttr 'release' but wasn't required. 
    - Found com.android.build.gradle.internal.dependency.AndroidTypeAttr 'Aar' but wasn't required. 
    - Found com.android.build.gradle.internal.dependency.VariantAttr 'release' but wasn't required. 
    - Found org.gradle.api.attributes.Usage 'java-api' but wasn't required. 
    - Configuration 'releaseRuntimeElements': 
    - Found com.android.build.api.attributes.BuildTypeAttr 'release' but wasn't required. 
    - Found com.android.build.gradle.internal.dependency.AndroidTypeAttr 'Aar' but wasn't required. 
    - Found com.android.build.gradle.internal.dependency.VariantAttr 'release' but wasn't required. 
    - Found org.gradle.api.attributes.Usage 'java-runtime' but wasn't required. 

여기 내 홈페이지 Gradle을합니다.

답변

0

변경이

compile project(':library') 
compile project(':simpl3r') 

compile project(path: ':library', configuration: 'default') 
compile project(path: ':simpl3r', configuration: 'default') 

으로 갱신 1

implementation project(path: ':library') 
implementation project(path: ':simpl3r') 
. 
. 
. 
+0

나는 서로를 점점 그 라인 스피을 변경하는 경우 apt와 관련된 오류 – Lassie

+0

이 구현 프로젝트 (': library')를 시도하십시오 – MinnuKaAnae

+0

업데이트 된 응답을 확인하십시오. – MinnuKaAnae

0

변경이. 희망이 도움말.

compile project(':library') 
compile project(':simpl3r') 
compile project(':androidHorizontalListView') 
compile project(':swipelibrary') 
compile project(':sample-chat') 
compile project(':sample-pushnotifications') 

implementation project(':library') 
implementation project(':simpl3r') 
implementation project(':androidHorizontalListView') 
implementation project(':swipelibrary') 
implementation project(':sample-chat') 
implementation project(':sample-pushnotifications') 

에 UPDATE : 당신은 라인을 제거 할 수 있습니다 는 :

apply plugin: 'com.neenbedankt.android-apt' 

앱 수준 Gradle 종속성을 포함해야한다

compile 'com.jakewharton:butterknife:8.8.1' 
annotationProcessor 'com.jakewharton:butterknife-compiler:8.8.1' 
+0

만약 내가이 iam이이 에러를 얻는 것처럼 바뀌면 ............... 'tweak2 @ debug/compileClasspath'에 대한 의존성을 해결할 수 없습니다 : 프로젝트를 해석 할 수 없습니다 : sample-pushnotifications. – Lassie

+0

변경했습니다. 내 업데이트 된 답변을 참조하십시오. – Dharmishtha

+0

@ gowthami 변경을 시도해 보셨습니까? – Dharmishtha

0

나는 여기에 여러 문제를 참조하십시오

  1. 안드로이드 지원 libs와의 다른 버전을 사용 (예 : 당신의 recyclerview이 23.0.+하지만 지원 디자인 23.4.0 등이다) 당신의 lib 디렉토리 버전과 내선을 선언

  2. , 실제로 아무데도 사용하지 않습니까?

  3. 동일한 ext는 app gradle 및 projects gradle에 선언되어 있습니까? 지원 lib 디렉토리의 버전과 일치하지 않습니다

  4. compileSdkVersion 26 (와? 모두를 사용하지 않는) 예를 들어 구글 플레이 서비스 9.8에 대한 같은 아주 오래된 버전을 사용

  5. (당신은 그것의 다양한 23 버전을 사용). 0 등

  6. 은 여전히 ​​대신 implementation

목록은 아마 완료되지 않았습니다의 compile 사용되지 않는 사용하지만, 나는 당신이 당신의 Gradle을 파일을 정리 시작하는 데 도움이되기를 바랍니다