Articles of 运行时错误

如何导入eclipse中使用库的android studio项目?

当我们在eclipse中导入android studio项目时,它显示如下错误。 Android工作室项目包含项目和库,当我们导入所有的编译时间错误被解决,但是当我们从Eclipse运行项目它显示错误。 项目链接=“ https://github.com/glomadrian/material-code-input ”而波纹pipe是我的XML布局文件。 <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:app="http://schemas.android.com/apk/res-auto" android:layout_width="match_parent" android:layout_height="match_parent" android:orientation="vertical" android:padding="10dp" android:background="#FFF" > <com.github.glomadrian.codeinputlib.CodeInput android:layout_marginTop="20dp" android:layout_width="wrap_content" android:layout_height="wrap_content" app:hint_text="Pairing code" android:id="@+id/pairing" /> <com.github.glomadrian.codeinputlib.CodeInput android:layout_marginTop="20dp" android:layout_width="wrap_content" android:layout_height="wrap_content" app:underline_color="#457ad1" app:underline_selected_color="#9e1ace" app:text_color="#b12eff" app:hint_color="#77ce9d" app:hint_text="Pin code" app:codes="4" /> <com.github.glomadrian.codeinputlib.CodeInput android:layout_marginTop="20dp" android:layout_width="wrap_content" android:layout_height="wrap_content" app:underline_color="#d19385" app:underline_selected_color="#ce3a47" app:text_color="#5c282c" app:hint_color="#ce1087" app:hint_text="Cheat code" app:codes="8" /> <com.github.glomadrian.codeinputlib.CodeInput android:layout_marginTop="20dp" android:layout_width="wrap_content" android:layout_height="wrap_content" app:underline_color="#03A9F4" app:underline_selected_color="#3F51B5" app:text_color="#212121" app:hint_color="#03A9F4" […]

Android RecyclerView最后一项删除(运行时)错误

我有RecyclerView与自定义列表项目和CardView项目,在两个不同的Activities 。 现在我得到错误,当我从列表中删除最后剩下的项目,我没有改变任何有关这些acitivities或adapter或RecyclerView 。 错误是: java.lang.NullPointerException at android.support.v7.widget.OrientationHelper$2.getDecoratedStart(OrientationHelper.java:316) at android.support.v7.widget.LinearLayoutManager.findOneVisibleChild(LinearLayoutManager.java:1633) at android.support.v7.widget.LinearLayoutManager.findFirstVisibleChildClosestToStart(LinearLayoutManager.java:1453) at android.support.v7.widget.LinearLayoutManager.computeScrollOffset(LinearLayoutManager.java:997) at android.support.v7.widget.LinearLayoutManager.computeVerticalScrollOffset(LinearLayoutManager.java:969) at android.support.v7.widget.RecyclerView.computeVerticalScrollOffset(RecyclerView.java:1175) at android.view.View.canScrollVertically(View.java:12745) at android.support.v4.view.ViewCompatICS.canScrollVertically(ViewCompatICS.java:35) at android.support.v4.view.ViewCompat$ICSViewCompatImpl.canScrollVertically(ViewCompat.java:940) at android.support.v4.view.ViewCompat.canScrollVertically(ViewCompat.java:1237) at android.support.v7.widget.RecyclerView$LayoutManager.onInitializeAccessibilityEvent(RecyclerView.java:6594) at android.support.v7.widget.RecyclerView$LayoutManager.onInitializeAccessibilityEvent(RecyclerView.java:6573) at android.support.v7.widget.LinearLayoutManager.onInitializeAccessibilityEvent(LinearLayoutManager.java:204) at android.support.v7.widget.RecyclerViewAccessibilityDelegate.onInitializeAccessibilityEvent(RecyclerViewAccessibilityDelegate.java:66) at android.support.v4.view.AccessibilityDelegateCompat$AccessibilityDelegateJellyBeanImpl$1.onInitializeAccessibilityEvent(AccessibilityDelegateCompat.java:228) at android.support.v4.view.AccessibilityDelegateCompatJellyBean$1.onInitializeAccessibilityEvent(AccessibilityDelegateCompatJellyBean.java:56) at android.view.View.onInitializeAccessibilityEvent(View.java:5292) at android.view.View.sendAccessibilityEventUncheckedInternal(View.java:5160) at android.view.View$AccessibilityDelegate.sendAccessibilityEventUnchecked(View.java:20325) at android.support.v4.view.AccessibilityDelegateCompatIcs.sendAccessibilityEventUnchecked(AccessibilityDelegateCompatIcs.java:117) at android.support.v4.view.AccessibilityDelegateCompat$AccessibilityDelegateIcsImpl.sendAccessibilityEventUnchecked(AccessibilityDelegateCompat.java:210) at android.support.v4.view.AccessibilityDelegateCompat.sendAccessibilityEventUnchecked(AccessibilityDelegateCompat.java:358) at android.support.v4.view.AccessibilityDelegateCompat$AccessibilityDelegateJellyBeanImpl$1.sendAccessibilityEventUnchecked(AccessibilityDelegateCompat.java:255) at android.support.v4.view.AccessibilityDelegateCompatJellyBean$1.sendAccessibilityEventUnchecked(AccessibilityDelegateCompatJellyBean.java:82) at […]

