android.content.ActivityNotFoundException:找不到处理Intent的Activity

我是 Android的新手.我正在尝试使用谷歌位置API,当在模拟器中运行它显示不幸的是你的应用程序停止工作.
我做了一个adb logcat,这是我的stacktrace
10-31 23:43:02.010  2370  2370 D AndroidRuntime: >>>>>> START     com.android.internal.os.RuntimeInit uid 0 <<<<<<
10-31 23:43:02.011  2370  2370 D AndroidRuntime: CheckJNI is ON
10-31 23:43:02.026  2370  2370 I art     : JIT created with code_cache_capacity=2MB compile_threshold=1000
10-31 23:43:02.030  2370  2370 D ICU     : No timezone override file found: /data/misc/zoneinfo/current/icu/icu_tzdata.dat
10-31 23:43:02.044  2370  2370 E memtrack: Couldn't load memtrack module (No such file or directory)
10-31 23:43:02.044  2370  2370 E android.os.Debug: failed to load memtrack module: -2
10-31 23:43:02.045  2370  2370 I Radio-JNI: register_android_hardware_Radio DONE
10-31 23:43:02.062  2370  2370 D AndroidRuntime: Calling main entry com.android.commands.pm.Pm
10-31 23:43:02.073  2228  2240 I art     : CollectorTransition marksweep + semispace GC freed 125(-7KB) AllocSpace objects,0(0B) LOS objects,57% free,379KB/891KB,paused 5.591ms total 5.591ms
10-31 23:43:02.080  2228  2242 D DefContainer: Copying /data/local/tmp/HighwayMechanic.apk to base.apk
10-31 23:43:02.181  1138  1177 I PackageManager.DexOptimizer: Running dexopt (dex2oat) on: /data/app/vmdl931695514.tmp/base.apk pkg=com.highway.highwaymechanic isa=x86 vmSafeMode=false debuggable=true oatDir = /data/app/vmdl931695514.tmp/oat
10-31 23:43:02.190  2382  2382 W dex2oat : Unexpected CPU variant for X86 using defaults: x86
10-31 23:43:02.190  2382  2382 W dex2oat : Mismatch between dex2oat instruction set features (ISA: X86 Feature string: smp,-ssse3,-sse4.1,-sse4.2,-avx,-avx2) and those of dex2oat executable (ISA: X86 Feature string: smp,ssse3,-avx2) for the command line:
10-31 23:43:02.190  2382  2382 W dex2oat : /system/bin/dex2oat --zip-fd=6 --zip-location=base.apk --oat-fd=7 --oat-location=/data/app/vmdl931695514.tmp/oat/x86/base.odex --instruction-set=x86 --instruction-set-variant=x86 --instruction-set-features=default --runtime-arg -Xms64m --runtime-arg -Xmx512m --swap-fd=8 --debuggable
10-31 23:43:02.190  2382  2382 I dex2oat : /system/bin/dex2oat --debuggable
10-31 23:43:08.200  2382  2382 I dex2oat : dex2oat took 6.009s (threads: 1) arena alloc=2MB java alloc=6MB native alloc=32MB free=2MB
10-31 23:43:08.276  1138  1162 I ActivityManager: Force stopping com.highway.highwaymechanic appid=10053 user=-1: uninstall pkg
10-31 23:43:08.294  1138  1177 I PackageManager: Package com.highway.highwaymechanic codePath changed from /data/app/com.highway.highwaymechanic-2 to /data/app/com.highway.highwaymechanic-1; Retaining data and using new
10-31 23:43:08.295  1138  1162 I ActivityManager: Force stopping com.highway.highwaymechanic appid=10053 user=-1: replace pkg
10-31 23:43:08.296  1138  1177 W PackageManager: Code path for com.highway.highwaymechanic changing from /data/app/com.highway.highwaymechanic-2 to /data/app/com.highway.highwaymechanic-1
10-31 23:43:08.296  1138  1177 W PackageManager: Resource path for com.highway.highwaymechanic changing from /data/app/com.highway.highwaymechanic-2 to /data/app/com.highway.highwaymechanic-1
10-31 23:43:08.333  1138  1177 W Settings: Setting install_non_market_apps has moved from android.provider.Settings.Global to android.provider.Settings.Secure,returning read-only value.
10-31 23:43:08.333  1138  1177 I art     : Starting a blocking GC Explicit
10-31 23:43:08.353  1138  1177 I art     : Explicit concurrent mark sweep GC freed 10787(756KB) AllocSpace objects,11(220KB) LOS objects,19% free,5MB/6MB,paused 517us total 13.651ms
10-31 23:43:08.357  1138  1177 W PackageManager: Couldn't remove dex file for package:  at location /data/app/com.highway.highwaymechanic-2/base.apk,retcode=-1
10-31 23:43:08.359  1138  1177 I ActivityManager: Force stopping com.highway.highwaymechanic appid=10053 user=0: pkg removed
10-31 23:43:08.360  2370  2370 I art     : System.exit called,status: 0
10-31 23:43:08.360  2370  2370 I AndroidRuntime: VM exiting with result code 0.
10-31 23:43:08.400  1138  1138 D JobSchedulerService: Receieved: android.intent.action.PACKAGE_REMOVED
10-31 23:43:08.403  1566  1566 D CarrierServiceBindHelper: Receive action: android.intent.action.PACKAGE_REMOVED
10-31 23:43:08.404  1566  1566 D CarrierServiceBindHelper: mHandler: 3
10-31 23:43:08.404  1138  1255 I InputReader: Reconfiguring input devices.  changes=0x00000010
10-31 23:43:08.414  1925  1925 W ContextImpl: Calling a method in the system process without a qualified user:  android.app.ContextImpl.startService:1221  android.content.ContextWrapper.startService:581 android.content.ContextWrapper.startService:581 com.android.keychain.KeyChainBroadcastReceiver.onReceive:12 android.app.ActivityThread.handleReceiver:2725 
10-31 23:43:08.418  1138  1641 I BroadcastQueue: Delay finish: com.android.keychain/.KeyChainBroadcastReceiver
10-31 23:43:08.514  1138  1255 I InputReader: Reconfiguring input devices.  changes=0x00000010
10-31 23:43:08.515  1138  2212 I BroadcastQueue: Resuming delayed broadcast
10-31 23:43:08.516  1566  1566 D CarrierServiceBindHelper: Receive action: android.intent.action.PACKAGE_ADDED
10-31 23:43:08.516  1566  1566 D CarrierServiceBindHelper: mHandler: 3
10-31 23:43:08.602  1138  1255 I InputReader: Reconfiguring input devices.  changes=0x00000010
10-31 23:43:08.602  1566  1566 D CarrierServiceBindHelper: Receive action: android.intent.action.PACKAGE_REPLACED
10-31 23:43:08.602  1566  1566 D CarrierServiceBindHelper: mHandler: 3
10-31 23:43:08.602  1566  1566 D CarrierConfigLoader: mHandler: 9 phoneId: 0
10-31 23:43:08.617  2390  2390 D AndroidRuntime: >>>>>> START com.android.internal.os.RuntimeInit uid 0 <<<<<<
10-31 23:43:08.619  2390  2390 D AndroidRuntime: CheckJNI is ON
10-31 23:43:08.635  2390  2390 I art     : JIT created with code_cache_capacity=2MB compile_threshold=1000
10-31 23:43:08.640  2390  2390 D ICU     : No timezone override file found: /data/misc/zoneinfo/current/icu/icu_tzdata.dat
10-31 23:43:08.654  2390  2390 E memtrack: Couldn't load memtrack module (No such file or directory)
10-31 23:43:08.654  2390  2390 E android.os.Debug: failed to load memtrack module: -2
10-31 23:43:08.655  2390  2390 I Radio-JNI: register_android_hardware_Radio DONE
10-31 23:43:08.667  2390  2390 D AndroidRuntime: Calling main entry com.android.commands.am.Am
10-31 23:43:08.669  1138  2212 I ActivityManager: START u0 {act=android.intent.action.MAIN cat=[android.intent.category.LAUNCHER] flg=0x10000000 cmp=com.highway.highwaymechanic/.MainActivity} from uid 0 on display 0
10-31 23:43:08.691  2390  2390 D AndroidRuntime: Shutting down VM
10-31 23:43:08.695  2390  2395 I art     : Debugger is no longer active
10-31 23:43:08.695  2390  2401 E art     : Thread attaching while runtime is shutting down: Binder_2
10-31 23:43:08.695  2390  2401 I AndroidRuntime: NOTE: attach of thread 'Binder_2' failed
10-31 23:43:08.697  2402  2402 I art     : Not late-enabling -Xcheck:jni (already on)
10-31 23:43:08.697  2402  2402 I art     : Late-enabling JIT
10-31 23:43:08.702  2402  2402 I art     : JIT created with code_cache_capacity=2MB compile_threshold=1000
10-31 23:43:08.708  1138  1712 I ActivityManager: Start proc 2402:com.highway.highwaymechanic/u0a53 for activity com.highway.highwaymechanic/.MainActivity
10-31 23:43:08.717  2402  2409 E art     : Failed sending reply to debugger: Broken pipe
10-31 23:43:08.717  2402  2409 I art     : Debugger is no longer active
10-31 23:43:08.728  2402  2402 W System  : ClassLoader referenced unknown path: /data/app/com.highway.highwaymechanic-1/lib/x86
10-31 23:43:08.747  2402  2402 W GooglePlayServicesUtil: Google Play services is missing.
10-31 23:43:08.747  2402  2402 W GooglePlayServicesUtil: Google Play services is missing.
10-31 23:43:08.747  2402  2402 W GooglePlayServicesUtil: Google Play services is missing.
10-31 23:43:08.747  2402  2402 W GooglePlayServicesUtil: Google Play services is missing.
10-31 23:43:08.748  2402  2402 W GooglePlayServicesUtil: Google Play services is missing. 
10-31 23:43:08.748  2402  2402 W GooglePlayServicesUtil: Google Play services is missing.
10-31 23:43:08.755  2402  2402 W GooglePlayServicesUtil: Google Play services is missing.
10-31 23:43:08.755  2402  2402 W GooglePlayServicesUtil: Google Play services is missing.
10-31 23:43:08.755  2402  2402 W GooglePlayServicesUtil: Google Play services is missing.
10-31 23:43:08.764  2402  2402 W GooglePlayServicesUtil: Google Play services is missing.
10-31 23:43:08.764  2402  2402 W GooglePlayServicesUtil: Google Play services is missing.
10-31 23:43:08.797  2402  2402 D gralloc_goldfish: Emulator without GPU emulation detected.
10-31 23:43:08.818  1138  1170 I ActivityManager: Displayed com.highway.highwaymechanic/.MainActivity: +129ms
10-31 23:43:10.932  1138  1429 I ActivityManager: START u0 {act=android.intent.action.VIEW dat=market://details?id=com.google.android.gms&pcampaignid=gcore_8115000--- flg=0x80000 pkg=com.android.vending} from uid 10053 on display 0
10-31 23:43:10.933  2402  2402 D AndroidRuntime: Shutting down VM
10-31 23:43:10.933  2402  2402 E AndroidRuntime: FATAL EXCEPTION: main
10-31 23:43:10.933  2402  2402 E AndroidRuntime: Process: com.highway.highwaymechanic,PID: 2402
10-31 23:43:10.933  2402  2402 E AndroidRuntime: android.content.ActivityNotFoundException: No Activity found to handle Intent { act=android.intent.action.VIEW dat=market://details?id=com.google.android.gms&pcampaignid=gcore_8115000--- flg=0x80000 pkg=com.android.vending }
10-31 23:43:10.933  2402  2402 E AndroidRuntime:    at android.app.Instrumentation.checkStartActivityResult(Instrumentation.java:1798)
10-31 23:43:10.933  2402  2402 E AndroidRuntime:    at android.app.Instrumentation.execStartActivity(Instrumentation.java:1512)
10-31 23:43:10.933  2402  2402 E AndroidRuntime:    at android.app.Activity.startActivityForResult(Activity.java:3917)
10-31 23:43:10.933  2402  2402 E AndroidRuntime:    at android.app.Activity.startActivityForResult(Activity.java:3877)
10-31 23:43:10.933  2402  2402 E AndroidRuntime:    at android.support.v4.app.FragmentActivity.startActivityForResult(FragmentActivity.java:748)
10-31 23:43:10.933  2402  2402 E AndroidRuntime:    at android.app.Activity.startActivity(Activity.java:4200)
10-31 23:43:10.933  2402  2402 E AndroidRuntime:    at android.app.Activity.startActivity(Activity.java:4168)
10-31 23:43:10.933  2402  2402 E AndroidRuntime:    at com.google.android.gms.dynamic.zza$5.onClick(Unknown Source)
10-31 23:43:10.933  2402  2402 E AndroidRuntime:    at android.view.View.performClick(View.java:5198)
10-31 23:43:10.933  2402  2402 E AndroidRuntime:    at android.view.View$PerformClick.run(View.java:21147)
10-31 23:43:10.933  2402  2402 E AndroidRuntime:    at android.os.Handler.handleCallback(Handler.java:739)
10-31 23:43:10.933  2402  2402 E AndroidRuntime:    at android.os.Handler.dispatchMessage(Handler.java:95)
10-31 23:43:10.933  2402  2402 E AndroidRuntime:    at android.os.Looper.loop(Looper.java:148)
10-31 23:43:10.933  2402  2402 E AndroidRuntime:    at android.app.ActivityThread.main(ActivityThread.java:5417)
10-31 23:43:10.933  2402  2402 E AndroidRuntime:    at java.lang.reflect.Method.invoke(Native Method)
10-31 23:43:10.933  2402  2402 E AndroidRuntime:    at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:726)
10-31 23:43:10.933  2402  2402 E AndroidRuntime:    at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:616)
10-31 23:43:10.934  1138  1712 W ActivityManager:   Force finishing activity com.highway.highwaymechanic/.MainActivity
10-31 23:43:10.935   943   943 D gralloc : Registering a buffer in the process that created it. This may cause memory ordering problems.
10-31 23:43:10.935   943   943 E libEGL  : called unimplemented OpenGL ES API
10-31 23:43:10.935   943   943 E SurfaceFlinger: glCheckFramebufferStatusOES error 1711643839
10-31 23:43:10.935   943   943 E SurfaceFlinger: got GL_FRAMEBUFFER_COMPLETE_OES error while taking screenshot
10-31 23:43:11.448  1138  1162 W ActivityManager: Activity pause timeout for ActivityRecord{40e8f1c u0 com.highway.highwaymechanic/.MainActivity t11 f}
10-31 23:43:21.478  1138  1162 W ActivityManager: Activity destroy timeout for ActivityRecord{40e8f1c u0 com.highway.highwaymechanic/.MainActivity t11 f}

