小编Coc*_*ico的帖子

ClassNotFoundException:没有找到类"android.os.PersistableBundle"Otto Android 5.0

我有一个奇怪的问题.我有一个应用程序,我部署在Android 4.4设备上并使用Otto库.我在Android 5.0设备上部署了该应用程序.它仍然有效.我重新尝试了4.4,该应用程序将无法启动.

显然,它试图使用API​​ 21类的PersistableBundle.class.在这里我的日志:

    Caused by: java.lang.ClassNotFoundException: Didn't find class "android.os.PersistableBundle" on path: DexPathList[[zip file "/data/app/fr.myapp.apk"],nativeLibraryDirectories=[/data/app-lib/fr.myapp, /vendor/lib, /system/lib]]
            at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:56)
            at java.lang.ClassLoader.loadClass(ClassLoader.java:497)
            at java.lang.ClassLoader.loadClass(ClassLoader.java:457)
            at java.lang.Class.getDeclaredMethods(Native Method)
            at java.lang.Class.getDeclaredMethods(Class.java:656)
            at com.squareup.otto.AnnotatedHandlerFinder.loadAnnotatedMethods(AnnotatedHandlerFinder.java:52)
            at com.squareup.otto.AnnotatedHandlerFinder.findAllProducers(AnnotatedHandlerFinder.java:126)
            at com.squareup.otto.HandlerFinder$1.findAllProducers(HandlerFinder.java:33)
            at com.squareup.otto.Bus.register(Bus.java:191)
Run Code Online (Sandbox Code Playgroud)

android classnotfoundexception otto android-5.0-lollipop

20
推荐指数
1
解决办法
2万
查看次数

这是Android支持设计库中的错误吗?

我刚开始使用谷歌的新Deisgn库:'com.android.support:design:22.2.0'

我使用FloatingActionButton,我在Android 5.0以下和5.0之间有一个小问题.观看截图:

Android 4.4:

Android 4.4

Android 5.0: Android 5.0

正如您所看到的,在Android 4.4上,FAB周围有一个边距.我认为这是为了展示阴影.但它超越了!那么它是一个错误(或忘记谷歌)还是只是正常的行为?

托管他的视图的xml:

<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
tools:context="fr.freemo.freemo.activities.ListFreemoCityActivity">

<include
    android:id="@+id/toolbar"
    layout="@layout/view_toolbar" />


<FrameLayout
    android:id="@+id/container"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:layout_below="@+id/toolbar">

</FrameLayout>


<ProgressBar
    android:id="@+id/progressBar"
    android:layout_width="wrap_content"
    android:layout_height="wrap_content"
    android:layout_centerHorizontal="true"
    android:layout_centerVertical="true" />

<android.support.design.widget.FloatingActionButton
    android:id="@+id/fab_add"
    android:layout_width="wrap_content"
    android:layout_height="wrap_content"
    android:layout_alignParentBottom="true"
    android:layout_alignParentEnd="true"
    android:layout_alignParentRight="true"
    android:layout_marginBottom="@dimen/margin_fab"
    android:layout_marginRight="@dimen/margin_fab"
    android:elevation="@dimen/fab_elevation_lollipop"
    android:src="@drawable/ic_action_new"
    app:backgroundTint="@color/color_app"
    app:fab_type="normal" />


<android.support.design.widget.FloatingActionButton
    android:id="@+id/fab_display"
    android:layout_width="wrap_content"
    android:layout_height="wrap_content"
    android:layout_above="@+id/fab_add"
    android:layout_alignParentEnd="true"
    android:layout_alignParentRight="true"
    android:layout_marginBottom="@dimen/margin_fab"
    android:layout_marginRight="@dimen/margin_fab"
    android:elevation="@dimen/fab_elevation_lollipop"
    android:src="@drawable/ic_map_white"
    android:tint="@color/color_app"
    app:backgroundTint="@color/white"
    app:fab_type="normal" />

<android.support.design.widget.FloatingActionButton
    android:id="@+id/fab_display_list"
    android:layout_width="wrap_content"
    android:layout_height="wrap_content"
    android:layout_above="@+id/fab_display"
    android:layout_alignParentEnd="true"
    android:layout_alignParentRight="true"
    android:layout_marginBottom="@dimen/margin_fab"
    android:layout_marginRight="@dimen/margin_fab"
    android:elevation="@dimen/fab_elevation_lollipop"
    android:src="@drawable/ic_action_list"
    android:tint="@color/color_app"
    android:visibility="invisible"
    app:backgroundTint="@color/white"
    app:fab_type="normal" />

<android.support.design.widget.FloatingActionButton …
Run Code Online (Sandbox Code Playgroud)

android android-support-library floating-action-button

8
推荐指数
1
解决办法
1312
查看次数

keepRunning PhoneGap/Cordova

任何人都可以向我解释keepRunning如何在Android的config.xml中工作.

我的意思是,我不想知道如何编写指令,但它是如何工作的,它如何影响Android应用程序的执行?它是否在后台创建服务?

如果有人能找到我们可以看到它如何工作的来源,那将是伟大的

谢谢.

编辑:我尝试分析生成的代码,分析Android设置中的RAM,服务和进程.而我的结论是.....什么都不做.如果您尝试使用GPS制作跟踪用户的应用,请不要使用Cordova.要正确跟踪用户,您需要使用START_STICKY选项创建服务.所以,它是在本机代码中.你失去了对CrossPlatform的兴趣,因为你必须为所有平台重新编码服务,在我看来,Native Service和Cordova App之间的通信并不容易.

在结论中,如果你使用Cordova,你必须知道你不能使用所有原生的力量,你必须做出选择: - 简单的dev(主观)和crossplaform(真正的跨平台?)和 - 本机开发与它的力量和没有兼容性问题,但您必须为一个平台制作一个应用程序

android android-service cordova

7
推荐指数
1
解决办法
5067
查看次数

SwipeRefreshLayout得到Action_Move冻结视图

我有一个普通的NavigationDrawer与不同的片段:

  • 新闻
  • 其他东西1
  • 其他东西2
  • 设置

问题 :

NewsFragment包含SwipeRefreshLayout.它第一次刷新时效果很好.

我可以将片段更改为其他东西1和2以及设置.所以我回到NewsFragment.

现在,当我刷新时,片段会冻结.

drawerLayout正常工作(打开/关闭,甚至ActionBar标题更改),但主片段保留在NewsFragment,我无法滚动.但scollListner工作(我有日志),但视图不会改变.

没有refreshView(swipeRefreshLayout的顶部),没有滚动,没有响应按钮(在焦点上,onclick)但只是在视觉上.

实际上,它就像一个响应片段在冷冻片段后面.

我在ADBLog中也有这个错误:

SwipeRefreshLayout? Got ACTION_MOVE event but don't have an active pointer id.
Run Code Online (Sandbox Code Playgroud)

任何的想法 ??

如果你问,我可以发布代码.

android android-fragments navigation-drawer drawerlayout swiperefreshlayout

4
推荐指数
1
解决办法
5852
查看次数

读/写结果集与索引=1不匹配

我尝试使用超级账本结构部署自己的网络。我有: - 1 个订购者 - 1 个 CA - 2 个对等点(有数据库)

除了我发布交易时,一切都运行良好。我的服务器 NodeJS 中出现此错误:

error: [Channel.js]: compareProposalResponseResults - read/writes result sets do not match index=1
Run Code Online (Sandbox Code Playgroud)

问题是 TX 已经创建了。

任何想法 ?

您可以问我是否需要更精确的回答我;)

hyperledger hyperledger-fabric

4
推荐指数
1
解决办法
1100
查看次数