-1

내 애플리케이션을 만들려고하는데 디버그가 잘되어 실행됩니다. 내가 릴리스에 대한 서명 된 APK를 만들려고 할 때, 그것은 3.0.1서명 된 APK 출시 오류 : 오류 : "javax/xml/namespace/QName.class"처리 중 문제가 발생했습니다.

Error:trouble processing "javax/xml/namespace/QName.class": 
Error:Ill-advised or mistaken usage of a core class (java.* or javax.*) 
Error:when not building a core library. 
Error:This is often due to inadvertently including a core library file 
Error:in your application's project, when using an IDE (such as 
Error:Eclipse). If you are sure you're not intentionally defining a 
Error:core class, then this is the most likely explanation of what's 
Error:going on. 
Error:However, you might actually be trying to define a class in a core 
Error:namespace, the source of which you may have taken, for example, 
Error:from a non-Android virtual machine project. This will most 
Error:assuredly not work. At a minimum, it jeopardizes the 
Error:compatibility of your app with future versions of the platform. 
Error:It is also often of questionable legality. 
Error:If you really intend to build a core library -- which is only 
Error:appropriate as part of creating a full virtual machine 
Error:distribution, as opposed to compiling an application -- then use 
Error:the "--core-library" option to suppress this error message. 
Error:If you go ahead and use "--core-library" but are in fact 
Error:building an application, then be forewarned that your application 
Error:will still fail to build or run, at some point. Please be 
Error:prepared for angry customers who find, for example, that your 
Error:application ceases to function once they upgrade their operating 
Error:system. You will be to blame for this problem. 
Error:If you are legitimately using some code that happens to be in a 
Error:core package, then the easiest safe alternative you have is to 
Error:repackage that code. That is, move the classes in question into 
Error:your own package namespace. This means that they will never be in 
Error:conflict with core system classes. JarJar is a tool that may help 
Error:you in this endeavor. If you find that you cannot do this, then 
Error:that is an indication that the path you are on will ultimately 
Error:lead to pain, suffering, grief, and lamentation. 
Error:1 error; aborting 
Error:Execution failed for task ':app:transformClassesWithDexForRelease'. 
> com.android.build.api.transform.TransformException: com.android.ide.common.process.ProcessException: java.util.concurrent.ExecutionException: com.android.ide.common.process.ProcessException: Error while executing java process with main class com.android.dx.command.Main with arguments {--dex --num-threads=4 --multi-dex --main-dex-list D:\Android\Projects\Online Food Order\CommonApp\app\build\intermediates\multi-dex\release\maindexlist.txt --output D:\Android\Projects\Online Food Order\CommonApp\app\build\intermediates\transforms\dex\release\0 --min-sdk-version 17 D:\Android\Projects\Online Food Order\CommonApp\app\build\intermediates\transforms\jarMerging\release\0.jar} 
Information:BUILD FAILED in 1m 28s 
Information:34 errors 
Information:0 warnings 

내가 모든 것을 찾기 위해 시도했지만이 문제를 해결할 수있는 솔루션을 얻을 수 없다 안드로이드 스튜디오 나에게 다음과 같은 오류를 제공합니다. 누군가 그것을 극복하도록 도와주세요.

아래는 제 Gradle 파일입니다.

buildscript { 
    repositories { 
     maven { url 'https://maven.fabric.io/public' } 
    } 

    dependencies { 
     classpath 'io.fabric.tools:gradle:1.+' 
    } 
} 
apply plugin: 'com.android.application' 
apply plugin: 'io.fabric' 


repositories { 
    maven { url 'https://maven.fabric.io/public' } 
    maven { url 'https://maven.google.com' } 
} 

