有誰做過android下的modbus通訊的
我手上的代碼只能在Eclipse中運行,移植到android端就不行了。
$ adb shell am start -n "com.example.myapplication/com.example.myapplication.MainActivity" -a android.intent.action.MAIN -c android.intent.category.LAUNCHER
Connected to process 6898 on device 'xiaomi-mi_one_plus-50805d58'.
Capturing and displaying logcat messages from application. This behavior can be disabled in the "Logcat output" section of the "Debugger" settings page.
E/Trace: error opening trace file: No such file or directory (2)
D/ActivityThread: setTargetHeapUtilization:0.25
setTargetHeapIdealFree:8388608
setTargetHeapConcurrentStart:2097152
W/dalvikvm: VFY: unable to resolve virtual method 410: Landroid/content/Context;.getSystemService (Ljava/lang/Class;)Ljava/lang/Object;
W/dalvikvm: VFY: unable to resolve interface method 2163: Landroid/view/Window$Callback;.onPointerCaptureChanged (Z)V
VFY: unable to resolve interface method 2165: Landroid/view/Window$Callback;.onProvideKeyboardShortcuts (Ljava/util/List;Landroid/view/Menu;I)V
VFY: unable to find class referenced in signature (Landroid/view/SearchEvent;)
VFY: unable to resolve interface method 2167: Landroid/view/Window$Callback;.onSearchRequested (Landroid/view/SearchEvent;)Z
VFY: unable to resolve interface method 2171: Landroid/view/Window$Callback;.onWindowStartingActionMode (Landroid/view/ActionMode$Callback;I)Landroid/view/ActionMode;
VFY: unable to resolve virtual method 610: Landroid/content/res/TypedArray;.getChangingConfigurations ()I
W/dalvikvm: VFY: unable to resolve virtual method 632: Landroid/content/res/TypedArray;.getType (I)I
W/dalvikvm: VFY: unable to resolve virtual method 381: Landroid/content/Context;.createDeviceProtectedStorageContext ()Landroid/content/Context;
VFY: unable to resolve virtual method 388: Landroid/content/Context;.getCodeCacheDir ()Ljava/io/File;
W/dalvikvm: VFY: unable to resolve virtual method 389: Landroid/content/Context;.getColor (I)I
VFY: unable to resolve virtual method 390: Landroid/content/Context;.getColorStateList (I)Landroid/content/res/ColorStateList;
VFY: unable to resolve virtual method 392: Landroid/content/Context;.getDataDir ()Ljava/io/File;
VFY: unable to resolve virtual method 393: Landroid/content/Context;.getDrawable (I)Landroid/graphics/drawable/Drawable;
VFY: unable to resolve virtual method 395: Landroid/content/Context;.getExternalCacheDirs ()[Ljava/io/File;
VFY: unable to resolve virtual method 397: Landroid/content/Context;.getExternalFilesDirs (Ljava/lang/String;)[Ljava/io/File;
VFY: unable to resolve virtual method 401: Landroid/content/Context;.getNoBackupFilesDir ()Ljava/io/File;
VFY: unable to resolve virtual method 403: Landroid/content/Context;.getObbDirs ()[Ljava/io/File;
VFY: unable to resolve virtual method 410: Landroid/content/Context;.getSystemService (Ljava/lang/Class;)Ljava/lang/Object;
VFY: unable to resolve virtual method 412: Landroid/content/Context;.getSystemServiceName (Ljava/lang/Class;)Ljava/lang/String;
VFY: unable to resolve virtual method 415: Landroid/content/Context;.isDeviceProtectedStorage ()Z
VFY: unable to resolve virtual method 430: Landroid/content/Context;.startForegroundService (Landroid/content/Intent;)Landroid/content/ComponentName;
W/dalvikvm: VFY: unable to resolve virtual method 4394: Landroidx/appcompat/view/ContextThemeWrapper;.createConfigurationContext (Landroid/content/res/Configuration;)Landroid/content/Context;
W/dalvikvm: VFY: unable to resolve virtual method 2672: Landroid/widget/FrameLayout;.startActionModeForChild (Landroid/view/View;Landroid/view/ActionMode$Callback;I)Landroid/view/ActionMode;
VFY: unable to find class referenced in signature (Landroid/graphics/Outline;)
VFY: unable to resolve virtual method 935: Landroid/graphics/drawable/Drawable;.getOutline (Landroid/graphics/Outline;)V
VFY: unable to resolve virtual method 935: Landroid/graphics/drawable/Drawable;.getOutline (Landroid/graphics/Outline;)V
VFY: unable to resolve virtual method 1736: Landroid/view/View;.addKeyboardNavigationClusters (Ljava/util/Collection;I)V
W/dalvikvm: Link of class 'Landroidx/core/view/ViewCompat$OnUnhandledKeyEventListenerWrapper;' failed
E/dalvikvm: Could not find class 'androidx.core.view.ViewCompat$OnUnhandledKeyEventListenerWrapper', referenced from method androidx.core.view.ViewCompat.addOnUnhandledKeyEventListener
W/dalvikvm: VFY: unable to resolve new-instance 1397 (Landroidx/core/view/ViewCompat$OnUnhandledKeyEventListenerWrapper;) in Landroidx/core/view/ViewCompat;
VFY: unable to resolve virtual method 1744: Landroid/view/View;.cancelDragAndDrop ()V
E/dalvikvm: Could not find class 'android.view.WindowInsets', referenced from method androidx.core.view.ViewCompat.dispatchApplyWindowInsets
W/dalvikvm: VFY: unable to resolve check-cast 425 (Landroid/view/WindowInsets;) in Landroidx/core/view/ViewCompat;
VFY: unable to resolve virtual method 1752: Landroid/view/View;.dispatchNestedFling (FFZ)Z
VFY: unable to resolve virtual method 1753: Landroid/view/View;.dispatchNestedPreFling (FF)Z
VFY: unable to resolve virtual method 1754: Landroid/view/View;.dispatchNestedPreScroll (II[I[I)Z
W/dalvikvm: VFY: unable to resolve virtual method 1755: Landroid/view/View;.dispatchNestedScroll (IIII[I)Z
VFY: unable to resolve static method 1763: Landroid/view/View;.generateViewId ()I
VFY: unable to resolve virtual method 1764: Landroid/view/View;.getAccessibilityLiveRegion ()I
VFY: unable to resolve virtual method 1770: Landroid/view/View;.getBackgroundTintList ()Landroid/content/res/ColorStateList;
VFY: unable to resolve virtual method 1771: Landroid/view/View;.getBackgroundTintMode ()Landroid/graphics/PorterDuff$Mode;
VFY: unable to resolve virtual method 1774: Landroid/view/View;.getClipBounds ()Landroid/graphics/Rect;
W/dalvikvm: VFY: unable to resolve virtual method 1776: Landroid/view/View;.getDisplay ()Landroid/view/Display;
VFY: unable to resolve virtual method 1779: Landroid/view/View;.getElevation ()F
VFY: unable to resolve virtual method 1786: Landroid/view/View;.getImportantForAutofill ()I
VFY: unable to resolve virtual method 1788: Landroid/view/View;.getLabelFor ()I
VFY: unable to resolve virtual method 1804: Landroid/view/View;.getNextClusterForwardId ()I
VFY: unable to resolve virtual method 1823: Landroid/view/View;.getScrollIndicators ()I
VFY: unable to resolve virtual method 1829: Landroid/view/View;.getTransitionName ()Ljava/lang/String;
W/dalvikvm: VFY: unable to resolve virtual method 1832: Landroid/view/View;.getTranslationZ ()F
VFY: unable to resolve virtual method 1842: Landroid/view/View;.getZ ()F
VFY: unable to resolve virtual method 1843: Landroid/view/View;.hasExplicitFocusable ()Z
VFY: unable to resolve virtual method 1846: Landroid/view/View;.hasNestedScrollingParent ()Z
VFY: unable to resolve virtual method 1852: Landroid/view/View;.isAttachedToWindow ()Z
VFY: unable to resolve virtual method 1855: Landroid/view/View;.isFocusedByDefault ()Z
VFY: unable to resolve virtual method 1857: Landroid/view/View;.isImportantForAutofill ()Z
VFY: unable to resolve virtual method 1859: Landroid/view/View;.isInLayout ()Z
VFY: unable to resolve virtual method 1860: Landroid/view/View;.isKeyboardNavigationCluster ()Z
VFY: unable to resolve virtual method 1861: Landroid/view/View;.isLaidOut ()Z
VFY: unable to resolve virtual method 1862: Landroid/view/View;.isLayoutDirectionResolved ()Z
VFY: unable to resolve virtual method 1865: Landroid/view/View;.isNestedScrollingEnabled ()Z
W/dalvikvm: VFY: unable to resolve virtual method 1871: Landroid/view/View;.keyboardNavigationClusterSearch (Landroid/view/View;I)Landroid/view/View;
E/dalvikvm: Could not find class 'android.view.WindowInsets', referenced from method androidx.core.view.ViewCompat.onApplyWindowInsets
W/dalvikvm: VFY: unable to resolve check-cast 425 (Landroid/view/WindowInsets;) in Landroidx/core/view/ViewCompat;
E/dalvikvm: Could not find class 'android.view.View$OnUnhandledKeyEventListener', referenced from method androidx.core.view.ViewCompat.removeOnUnhandledKeyEventListener
W/dalvikvm: VFY: unable to resolve check-cast 407 (Landroid/view/View$OnUnhandledKeyEventListener;) in Landroidx/core/view/ViewCompat;
VFY: unable to resolve virtual method 1897: Landroid/view/View;.requestApplyInsets ()V
VFY: unable to resolve virtual method 1903: Landroid/view/View;.requireViewById (I)Landroid/view/View;
VFY: unable to resolve virtual method 1905: Landroid/view/View;.restoreDefaultFocus ()Z
W/dalvikvm: VFY: unable to resolve virtual method 1910: Landroid/view/View;.setAccessibilityLiveRegion (I)V
VFY: unable to resolve virtual method 1913: Landroid/view/View;.setAutofillHints ([Ljava/lang/String;)V
VFY: unable to resolve virtual method 1917: Landroid/view/View;.setBackgroundTintList (Landroid/content/res/ColorStateList;)V
VFY: unable to resolve virtual method 1918: Landroid/view/View;.setBackgroundTintMode (Landroid/graphics/PorterDuff$Mode;)V
VFY: unable to resolve virtual method 1919: Landroid/view/View;.setClipBounds (Landroid/graphics/Rect;)V
VFY: unable to resolve virtual method 1920: Landroid/view/View;.setElevation (F)V
VFY: unable to resolve virtual method 1923: Landroid/view/View;.setFocusedByDefault (Z)V
VFY: unable to resolve virtual method 1927: Landroid/view/View;.setImportantForAutofill (I)V
VFY: unable to resolve virtual method 1928: Landroid/view/View;.setKeyboardNavigationCluster (Z)V
VFY: unable to resolve virtual method 1929: Landroid/view/View;.setLabelFor (I)V
VFY: unable to resolve virtual method 1930: Landroid/view/View;.setLayerPaint (Landroid/graphics/Paint;)V
W/dalvikvm: VFY: unable to resolve virtual method 1937: Landroid/view/View;.setNestedScrollingEnabled (Z)V
VFY: unable to resolve virtual me
uj5u.com熱心網友回復:
如果要在android studio運行,打開android studio后,file>import project的方法引入uj5u.com熱心網友回復:
有直接用socket通訊做modbus的嗎?轉載請註明出處,本文鏈接:https://www.uj5u.com/yidong/67341.html
標籤:Android
上一篇:獲取權限沒有相機的選項
下一篇:安卓開發時,如何保存用戶進度呢?
