是什么导致java.lang.VerifyError: Verifier rejected class?



在使用Moshi转换器时,多添加几个,会导致以下错误。不确定它在哪里或为什么说

拒绝调用,预期81个参数寄存器,方法签名有82个或以上

我没有在任何地方限制它。谁能帮我去掉这个错误?

2019-09-20 15:50:22.701 26917-5331/com.nnapps。E/AndroidRuntime: FATAL EXCEPTION: DefaultDispatcher-worker-1过程:com.nnapps。货币转换器,PID: 26917com.nnapps.currencyconverter.data.models.RatesJsonAdapter: com.nnapps.currencyconverter.data.models.Rates com.nnapps.currencyconverter.data.models.RatesJsonAdapter. fromjson (com.squareup.moshi.JsonReader)验证失败[0x2FE3]拒绝调用,预期有81个参数寄存器,方法签名有82个或更多(声明'com.nnapps.currencyconverter.data.models.)。RatesJsonAdapter'出现在/data/app/~~z4ivoR2x0ywjtOjcAdAGhA==/com.nnapps.currencyconverter-fq07cpkD73GiucXGVon54Q==/base.apk!classes10.dex). lang . class。classForName(本地方法)java.lang.Class.forName (Class.java: 454)com.squareup.moshi.internal.Util.generatedAdapter (Util.java: 553)com.squareup.moshi.StandardJsonAdapters创造1.美元(StandardJsonAdapters.java: 61)com.squareup.moshi.Moshi.adapter (Moshi.java: 145)在com.nnapps.currencyconverter.data.models.CurrencyResponseJsonAdapter。(CurrencyResponseJsonAdapter.kt: 31)在java.lang.reflect.Constructor。newInstance0(本地方法)java.lang.reflect.Constructor.newInstance (Constructor.java: 343)com.squareup.moshi.internal.Util.generatedAdapter (Util.java: 577)com.squareup.moshi.StandardJsonAdapters创造1.美元(StandardJsonAdapters.java: 61)com.squareup.moshi.Moshi.adapter (Moshi.java: 145)com.squareup.moshi.Moshi.adapter (Moshi.java: 105)retrofit2.converter.moshi.MoshiConverterFactory.responseBodyConverter (MoshiConverterFactory.java: 89)retrofit2.Retrofit.nextResponseBodyConverter (Retrofit.java: 362)retrofit2.Retrofit.responseBodyConverter (Retrofit.java: 345)retrofit2.HttpServiceMethod.createResponseConverter (HttpServiceMethod.java: 124)retrofit2.HttpServiceMethod.parseAnnotations (HttpServiceMethod.java: 85)retrofit2.ServiceMethod.parseAnnotations (ServiceMethod.java: 39)retrofit2.Retrofit.loadServiceMethod (Retrofit.java: 202)在调用retrofit2.Retrofit 1.美元(Retrofit.java: 160)java.lang.reflect.Proxy.invoke (Proxy.java: 1006)Proxy2美元。getrate(未知来源)在com.nnapps.currencyconverter.main.DefaultMainRepository.getRates (DefaultMainRepository.kt: 16)在com.nnapps.currencyconverter.main.DefaultMainUseCase.getRates (DefaultMainUseCase.kt: 11)在com.nnapps.currencyconverter.main.MainViewModel转换1.美元invokesuspend (MainViewModel.kt: 50)kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith (ContinuationImpl.kt: 33)kotlinx.coroutines.DispatchedTask.run (DispatchedTask.kt: 106)kotlinx.coroutines.scheduling.CoroutineScheduler.runSafely (CoroutineScheduler.kt: 571)kotlinx.coroutines.scheduling.CoroutineScheduler Worker.executeTask美元(CoroutineScheduler.kt: 750)kotlinx.coroutines.scheduling.CoroutineScheduler Worker.runWorker美元(CoroutineScheduler.kt: 678)kotlinx.coroutines.scheduling.CoroutineScheduler Worker.run美元(CoroutineScheduler.kt: 665)