通话需要可能被用户拒绝的权限

我试图做一个应用程序,每五分钟后发送一个用户的位置更新。 我想我的代码工作得很好,但我得到了应用程序正在使用的权限错误。 我很确定,我已经在清单文件中添加了权限。 有人能告诉我什么是错的吗? 这是我的代码。 MainActivity.java LocationManager locationManager ; String provider; @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_main); // Getting LocationManager object locationManager = (LocationManager)getSystemService(Context.LOCATION_SERVICE); // Creating an empty criteria object Criteria criteria = new Criteria(); // Getting the name of the provider that meets the criteria provider = locationManager.getBestProvider(criteria, false); if(provider!=null && !provider.equals("")){ […]

更新Android SDK工具REV 22“无法parsingL的超类”

该项目昨天是好的,但是当我更新Sdk工具和ADT今天(REV 22)时,运行该项目时发生错误,如“无法parsingL的超类…”。 我的项目使用ActionbarSherlock和SlidingMenu。 我已经试过了: 将外部的jar文件复制到我的项目的“libs”文件夹中。 (我之前已经这样做了) Properties-> Java Build Path-> Projects并在那里添加库项目。 清理和重build 重置计算机或IDE 尝试其他也包含项目库的项目 在将ADT和Android sdk工具更新到最新版本22之后,按照类未find的错误 但他们都失败了。 整个Logcat如下: 05-17 06:53:50.087: E/Trace(949): error opening trace file: No such file or directory (2) 05-17 06:53:50.188: W/dalvikvm(949): Unable to resolve superclass of Lcom/qdnews/utils/AsyncImageLoaderX$1; (50) 05-17 06:53:50.197: W/dalvikvm(949): Link of class 'Lcom/qdnews/utils/AsyncImageLoaderX$1;' failed 05-17 06:53:50.197: E/dalvikvm(949): Could not find […]

Android – 找不到google-play-services_lib.apk! 错误

我正尝试从以下链接使用新的Google Play Services for Google Plus集成function: http : //ankitthakkar90.blogspot.sg/2013/05/google-plus-integration-in-android.html 除了当我尝试运行它时,我能够得到一切正确,它提供了这个错误 Android Launch! adb is running normally. Performing com.anky.googleplus.MainActivity activity launch Automatic Target Mode: using device 'CB5A1MQW4P' Uploading GooglePlusDemo.apk onto device 'CB5A1MQW4P' Installing GooglePlusDemo.apk… Success! Could not find google-play-services_lib.apk! Starting activity com.anky.googleplus.MainActivity on device CB5A1MQW4P ActivityManager: Starting: Intent { act=android.intent.action.MAIN cat=[android.intent.category.LAUNCHER] cmp=com.anky.googleplus/.MainActivity } 我通过eclipse Properties> Android> […]

java.lang.RuntimeException:无法打开input通道对

我正在testing我的应用程序与三个手机(运行andorid版本:4.1.2 – 4.0.4 – 2.3.6)。 他们通过蓝牙交换数据没有问题,直到这个错误出现在logcat中,手机完全closures并重新启动。 在这个错误出现之前,一切正常。 这里是手机上的logcat输出崩溃(运行4.1.2的版本): 05-29 12:11:36.887: E/InputTransport(2947): channel '418655a8 Toast' ~ Could not create socket pair. errno=24 05-29 12:11:36.897: E/JavaBinder(2947): *** Uncaught remote exception! (Exceptions are not yet supported across processes.) 05-29 12:11:36.897: E/JavaBinder(2947): java.lang.RuntimeException: Could not open input channel pair. status=-24 05-29 12:11:36.897: E/JavaBinder(2947): at android.view.InputChannel.nativeOpenInputChannelPair(Native Method) 05-29 12:11:36.897: E/JavaBinder(2947): […]