这是我的Android_manifest.xml

<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
    package="com.highway.highwaymechanic"
    android:versionCode="1"
    android:versionName="1.0" >

    <uses-sdk
    android:minSdkVersion="14"
    android:targetSdkVersion="23" />

    <application
    android:allowBackup="true"
    android:icon="@drawable/ic_launcher"
    android:label="@string/app_name"
    android:theme="@style/AppTheme" >
     <meta-data 
         android:name="com.google.android.gms.version" 
         android:value="@integer/google_play_services_version" />
     <activity
        android:name=".MainActivity"
        android:label="@string/app_name" >
        <intent-filter>
            <action android:name="android.intent.action.MAIN" />

            <category android:name="android.intent.category.LAUNCHER" />
        </intent-filter>
      </activity>
      <activity
        android:name="com.highway.highwaymechanic.Map"
        android:label="@string/title_activity_map" >
     </activity>
   </application>
</manifest>

这是我的MainActivity.java文件

package com.highway.highwaymechanic;


import android.os.Bundle;
import android.support.v4.app.FragmentActivity;
import android.view.Menu;
import android.view.MenuItem;

public class MainActivity extends FragmentActivity {

@Override
protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.activity_main);
}

@Override
public boolean onCreateOptionsMenu(Menu menu) {
    // Inflate the menu; this adds items to the action bar if it is present.
    getMenuInflater().inflate(R.menu.main,menu);
    return true;
}

