尝试通过Refractor>迁移到androidx;迁移到AndroidX后,我已经尝试了很多次(使缓存无效并重新启动,清理,重建),但是每次完成一些处理和加载并出现以下错误日志时:
java.lang.IllegalArgumentException: Argument for @NotNull parameter 'element' of org/jetbrains/androID/refactoring/MigratetoAppCompatUsageInfo$GradleUsageInfo.<init> must not be null at org.jetbrains.androID.refactoring.MigratetoAppCompatUsageInfo$GradleUsageInfo.$$$reportNull$$// top-level build file where you can add configuration options common to all sub-projects/modules.buildscript { ext.kotlin_version = '1.3.11' repositorIEs { Google() jcenter() maven { url 'https://maven.fabric.io/public' } } dependencIEs { classpath 'com.androID.tools.build:gradle:3.3.0' classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version" classpath 'com.Google.gms:Google-services:4.2.0' classpath 'io.fabric.tools:gradle:1.27.0' // NOTE: Do not place your application dependencIEs here; they belong // in the indivIDual module build.gradle files }}allprojects { repositorIEs { Google() jcenter() maven { url 'https://maven.Google.com/' } }}task clean(type: Delete) { delete rootProject.buildDir}
(MigratetoAppCompatUsageInfo.java) at org.jetbrains.androID.refactoring.MigratetoAppCompatUsageInfo$GradleUsageInfo.<init>(MigratetoAppCompatUsageInfo.java) at org.jetbrains.androID.refactoring.MigratetoAppCompatUsageInfo$AddGoogleRepositoryUsageInfo.<init>(MigratetoAppCompatUsageInfo.java:714) at org.jetbrains.androID.refactoring.MigratetoAndroIDxProcessor$findUsagesInBuildfiles.invoke(MigratetoAndroIDxProcessor.kt:456) at org.jetbrains.androID.refactoring.MigratetoAndroIDxProcessor.findUsagesInBuildfiles(MigratetoAndroIDxProcessor.kt:463) at org.jetbrains.androID.refactoring.MigratetoAndroIDxProcessor.findUsages(MigratetoAndroIDxProcessor.kt:220) at com.intellij.openAPI.application.impl.ApplicationImpl.runReadAction(ApplicationImpl.java:959) at com.intellij.openAPI.application.ReadAction.compute(ReadAction.java:57) at com.intellij.refactoring.BaseRefactoringProcessor.lambda$doRunapply plugin: 'com.androID.application'apply plugin: 'io.fabric'apply plugin: 'kotlin-androID'apply plugin: 'kotlin-kapt'apply plugin: 'kotlin-android-extensions'androID { compileSdkVersion 28 defaultConfig { applicationID "com.cinopsys.movIEshows" minSdkVersion 21 targetSdkVersion 28 versionCode 1 versionname "1.0" testInstrumentationRunner "androID.support.test.runner.AndroIDJUnitRunner" } buildTypes { release { MinifyEnabled false useProguard false proguardfiles getDefaultProguardfile('proguard-androID.txt'),'proguard-rules.pro' } }}dependencIEs { def support_version = "28.0.0" def room_version = "1.1.1" def lifecycle_version = "1.1.1" def retrofitVersion = "2.4.0" def okhttpLoggingInterceptorVersion = "3.9.1" def paging_version = "1.0.1" def coroutines_version = "1.1.0" def firebase_version = "16.0.6" def crashlytics_version = "2.9.8" def fcm_version = "17.3.4" def glIDe_version = "4.8.0" def versions_work = "1.0.0-beta03" implementation filetree(dir: 'libs',include: ['*.jar']) implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version" implementation "com.androID.support:appcompat-v7:$support_version" implementation "com.androID.support:support-v4:$support_version" implementation "com.androID.support:support-media-compat:$support_version" implementation "com.androID.support:design:$support_version" implementation "com.androID.support:cardvIEw-v7:$support_version" implementation "com.androID.support:recyclervIEw-v7:$support_version" implementation "com.androID.support:preference-v7:$support_version" implementation "com.androID.support:preference-v14:$support_version" implementation "com.github.bumptech.glIDe:glIDe:$glIDe_version" implementation "com.Google.firebase:firebase-messaging:$fcm_version" implementation 'com.androID.support:support-v4:28.0.0' kapt "com.github.bumptech.glIDe:compiler:$glIDe_version" //Expandable TextVIEw implementation 'com.ms-square:expandableTextVIEw:0.1.4' //Work Manager implementation "androID.arch.work:work-runtime:$versions_work" //Paging implementation "androID.arch.paging:runtime:$paging_version" //Room implementation "androID.arch.persistence.room:runtime:$room_version" kapt "androID.arch.persistence.room:compiler:$room_version" //viewmodel and liveData implementation "androID.arch.lifecycle:extensions:$lifecycle_version" kapt "androID.arch.lifecycle:compiler:$lifecycle_version" //firebase implementation "com.Google.firebase:firebase-core:$firebase_version" implementation "com.crashlytics.sdk.androID:crashlytics:$crashlytics_version" // retrofit implementation "com.squareup.retrofit2:retrofit:$retrofitVersion" implementation "com.squareup.retrofit2:converter-gson:$retrofitVersion" implementation "com.squareup.retrofit2:retrofit-mock:$retrofitVersion" implementation "com.squareup.okhttp3:logging-interceptor:$okhttpLoggingInterceptorVersion" //kotlin coroutines implementation "org.jetbrains.kotlinx:kotlinx-coroutines-core:$coroutines_version" implementation "org.jetbrains.kotlinx:kotlinx-coroutines-androID:$coroutines_version" implementation 'com.androID.support.constraint:constraint-layout:1.1.3' testImplementation 'junit:junit:4.12' androIDTestImplementation 'com.androID.support.test:runner:1.0.2' androIDTestImplementation 'com.androID.support.test.espresso:espresso-core:3.0.2' implementation "org.jetbrains.kotlin:kotlin-reflect:$kotlin_version"}apply plugin: 'com.Google.gms.Google-services'
(BaseRefactoringProcessor.java:189) at com.intellij.openAPI.progress.impl.CoreProgressManager.run(CoreProgressManager.java:247) at com.intellij.openAPI.progress.impl.CoreProgressManager$TaskRunnable.run(CoreProgressManager.java:736) at com.intellij.openAPI.progress.impl.CoreProgressManager.run(CoreProgressManager.java:434) at com.intellij.openAPI.progress.impl.CoreProgressManager.lambda$runProcess(CoreProgressManager.java:157) at com.intellij.openAPI.progress.impl.CoreProgressManager.registerIndicatorAndRun(CoreProgressManager.java:580) at com.intellij.openAPI.progress.impl.CoreProgressManager.executeProcessUnderProgress(CoreProgressManager.java:525) at com.intellij.openAPI.progress.impl.ProgressManagerImpl.executeProcessUnderProgress(ProgressManagerImpl.java:85) at com.intellij.openAPI.progress.impl.CoreProgressManager.runProcess(CoreProgressManager.java:144) at com.intellij.openAPI.application.impl.ApplicationImpl.lambda$null(ApplicationImpl.java:574) at com.intellij.openAPI.application.impl.ApplicationImpl.run(ApplicationImpl.java:314) at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) at java.util.concurrent.FutureTask.run(FutureTask.java:266) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) at java.lang.Thread.run(Thread.java:745)
这些是我的项目级别gradle文件:
这些是我的应用程序级别gradle文件:
最佳答案这是一个已知问题,记录在这里:https://issuetracker.google.com/issues/123303598一种替代方法是使用和修改此脚本并手动进行转换:https://gist.github.com/dlew/5db1b780896bbc6f542e7c00a11db6a0 总结
以上是内存溢出为你收集整理的无法迁移到androidX 全部内容,希望文章能够帮你解决无法迁移到androidX 所遇到的程序开发问题。
如果觉得内存溢出网站内容还不错,欢迎将内存溢出网站推荐给程序员好友。
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)