错误:无法访问软件包pipe理器。 系统正在运行? – 在Android Studio

我安装了android studio,并试图运行简单的项目。 但是我抓到了奇怪的错误信息: Waiting for device. /usr/local/idea/android-studio/sdk/tools/emulator -avd Nexus-4-18-xhdpi -netspeed full -netdelay none emulator: emulator window was out of view and was recentered Device connected: emulator-5554 Device is online: emulator-5554 Target device: Nexus-4-18-xhdpi [emulator-5554] Uploading file local path: /home/nazar/Documents/coursera-android/Examples/HelloAndroid/out/production/HelloAndroid/HelloAndroid.apk remote path: /data/local/tmp/course.examples.HelloWorld.HelloWorld Installing course.examples.HelloWorld.HelloWorld DEVICE SHELL COMMAND: pm install -r "/data/local/tmp/course.examples.HelloWorld.HelloWorld" Error: Could not access […]

Android设备监视器无法打开 – 日志文件错误

在Android Studio中,当我尝试运行Android设备监视器时,在日志文件上出现以下错误: >!SESSION 2014-12-17 09:57:30.625 ———————————————– eclipse.buildId=unknown java.version=1.8.0_25 java.vendor=Oracle Corporation BootLoader constants: OS=win32, ARCH=x86_64, WS=win32, NL=pt_BR Command-line arguments: -os win32 -ws win32 -arch x86_64 -data @noDefault >!ENTRY org.eclipse.osgi 4 0 2014-12-17 09:57:31.366 !MESSAGE Bundle reference:file:org.apache.ant_1.8.3.v201301120609/@4 not found. >!ENTRY org.eclipse.osgi 4 0 2014-12-17 09:57:31.372 !MESSAGE Bundle reference:file:org.apache.jasper.glassfish_2.2.2.v201205150955.jar@4 未find。 >!ENTRY org.eclipse.osgi 4 0 2014-12-17 09:57:31.373 !MESSAGE Bundle […]

android.util.AndroidRuntimeException:你不能合并滑动解雇和操作栏

我是新来的android编程,并启动了一个示例hello世界程序,但坚持以下错误: 07-05 13:52:20.830: W/dalvikvm(898): threadid=1: thread exiting with uncaught exception (group=0xb2ac4d70) 07-05 13:52:20.850: E/AndroidRuntime(898): FATAL EXCEPTION: main 07-05 13:52:20.850: E/AndroidRuntime(898): Process: com.example.helloandroid, PID: 898 07-05 13:52:20.850: E/AndroidRuntime(898): java.lang.RuntimeException: Unable to start activity ComponentInfo{com.example.helloandroid/com.example.helloandroid.MainActivity}: android.util.AndroidRuntimeException: You cannot combine swipe dismissal and the action bar. 07-05 13:52:20.850: E/AndroidRuntime(898): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2197) 07-05 13:52:20.850: E/AndroidRuntime(898): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2258) 07-05 13:52:20.850: […]

findViewById()上的NoSuchFieldError

有两个我想要合并的Android项目,一个是Main,另一个是作为Library链接的。 但是我在这方面有一些麻烦: Button modificarC; protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); this.requestWindowFeature(Window.FEATURE_NO_TITLE); setContentView(R.layout.activity_menu_calificaciones); modificarC = (Button) findViewById(R.id.btn_aseso); //HERE 我尝试了项目清洁…也有我的依赖关系的android-support-v4.jar 这是我的痕迹: 04-24 19:39:52.568: E/AndroidRuntime(9486): FATAL EXCEPTION: main 04-24 19:39:52.568: E/AndroidRuntime(9486): java.lang.NoSuchFieldError: com.utez.sistemas.sam.R$id.btn_aseso 04-24 19:39:52.568: E/AndroidRuntime(9486): at com.utez.sistemas.sam.calificaciones.CalificacionesActivity.onCreate(CalificacionesActivity.java:67) 04-24 19:39:52.568: E/AndroidRuntime(9486): at android.app.Activity.performCreate(Activity.java:4465) 04-24 19:39:52.568: E/AndroidRuntime(9486): at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1052) 04-24 19:39:52.568: E/AndroidRuntime(9486): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1932) 04-24 19:39:52.568: E/AndroidRuntime(9486): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:1993) […]