android { 

    compileSdkVersion 27 
    buildToolsVersion "26.0.2" 
    useLibrary 'org.apache.http.legacy' 

    defaultConfig { 
     applicationId "<My Project Id>" 
     minSdkVersion 17 
     targetSdkVersion 27 
     versionCode 1 
     versionName "1.0.0" 
     multiDexEnabled true 
     manifestPlaceholders = [onesignal_app_id: "<My Onesignal App Id", 
           // Project number pulled from dashboard, local value is ignored. 
           onesignal_google_project_number: "REMOTE"] 

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

    dexOptions { 
     javaMaxHeapSize "4g" 
    } 

    packagingOptions { 
     exclude 'META-INF/DEPENDENCIES' 
    } 

    lintOptions { 
     checkReleaseBuilds false 
     abortOnError false 
    } 

} 

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:27.0.2' 
    compile 'com.android.support:multidex:1.0.1' 
    compile('com.crashlytics.sdk.android:crashlytics:[email protected]') { 
     transitive = true; 
    } 
    compile 'com.google.android.gms:play-services:11.6.2' 
    compile('com.twitter.sdk.android:twitter:[email protected]') { 
     transitive = true; 
     exclude module: 'gson'; 
    } 
    compile 'com.android.support:design:27.0.2' 
    compile 'com.android.support:support-v13:+' 
    compile 'com.paypal.sdk:paypal-android-sdk:2.13.1' 
    compile 'com.android.support:support-v4:27.0.2' 
    compile 'com.baoyz.swipemenulistview:library:1.3.0' 
    compile 'com.braintreepayments.api:drop-in:3.+' 
    compile 'com.lukekorth:mailable_log:0.1.4' 
    compile 'com.squareup.retrofit2:retrofit:2.1.0' 
    compile 'com.google.code.gson:gson:2.6.2' 
    compile 'com.squareup.retrofit2:converter-gson:2.1.0' 
    compile 'com.squareup.okhttp3:logging-interceptor:3.4.1' 
    compile 'com.squareup.okhttp3:okhttp:3.4.1' 
    compile 'com.google.firebase:firebase-core:11.6.2' 
    compile 'com.google.firebase:firebase-messaging:11.6.2' 
    compile 'com.facebook.android:facebook-login:4.27.0' 
    compile 'com.onesignal:OneSignal:[3.6.2, 3.99.99]' 
    compile 'net.authorize:accept-sdk-android:1.0.2' 
    compile 'com.jakewharton:butterknife:8.5.1' 
} 

configurations.all { 
    resolutionStrategy.eachDependency { DependencyResolveDetails details -> 
     def requested = details.requested 
     if (requested.group == 'com.android.support') { 
      if (!requested.name.startsWith("multidex")) { 
       details.useVersion '26.0.2' 
      } 
     } 
    } 
} 

apply plugin: 'com.google.gms.google-services' 

또한 this을 보았다 그러나 이것은 나에게 솔루션을 해결하는 데 도움이 없습니다.

도움이 될 것입니다. 미리 감사드립니다.

+0

실수로'javax' 패키지에서 클래스를 가져 왔다고 생각합니다. 'javax'에서 가져 오기를 검사하고, 그들이 원하는 패키지이거나 잘못 가져 왔는지 확인하십시오. – Merka

+0

@Merka javax에서 가져 오기를 어떻게 확인할 수 있습니까? 좀 더 설명해 주시겠습니까? –

+0

@PravinsinghWaghela 전체 프로젝트에서'import javax'을'Ctrl + shift + F'로 검색했습니다. @Hangman 링크가 원인 일 수도 있습니다. – Merka

답변

1

나는 동일한 문제에 직면 해있다. 몇 시간 동안 인터넷을 검색 한 결과, Amira Elsayed Ismail이 게시 한 this에 대한 회신으로 해결 방법을 찾았습니다.

해결책

: 내 프로젝트 수준 build.gradle 파일에 이전 버전의 Gradle을 되돌려 한

지금

classpath 'com.android.tools.build:gradle:2.3.3' 

classpath 'com.android.tools.build:gradle:3.0.0' 

을 변경, 그것을 잘 작동합니다.

+0

그게 내 속임수 였지만, 그 이유를 알고 싶습니다. –