Я отлаживал это уже несколько часов, но, похоже, ничего не работает, я продолжаю получать это исключение времени выполнения
Caused by: java.lang.ClassNotFoundException: Didn't find class "inc.qucoon.nativeveezah.model.SMSList"
Это класс, на который он ссылается:
package inc.qucoon.nativeveezah.model
import androidx.room.Entity
import androidx.room.PrimaryKey
import java.io.Serializable
@Entity(tableName = "phonesms")
data class SMSList(
val address: String,
val body: String,
val smsdate: String,
val bankcode: String,
val banktransactioncode: String,
val bankname:String,
@PrimaryKey
val id: String,
var isSMS:Boolean = true,
var isSent:Boolean = false,
var accountNumber:String ="",
var transactionType:String="",
var narration:String ="",
var transactionDate:String ="",
var balance:String = "",
var transactionAmount:String = "",
var transactionTime:String =""
):Serializable
Манифест:
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="inc.qucoon.nativeveezah">
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.READ_CONTACTS"/>
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.CAMERA" />
<uses-permission android:name="android.permission.ACCESS_WIFI_STATE" />
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE"/>
<uses-permission android:name="android.permission.READ_SMS" />
<uses-permission android:name="android.permission.RECEIVE_SMS" />
<uses-permission android:name="android.permission.READ_PHONE_STATE" />
<application
android:name=".app.VeezahAppliation"
xmlns:tools="http://schemas.android.com/tools"
android:allowBackup="true"
android:networkSecurityConfig="@xml/network_security_config"
android:icon="@mipmap/ic_launcher"
android:label="@string/app_name"
android:roundIcon="@mipmap/ic_launcher_round"
android:supportsRtl="true"
android:theme="@style/AppTheme">
<receiver
android:name=".broadcastreceiver.SMSBroadcastReceiver"
android:exported="true"
android:enabled="true"
android:permission="android.permission.BROADCAST_SMS" >
<intent-filter android:priority="999" >
<action android:name="android.provider.Telephony.SMS_RECEIVED" />
</intent-filter>
</receiver>
<activity android:name=".activity.MainActivity"
android:screenOrientation="portrait">
<intent-filter>
<action android:name="android.intent.action.SEARCH" />
</intent-filter>
<intent-filter>
<action android:name="android.intent.action.VIEW" />
</intent-filter>
<meta-data
android:name="android.app.searchable"
android:resource="@xml/searchable" />
</activity>
<activity android:name=".activity.ImagePickerActivity" />
<activity android:name=".activity.SplashScreenActivity"
android:theme="@style/EnrolTheme"
android:screenOrientation="portrait"
android:largeHeap="true">
</activity>
<activity android:name=".activity.FirstActivity"
android:theme="@style/SplashScreenTheme"
android:screenOrientation="portrait">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<meta-data
android:name="preloaded_fonts"
android:resource="@array/preloaded_fonts" />
<receiver
android:name=".broadcastreceiver.ConnectivityReceiver"
android:enabled="true">
<intent-filter>
<action android:name="android.net.conn.CONNECTIVITY_CHANGE" />
</intent-filter>
</receiver>
</application>
</manifest>
ReadSMSRepository:
package inc.qucoon.nativeveezah.repository
import android.content.Context
import android.net.Uri
import androidx.work.*
import com.google.gson.Gson
import com.qucoon.smsservices.local.dao.SMSDao
import com.qucoon.smsservices.services.ReadAllSMSFromBankWorker
import com.tinder.scarlet.WebSocket
import inc.qucoon.nativeveezah.model.SMSList
import inc.qucoon.nativeveezah.model.response.Data
import inc.qucoon.nativeveezah.services.RefreshBankListWorker
import inc.qucoon.nativeveezah.socket.GdaxService
import inc.qucoon.nativeveezah.socket.SocketData
import inc.qucoon.nativeveezah.utils.SMSUtils
import inc.qucoon.nativeveezah.utils.closeCursor
import inc.qucoon.nativeveezah.utils.convertToDate
import kotlinx.coroutines.*
import timber.log.Timber
import java.lang.Exception
//This was the initial usage that was working before i added the socket
sms.add(SMSList(address = address, id = id, body = message, smsdate = longDate.convertToDate("yyyy-MM-dd hh:mm"),
bankname = bank.bankname, banktransactioncode = bank.transactioncode, bankcode = bank.bankcode,
accountNumber = SMSUtils.getAccountNumber(message), transactionTime = SMSUtils.getTransactionTime(message),
transactionDate = SMSUtils.getTransactionDate(message), transactionAmount = amountAndBalance.first, balance = amountAndBalance.second,
transactionType = SMSUtils.getTransactionType(message)
))
gdaxService.observeAlerts()
.subscribe({ websocketData ->
val transactioon = websocketData.map { SMSList(id = "a${it.id}",address = it.transactionbankcode,body = it.narration,smsdate = it.date,
bankcode = it.bankcode,banktransactioncode = it.transactionbankcode,balance = it.balance,bankname = it.bankname,
accountNumber = it.custaccountnumber,transactionType = it.drcr,transactionAmount = it.amount,transactionDate = it.date,transactionTime = it.time,narration = it.narration,
isSMS = false
) }
},{e -> Timber.e(e)})
Это работало прямо перед тем, как я добавил Tinder Scarlet Websocket в свой проект.Multidex включен в проекте, я удалил proguard в случае, если это было проблемой, я также попытался сделать недействительными кэши и перезапустить, а также пересобрать проект, также я отключил мгновенный запуск, но ошибка продолжает отображаться.