이것은 ( 안드로이드 를 업데이트 하기 위해 ) 실행 후입니다 .
cordova plugin save
cordova platform remove android
cordova platform add android
이것은 내가 얻는 오류이며 버전 값이 제대로 병합되지 않는다고 생각합니다.
* What went wrong:
Execution failed for task ':app:processDebugManifest'.
> Manifest merger failed : Attribute application@appComponentFactory value=(android.support.v4.app.CoreComponentFactory) from [com.android.support:support-compat:28.0.0] AndroidManifest.xml:22:18-91
is also present at [androidx.core:core:1.0.0] AndroidManifest.xml:22:18-86 value=(androidx.core.app.CoreComponentFactory).
Suggestion: add 'tools:replace="android:appComponentFactory"' to <application> element at AndroidManifest.xml:5:5-35:19 to override.
나는이 문제를 겪고 며칠 동안 파고 들었습니다.
보자, 관련성이 있다고 생각하는 것만 공유하지만 더 많은 정보가 필요하면 알려주세요.
config.xml
<platform name="android">
<allow-intent href="market:*" />
<preference name="android-minSdkVersion" value="19" />
<preference name="android-targetSdkVersion" value="28" />
...
</platform>
<plugin name="cordova-android-support-gradle-release" spec="^3.0.1">
<variable name="ANDROID_SUPPORT_VERSION" value="28.+" />
</plugin>
AndroidManifest.xml
<uses-sdk android:minSdkVersion="19" android:targetSdkVersion="28"/>
그리고 내 build.gradle 에서 이것을 시도했습니다 (QO를 위해 해결하는 것으로 보이는 관련 질문에 대한 답변에서 찾았습니다).
configurations.all {
resolutionStrategy.eachDependency { DependencyResolveDetails details ->
def requested = details.requested
if (requested.group == 'com.android.support') {
if (!requested.name.startsWith("multidex")) {
details.useVersion '28.0.0'
}
}
}
}
나는이 모든 변경하는 경우 건은 28
대한의를 27
한 후 cordova build android
여전히 28을 말할 것이다 :
cordova-android-support-gradle-release: Wrote custom version '28.+' to /Users/myuser/Proyectos/localhost/cordova/my-app/platforms/android/app/build.gradle
cordova-android-support-gradle-release: Wrote custom version '28.+' to /Users/myuser/Proyectos/localhost/cordova/my-app/platforms/android/cordova-android-support-gradle-release/my-cordova-android-support-gradle
그래서 다음에 무엇을 해야할지 모르겠어요 .. 어떤 생각?
다음은 전체 응답입니다.
cordova build android
cordova-android-support-gradle-release: Android platform: V7+
cordova-android-support-gradle-release: Wrote custom version '28.+' to /Users/toniweb/Proyectos/localhost/cordova/my-app/platforms/android/app/build.gradle
cordova-android-support-gradle-release: Wrote custom version '28.+' to /Users/toniweb/Proyectos/localhost/cordova/my-app/platforms/android/cordova-android-support-gradle-release/my-cordova-android-support-gradle-release.gradle
Running command: /Users/toniweb/Proyectos/localhost/cordova/my-app/hooks/after_prepare/030_remove-permissions.js /Users/toniweb/Proyectos/localhost/cordova/my-app
cordova-android-support-gradle-release: Android platform: V7+
cordova-android-support-gradle-release: Wrote custom version '28.+' to /Users/toniweb/Proyectos/localhost/cordova/my-app/platforms/android/app/build.gradle
cordova-android-support-gradle-release: Wrote custom version '28.+' to /Users/toniweb/Proyectos/localhost/cordova/my-app/platforms/android/cordova-android-support-gradle-release/my-cordova-android-support-gradle-release.gradle
Checking Java JDK and Android SDK versions
ANDROID_SDK_ROOT=undefined (recommended setting)
ANDROID_HOME=/Users/toniweb/Library/Android/sdk (DEPRECATED)
Subproject Path: CordovaLib
Subproject Path: app
> Configure project :app
+-----------------------------------------------------------------
| cordova-android-support-gradle-release: 28.+
+-----------------------------------------------------------------
> Task :app:preBuild UP-TO-DATE
> Task :CordovaLib:preBuild UP-TO-DATE
> Task :CordovaLib:preDebugBuild UP-TO-DATE
> Task :CordovaLib:checkDebugManifest UP-TO-DATE
> Task :CordovaLib:processDebugManifest UP-TO-DATE
> Task :app:preDebugBuild UP-TO-DATE
> Task :CordovaLib:compileDebugAidl NO-SOURCE
> Task :app:compileDebugAidl NO-SOURCE
> Task :CordovaLib:packageDebugRenderscript NO-SOURCE
> Task :app:compileDebugRenderscript UP-TO-DATE
> Task :app:checkDebugManifest UP-TO-DATE
> Task :app:generateDebugBuildConfig UP-TO-DATE
> Task :app:prepareLintJar UP-TO-DATE
> Task :app:generateDebugSources UP-TO-DATE
> Task :CordovaLib:compileDebugRenderscript UP-TO-DATE
> Task :CordovaLib:generateDebugBuildConfig UP-TO-DATE
> Task :CordovaLib:generateDebugResValues UP-TO-DATE
> Task :CordovaLib:generateDebugResources UP-TO-DATE
> Task :CordovaLib:packageDebugResources UP-TO-DATE
> Task :CordovaLib:generateDebugRFile UP-TO-DATE
> Task :CordovaLib:prepareLintJar UP-TO-DATE
> Task :CordovaLib:generateDebugSources UP-TO-DATE
> Task :CordovaLib:javaPreCompileDebug UP-TO-DATE
> Task :CordovaLib:compileDebugJavaWithJavac UP-TO-DATE
> Task :CordovaLib:processDebugJavaRes NO-SOURCE
> Task :CordovaLib:transformClassesAndResourcesWithPrepareIntermediateJarsForDebug UP-TO-DATE
> Task :app:javaPreCompileDebug UP-TO-DATE
> Task :app:mainApkListPersistenceDebug UP-TO-DATE
> Task :app:generateDebugResValues UP-TO-DATE
> Task :app:generateDebugResources UP-TO-DATE
> Task :app:mergeDebugResources UP-TO-DATE
> Task :app:createDebugCompatibleScreenManifests UP-TO-DATE
> Task :app:processDebugManifest FAILED
/Users/toniweb/Proyectos/localhost/cordova/my-app/platforms/android/app/src/main/AndroidManifest.xml:22:18-91 Error:
Attribute application@appComponentFactory value=(android.support.v4.app.CoreComponentFactory) from [com.android.support:support-compat:28.0.0] AndroidManifest.xml:22:18-91
See http://g.co/androidstudio/manifest-merger for more information about the manifest merger.
is also present at [androidx.core:core:1.0.0] AndroidManifest.xml:22:18-86 value=(androidx.core.app.CoreComponentFactory).
Suggestion: add 'tools:replace="android:appComponentFactory"' to <application> element at AndroidManifest.xml:5:5-35:19 to override.
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':app:processDebugManifest'.
> Manifest merger failed : Attribute application@appComponentFactory value=(android.support.v4.app.CoreComponentFactory) from [com.android.support:support-compat:28.0.0] AndroidManifest.xml:22:18-91
is also present at [androidx.core:core:1.0.0] AndroidManifest.xml:22:18-86 value=(androidx.core.app.CoreComponentFactory).
Suggestion: add 'tools:replace="android:appComponentFactory"' to <application> element at AndroidManifest.xml:5:5-35:19 to override.
* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.
* Get more help at https://help.gradle.org
BUILD FAILED in 1s
22 actionable tasks: 1 executed, 21 up-to-date
/Users/toniweb/Proyectos/localhost/cordova/my-app/platforms/android/gradlew: Command failed with exit code 1 Error output:
/Users/toniweb/Proyectos/localhost/cordova/my-app/platforms/android/app/src/main/AndroidManifest.xml:22:18-91 Error:
Attribute application@appComponentFactory value=(android.support.v4.app.CoreComponentFactory) from [com.android.support:support-compat:28.0.0] AndroidManifest.xml:22:18-91
is also present at [androidx.core:core:1.0.0] AndroidManifest.xml:22:18-86 value=(androidx.core.app.CoreComponentFactory).
Suggestion: add 'tools:replace="android:appComponentFactory"' to <application> element at AndroidManifest.xml:5:5-35:19 to override.
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':app:processDebugManifest'.
> Manifest merger failed : Attribute application@appComponentFactory value=(android.support.v4.app.CoreComponentFactory) from [com.android.support:support-compat:28.0.0] AndroidManifest.xml:22:18-91
is also present at [androidx.core:core:1.0.0] AndroidManifest.xml:22:18-86 value=(androidx.core.app.CoreComponentFactory).
Suggestion: add 'tools:replace="android:appComponentFactory"' to <application> element at AndroidManifest.xml:5:5-35:19 to override.
* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.
* Get more help at https://help.gradle.org
BUILD FAILED in 1s
플러그인 중 하나가 일반 Android 지원 종속성과 호환되지 않는 Android X 종속성을 사용하고 있습니다.
어떤 플러그인인지 검색하여 제거하거나 Android X 종속성을 사용하지 않은 이전 버전을 사용해야합니다.
또는 프로젝트에서 Android X를 활성화하는 Cordova Android X 플러그인을 사용하고 Android X에 해당하는 플러그인 종속성 및 코드 사용을 패치합니다.
cordova-plugin-androidx
Android X를 활성화 하려면 설치
cordova plugin add cordova-plugin-androidx
그런 다음 cordova-plugin-androidx-adapter
기존 플러그인을 패치하기 위해 설치하십시오.
cordova plugin add cordova-plugin-androidx-adapter
그리고 cordova-android-support-gradle-release
Android X 변경 사항과 충돌하므로 지원 버전을 28로 강제하려는 모든 gradle 코드를 제거하십시오 .
이 기사는 인터넷에서 수집됩니다. 재 인쇄 할 때 출처를 알려주십시오.
침해가 발생한 경우 연락 주시기 바랍니다[email protected] 삭제
몇 마디 만하겠습니다