import com.squareup.moshi.Json
import com.squareup.moshi.JsonClass
@JsonClass(generateAdapter = true)
data class Rates(
@Json(name = "AED")
val aED: Double,
@Json(name = "AFN")
val aFN: Double,
@Json(name = "ALL")
val aLL: Double,
@Json(name = "AMD")
val aMD: Double,
@Json(name = "ANG")
val aNG: Double,
@Json(name = "AOA")
val aOA: Double,
@Json(name = "ARS")
val aRS: Double,
@Json(name = "AUD")
val aUD: Double,
@Json(name = "AWG")
val aWG: Double,
@Json(name = "AZN")
val aZN: Double,
@Json(name = "BAM")
val bAM: Double,
@Json(name = "BBD")
val bBD: Double,
@Json(name = "BDT")
val bDT: Double,
@Json(name = "BGN")
val bGN: Double,
@Json(name = "BHD")
val bHD: Double,
@Json(name = "BIF")
val bIF: Double,
@Json(name = "BMD")
val bMD: Double,
@Json(name = "BND")
val bND: Double,
@Json(name = "BOB")
val bOB: Double,
@Json(name = "BRL")
val bRL: Double,
@Json(name = "BSD")
val bSD: Double,
@Json(name = "BTC")
val bTC: Double,
@Json(name = "BTN")
val bTN: Double,
@Json(name = "BWP")
val bWP: Double,
@Json(name = "BYN")
val bYN: Double,
@Json(name = "BYR")
val bYR: Double,
@Json(name = "BZD")
val bZD: Double,
@Json(name = "CAD")
val cAD: Double,
@Json(name = "CDF")
val cDF: Double,
@Json(name = "CHF")
val cHF: Double,
@Json(name = "CLF")
val cLF: Double,
@Json(name = "CLP")
val cLP: Double,
@Json(name = "CNY")
val cNY: Double,
@Json(name = "COP")
val cOP: Double,
@Json(name = "CRC")
val cRC: Double,
@Json(name = "CUC")
val cUC: Double,
@Json(name = "CUP")
val cUP: Double,
@Json(name = "CVE")
val cVE: Double,
@Json(name = "CZK")
val cZK: Double,
@Json(name = "DJF")
val dJF: Double,
@Json(name = "DKK")
val dKK: Double,
@Json(name = "DOP")
val dOP: Double,
@Json(name = "DZD")
val dZD: Double,
@Json(name = "EGP")
val eGP: Double,
@Json(name = "ERN")
val eRN: Double,
@Json(name = "ETB")
val eTB: Double,
@Json(name = "EUR")
val eUR: Double,
@Json(name = "FJD")
val fJD: Double,
@Json(name = "FKP")
val fKP: Double,
@Json(name = "GBP")
val gBP: Double,
@Json(name = "GEL")
val gEL: Double,
@Json(name = "GGP")
val gGP: Double,
@Json(name = "GHS")
val gHS: Double,
@Json(name = "GIP")
val gIP: Double,
@Json(name = "GMD")
val gMD: Double,
@Json(name = "GNF")
val gNF: Double,
@Json(name = "GTQ")
val gTQ: Double,
@Json(name = "GYD")
val gYD: Double,
@Json(name = "HKD")
val hKD: Double,
@Json(name = "HNL")
val hNL: Double,
@Json(name = "HRK")
val hRK: Double,
@Json(name = "HTG")
val hTG: Double,
@Json(name = "HUF")
val hUF: Double,
@Json(name = "IDR")
val iDR: Double,
@Json(name = "ILS")
val iLS: Double,
@Json(name = "IMP")
val iMP: Double,
@Json(name = "INR")
val iNR: Double,
@Json(name = "IQD")
val iQD: Double,
@Json(name = "IRR")
val iRR: Double,
@Json(name = "ISK")
val iSK: Double,
@Json(name = "JEP")
val jEP: Double,
@Json(name = "JMD")
val jMD: Double,
@Json(name = "JOD")
val jOD: Double,
@Json(name = "JPY")
val jPY: Double,
@Json(name = "KES")
val kES: Double,
@Json(name = "KGS")
val kGS: Double,
@Json(name = "KHR")
val kHR: Double,
@Json(name = "KMF")
val kMF: Double,
@Json(name = "KPW")
val kPW: Double,
@Json(name = "KRW")
val kRW: Double,
@Json(name = "KWD")
val kWD: Double,
@Json(name = "KYD")
val kYD: Double,
@Json(name = "KZT")
val kZT: Double,
@Json(name = "LAK")
val lAK: Double,
@Json(name = "LBP")
val lBP: Double,
@Json(name = "LKR")
val lKR: Double,
@Json(name = "LRD")
val lRD: Double,
@Json(name = "LSL")
val lSL: Double,
@Json(name = "LTL")
val lTL: Double,
@Json(name = "LVL")
val lVL: Double,
@Json(name = "LYD")
val lYD: Double,
@Json(name = "MAD")
val mAD: Double,
@Json(name = "MDL")
val mDL: Double,
@Json(name = "MGA")
val mGA: Double,
@Json(name = "MKD")
val mKD: Double,
@Json(name = "MMK")
val mMK: Double,
@Json(name = "MNT")
val mNT: Double,
@Json(name = "MOP")
val mOP: Double,
@Json(name = "MRO")
val mRO: Double,
@Json(name = "MUR")
val mUR: Double,
@Json(name = "MVR")
val mVR: Double,
@Json(name = "MWK")
val mWK: Double,
@Json(name = "MXN")
val mXN: Double,
@Json(name = "MYR")
val mYR: Double,
@Json(name = "MZN")
val mZN: Double,
@Json(name = "NAD")
val nAD: Double,
@Json(name = "NGN")
val nGN: Double,
@Json(name = "NIO")
val nIO: Double,
@Json(name = "NOK")
val nOK: Double,
@Json(name = "NPR")
val nPR: Double,
@Json(name = "NZD")
val nZD: Double,
@Json(name = "OMR")
val oMR: Double,
@Json(name = "PAB")
val pAB: Double,
@Json(name = "PEN")
val pEN: Double,
@Json(name = "PGK")
val pGK: Double,
@Json(name = "PHP")
val pHP: Double,
@Json(name = "PKR")
val pKR: Double,
@Json(name = "PLN")
val pLN: Double,
@Json(name = "PYG")
val pYG: Double,
@Json(name = "QAR")
val qAR: Double,
@Json(name = "RON")
val rON: Double,
@Json(name = "RSD")
val rSD: Double,
@Json(name = "RUB")
val rUB: Double,
@Json(name = "RWF")
val rWF: Double,
@Json(name = "SAR")
val sAR: Double,
@Json(name = "SBD")
val sBD: Double,
@Json(name = "SCR")
val sCR: Double,
@Json(name = "SDG")
val sDG: Double,
@Json(name = "SEK")
val sEK: Double,
@Json(name = "SGD")
val sGD: Double,
@Json(name = "SHP")
val sHP: Double,
@Json(name = "SLL")
val sLL: Double,
@Json(name = "SOS")
val sOS: Double,
@Json(name = "SRD")
val sRD: Double,
@Json(name = "STD")
val sTD: Double,
@Json(name = "SVC")
val sVC: Double,
@Json(name = "SYP")
val sYP: Double,
@Json(name = "SZL")
val sZL: Double,
@Json(name = "THB")
val tHB: Double,
@Json(name = "TJS")
val tJS: Double,
@Json(name = "TMT")
val tMT: Double,
@Json(name = "TND")
val tND: Double,
@Json(name = "TOP")
val tOP: Double,
@Json(name = "TRY")
val tRY: Double,
@Json(name = "TTD")
val tTD: Double,
@Json(name = "TWD")
val tWD: Double,
@Json(name = "TZS")
val tZS: Double,
@Json(name = "UAH")
val uAH: Double,
@Json(name = "UGX")
val uGX: Double,
@Json(name = "USD")
val uSD: Double,
@Json(name = "UYU")
val uYU: Double,
@Json(name = "UZS")
val uZS: Double,
@Json(name = "VEF")
val vEF: Double,
@Json(name = "VND")
val vND: Double,
@Json(name = "VUV")
val vUV: Double,
@Json(name = "WST")
val wST: Double,
@Json(name = "XAF")
val xAF: Double,
@Json(name = "XAG")
val xAG: Double,
@Json(name = "XAU")
val xAU: Double,
@Json(name = "XCD")
val xCD: Double,
@Json(name = "XDR")
val xDR: Double,
@Json(name = "XOF")
val xOF: Double,
@Json(name = "XPF")
val xPF: Double,
@Json(name = "YER")
val yER: Double,
@Json(name = "ZAR")
val zAR: Double,
@Json(name = "ZMK")
val zMK: Double,
@Json(name = "ZMW")
val zMW: Double,
@Json(name = "ZWL")
val zWL: Double,
)

我遇到了这个问题,在跟踪它之后,我发现我更新了Gradle文件中的一些依赖项;导致了这次空难。转到Gradle文件,看看你在那里做了什么更改,然后回滚或搜索更改的内容。

相关内容

  • 没有找到相关文章

最新更新