광산김가네

[Kotlin] 오류 Archive 본문

TIL(Today I Learn)

[Kotlin] 오류 Archive

MinseoKim 2023. 2. 3. 16:01

(해결중)WhateverString class not found

<!--Error line-->
/LoadedApk: Unable to instantiate appComponentFactory
    java.lang.ClassNotFoundException: Didn't find class "umc.standard.todaygym.whateverString" on path: DexPathList[[zip file "/data/app/~~l46ub-ZQDx5BoQcA0OYSQg==/umc.standard.todaygym-GelljKmsCtv0GkhqiCjW6w==/base.apk"],nativeLibraryDirectories=[/data/app/~~l46ub-ZQDx5BoQcA0OYSQg==/umc.standard.todaygym-GelljKmsCtv0GkhqiCjW6w==/lib/x86, /system/lib, /system_ext/lib]]
        at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:207)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:379)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:312)
        at android.app.LoadedApk.createAppFactory(LoadedApk.java:260)
        at android.app.LoadedApk.createOrUpdateClassLoaderLocked(LoadedApk.java:905)
        at android.app.LoadedApk.getClassLoader(LoadedApk.java:958)
        at android.app.LoadedApk.getResources(LoadedApk.java:1190)
        at android.app.ContextImpl.createAppContext(ContextImpl.java:2663)
        at android.app.ContextImpl.createAppContext(ContextImpl.java:2655)
        at android.app.ActivityThread.handleBindApplication(ActivityThread.java:6595)
        at android.app.ActivityThread.access$1300(ActivityThread.java:237)
        at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1913)
        at android.os.Handler.dispatchMessage(Handler.java:106)
        at android.os.Looper.loop(Looper.java:223)
        at android.app.ActivityThread.main(ActivityThread.java:7656)
        at java.lang.reflect.Method.invoke(Native Method)
        at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:592)
        at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:947)

whateverString class를 못찾는 에러가 발생한다

프로젝트 빌드가 되지않을정도의 치명적 에러는 아닌데 계속 뜨니까 불안해서 고치려고 시도했다

<!-- AndroidManifest.xml-->
<application
        android:name=".util.SharePreferences"
        android:usesCleartextTraffic="true"
        android:allowBackup="true"
        android:appComponentFactory="whateverString"
        android:dataExtractionRules="@xml/data_extraction_rules"
        android:fullBackupContent="@xml/backup_rules"
        android:icon="@mipmap/ic_launcher"
        android:label="@string/app_name"
        android:roundIcon="@mipmap/ic_launcher_round"
        android:supportsRtl="true"
        android:theme="@style/Theme.TodayGym"
        tools:replace="android:appComponentFactory"
        android:requestLegacyExternalStorage="true"
        tools:targetApi="31">

https://stackoverflow.com/questions/56839989/classnotfoundexception-didnt-find-class-com-example-blogapp-whateverstring

 

ClassNotFoundException: Didn't find class "com.example.blogapp.whateverString"

After i migrate androidx it show to me when i click the button why this happend? What i want to do when i click the button open the calendar This is my error when i clickthe button java.lang.

stackoverflow.com

Unresolved reference:enqueue

자꾸 enqueue 함수를 못찾았는데,, 반환형을 Call로 선언해주지않아서 생기는 오류였다

https://stackoverflow.com/questions/51808035/kotlin-android-unresolved-reference-queue

 

Kotlin-android unresolved reference : queue

I imported retrofi2.Callback and I still get this error unresolved reference: enqueue this is the code of the login class import android.content.Intent import android.support.v7.app.

stackoverflow.com

서버 통신은 성공했으나 body값이 null값으로 날라올때 /   java.lang.NullPointerException

통신도 성공하고 body값도 날라오는데.. null pointer 에러가 뜨면서 body값이 없다고 날라왔다

그 이유는 아래에 있다,,

@SerializedName 파라미터값이 곧 받아와지는 response body field 명인데 이를 수정해주지않아서 생겼던 어이없는 실수,..였다

 

HTTP FAILED: java.net.UnknownHostException: Unable to resolve host "dev.onnoff.shop": No address associated with hostname

와이파이 연결확인해보자..

가끔 애뮬레이터가 알수없는이유로 와이파이가 안될때가 있다ㅠㅠ

가급적이면 실기기로  테스트하자..