@Override
public boolean onOptionsItemSelected(MenuItem item) {
    // Handle action bar item clicks here. The action bar will
    // automatically handle clicks on the Home/Up button,so long
    // as you specify a parent activity in AndroidManifest.xml.
    int id = item.getItemId();
    if (id == R.id.action_settings) {
        return true;
    }
    return super.onOptionsItemSelected(item);
  }
}

这是我的MapsActivity.java文件

package com.highway.highwaymechanic;

     import android.os.Bundle;
     import android.support.v4.app.FragmentActivity;
     import com.google.android.gms.maps.CameraUpdateFactory;
     import com.google.android.gms.maps.GoogleMap;
     import com.google.android.gms.maps.OnMapReadyCallback;
     import com.google.android.gms.maps.SupportMapFragment;
     import com.google.android.gms.maps.model.LatLng;
     import com.google.android.gms.maps.model.MarkerOptions;


     public class MapsActivity extends FragmentActivity implements OnMapReadyCallback {
    @Override
     protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_map);
        SupportMapFragment mapFragment = (SupportMapFragment) getSupportFragmentManager()
                .findFragmentById(R.id.map);
        mapFragment.getMapAsync(this);
    }

    @Override
    public void onMapReady(GoogleMap map) {

        LatLng sydney = new LatLng(-34,151);
        map.addMarker(new MarkerOptions().position(sydney).title("Marker in Sydney"));
        map.moveCamera(CameraUpdateFactory.newLatLng(sydney));
     }
   }

