An exception of type: java.lang.VerifyError occurred
Message: {java.lang.VerifyError: Verifier rejected class com.tenthdoor.mylogs.DbRepository due to bad method void com.tenthdoor.mylogs.DbRepository.$makeUpdateSqls$b__0(sugar.collections.KeyValue) (declaration of ‘com.tenthdoor.mylogs.DbRepository’ appears in /data/app/com.tenthdoor.mylogs-1/base.apk)}
at AppDb.()
MainActivity.onCreate()
when I run my android app.
Following is the code it is failing on
private func makeUpdateSqls() -> Boolean {
ModifiedItems.ForEach({x in {
self.handleModifiedItem(x.Key, x.Value)
}})
return UpdateSql.Count > 0
}
public func handleModifiedItem(_ item: T, _ itemStatus: ObjectStatus) {
switch itemStatus {
case ObjectStatus.Added: addInsertSql(item)
case ObjectStatus.Modified: addUpdateSql(item)
case ObjectStatus.Removed: addDeleteSql(item)
default: __throw Exception("Invalid ObjectStatus")
}
}
if I remove self.handleModifiedItem(x.Key, x.Value) then I don’t get this error.
Is it possible to get a build where this is fixed? I am kind of stuck as I can’t complete this class and my app relies on the functionality in this class.
02-04 12:52:48.767 12459-12459/? E/AndroidRuntime: FATAL EXCEPTION: main
Process: org.me.sampleandroidappfire, PID: 12459
java.lang.VerifyError: Verifier rejected class org.me.sampleandroidappfire.MainActivity due to bad method void org.me.sampleandroidappfire.MainActivity.onCreate(android.os.Bundle) (declaration of 'org.me.sampleandroidappfire.MainActivity' appears in /data/app/org.me.sampleandroidappfire-2/base.apk)
at java.lang.Class.newInstance(Native Method)
at android.app.Instrumentation.newActivity(Instrumentation.java:1067)
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2317)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2476)
at android.app.ActivityThread.-wrap11(ActivityThread.java)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1344)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:148)
at android.app.ActivityThread.main(ActivityThread.java:5417)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:726)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:616)
02-04 12:52:48.772 607-15463/? W/ActivityManager: Force finishing activity org.me.sampleandroidappfire/.MainActivity
in the latest Fire beta 8.30.90.1925.
This happens in Fire Android app / Silver (the basic template app).
A related issue could be an Alert in Fire that occasionally shows up and that tells the user that
The process failed to start without an error message being provided by the debug engine.
I have a Nexus7 attached to adb:
macbookproloreto:swift-promise-example admin$ /Users/admin/Library/Android/sdk/platform-tools/adb devices
List of devices attached
0a21584f device