当在模拟器中运行它崩溃时不幸的是应用程序停止工作.

请帮帮我.
提前致谢

解决方法

我相信这应该是最新版本的Google Play服务客户端库修复的.请注意,这是客户端库中的修复,因此您必须使用SDK管理器将库更新为最新版本并重新编译应用程序.

有关详细信息,请查看此链接

https://code.google.com/p/gmaps-api-issues/issues/detail?id=4862

版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。

相关推荐


ADB Remote ATV Android TV 的遥控器,基于 ADB Shell 命令 ADB Remote ATV 是一个 Android TV 的遥控器,基于 ADB Shell 命令,泛用性更高。 下面的 shell 命令,是软件的基本原理,通过 shell 命令可模拟物理遥控器的基本按
使用Flutter自带的SearchDelegate组件实现搜索界面,通过魔改实现如下效果:搜素建议、搜索结果,支持刷新和加载更多,解决IOS中文输入拼音问题。
上篇文章讲解了怎么使用Kotlin的协程配合Retrofit发起网络请求,使用也是非常方便,但是在处理请求异常还不是很人性化。这篇文章,我们将处理异常的代码进行封装,以便对异常情况返回给页面,提供更加友好的提示。 编写拓展方法 我们写一个扩展(全局)方法,就叫ViewModelExt.kt,在下面创
安卓开发——WebView+Recyclerview文章详情页,解决高度问题 最近在写一个APP时,需要显示文章详情页,准备使用WebView和RecyclerView实现上面文章,下面评论。出现了WebView高度问题,WebView加载HTML格式数据,而非URL。 这里的WebView为自定义
更新Android SDK到3.0版本时,遇到Failed to rename directory E:\android\tools to E:\android\temp\ToolPackage.old01问题,导致无法更新,出现该问题的原因是由于3.0版本与较早的sdk版本之间文件结构有冲突,解决
Android 如何解决dialog弹出时无法捕捉Activity的back事件 在一些情况下,我们需要捕捉back键事件,然后在捕捉到的事件里写入我们需要进行的处理,通常可以采用下面三种办法捕捉到back事件: 1)重写onKeyDown或者onKeyUp方法 2)重写onBackPressed方
Android实现自定义带文字和图片的Button 在Android开发中经常会需要用到带文字和图片的button,下面来讲解一下常用的实现办法。一.用系统自带的Button实现 最简单的一种办法就是利用系统自带的Button来实现,这种方式代码量最小。在Button的属性中有一个是drawable
Android中的&quot;Unable to start activity ComponentInfo&quot;的错误 最近在做一款音乐播放器的时候,然后在调试的过程中发现一直报这个错误&quot;Unable to start activity ComponentInfo&quot;,从字面
Android 关于长按back键退出应用程序的实现最近在做一个Android上的应用,碰到一个问题就是如何实现长按back键退出应用程序。在网上查找了很多资料,发现几乎没有这样的实现,大部分在处理时是双击back键来退出应用程序。参考了一下双击back键退出应用程序的代码,网上主流的一种方法是下面
android自带的时间选择器只能精确到分,但是对于某些应用要求选择的时间精确到秒级,此时只有自定义去实现这样的时间选择器了。下面介绍一个可以精确到秒级的时间选择器。 先上效果图: 下面是工程目录: 这个控件我也是用的别人的,好像是一个老外写的,com.wheel中的WheelView是滑动控件的主
Android平台下利用zxing实现二维码开发 现在走在大街小巷都能看到二维码,而且最近由于项目需要,所以研究了下二维码开发的东西,开源的二维码扫描库主要有zxing和zbar,zbar在iPos平台上应用比较成熟,而在Android平台上主流还是用zxing库,因此这里主要讲述如何利用zxing
Android ListView的item背景色设置以及item点击无响应等相关问题 在Android开发中,listview控件是非常常用的控件,在大多数情况下,大家都会改掉listview的item默认的外观,下面讲解以下在使用listview时最常见的几个问题。1.如何改变item的背景色和按
如何向Android模拟器中导入含有中文名称的文件在进行Android开发的时候,如果需要向Android模拟器中导入文件进行测试,通过DDMS下手动导入或者在命令行下通过adb push命令是无法导入含有中文文件名的文件的。后来发现借用其他工具可以向模拟器中导入中文名称的文件,这个工具就是Ultr
Windows 下搭建Android开发环境一.下载并安装JDK版本要求JDK1.6+,下载JDK成功后进行安装,安装好后进行环境变量的配置【我的电脑】-——&gt;【属性】——&gt;【高级】 ——&gt;【环境变量】——&gt;【系统变量】中点击【新建】:变量名:CLASSPATH变量值:……
如何利用PopupWindow实现弹出菜单并解决焦点获取以及与软键盘冲突问题 在android中有时候可能要实现一个底部弹出菜单,此时可以考虑用PopupWindow来实现。下面就来介绍一下如何使用PopupWindow实现一个弹出窗。 主Activity代码:public void onCreat
解决Android中的ERROR: the user data image is used by another emulator. aborting的方法 今天调试代码的时候,突然出现这个错误,折腾了很久没有解决。最后在google上找到了大家给出的两种解决方案,下面给出这两种方法的链接博客:ht
AdvserView.java package com.earen.viewflipper; import android.content.Context; import android.graphics.Bitmap; import android.graphics.BitmapFactory;
ImageView的scaleType的属性有好几种,分别是matrix(默认)、center、centerCrop、centerInside、fitCenter、fitEnd、fitStart、fitXY。 |值|说明| |:--:|:--| |center|保持原图的大小,显示在ImageVie
文章浏览阅读8.8k次,点赞9次,收藏20次。本文操作环境:win10/Android studio 3.21.环境配置 在SDK Tools里选择 CMAKE/LLDB/NDK点击OK 安装这些插件. 2.创建CMakeLists.txt文件 在Project 目录下,右键app,点击新建File文件,命名为CMakeLists.txt点击OK,创建完毕! 3.配置文件 在CMa..._link c++ project with gradle
文章浏览阅读1.2w次,点赞15次,收藏69次。实现目的:由mainActivity界面跳转到otherActivity界面1.写好两个layout文件,activity_main.xml和otherxml.xmlactivity_main.xml&lt;?xml version="1.0" encoding="utf-8"?&gt;&lt;RelativeLayout ="http://schemas..._android studio 界面跳转