English 中文(简体)
误差类型 3 错误: 活动类别{}不存在
原标题:Error type 3 Error: Activity class {} does not exist

我有一个英特尔利赫项目,我成功地将该项目进口到Antoinudio 0.4.0。 如果我不作任何明显改变,它就会完美地发挥作用。 然而,当我想要改变发射器的活动和运行时,它没有出现这一错误:

Launching application: com.trackingeng/LandingActivity.
DEVICE SHELL COMMAND: am start -D -n "com.trackingeng/LandingActivity"  
    -a android.intent.action.MAIN -c android.intent.category.LAUNCHER
Starting: Intent { act=android.intent.action.MAIN  
    cat=[android.intent.category.LAUNCHER] cmp=com.trackingeng/LandingActivity }
Error type 3
Error: Activity class {com.trackingeng/LandingActivity} does not exist.

当我点击Sync Project with Gradle file时,该项目的产出如下:

Project Sync
The project  TrackingEng  is not a Gradle-based project

Run settings: enter image description here

最佳回答

I faced a similar problem after refactoring.
This is what i did to resolve this issue:

  1. Cleaned the Project
  2. Deleted the Build directory
  3. Restarted Android Studio
  4. Rebuild the Project
  5. Run
  6. Optionally (Go to the files menu on android, click on "Invalidate Caches / Restart..." uninstall the app on your phone and try again)

And everything worked fine!
I think the key is to restart your IDE.

Edit 1:
If the above steps don t work for you, then deleting Gradle cache seems to be a solution, as pointed out by @Yasitha.

Edit 2
As suggested by a couple of users in the comments below, sometimes the issue can be resolved by completely removing and reinstalling the app from your device.
Simply type adb uninstall <package> in terminal to completely remove app from the device.

Edit 3
As mentioned in Abhishek s Answer, one should also try deleting the app from your device in case multiple users are set up on your device.
Simply go to Mobile Settings > Apps > [Your App] > More > Uninstall App for All Users

Edit 4
As mentioned by Yassin Ajdi, executing the uninstallAll Gradle task can also fix the issue.
You can go to Gradle > Tasks > Install > uninstallAll to get the job done.

<UPDATE for Andersroom 2.1 and up

如果你在选择优良时(因缺省而得到),你也可以面对这一问题。

将这一选择移至<条码>(>参考>选择,载于<条码>。 现行Run使你能够打破该屏幕上的第一个检查箱。

“Disable

这对我来说都是如此。 最初由用户@yusufonder指出。 我发现这个问题,因为<代码>格勒布>安装的工作仍在进行。

问题回答

有时,在装置上测试, apptt uninstall /em 。 核实和确定:

  1. Go to Settings.
  2. Go to Apps.
  3. Select your app. (here, you can verify that your app is not uninstalled properly).
  4. Open the overflow menu on the top right and select Uninstall for all users.
  5. Done. Try to install then launch your app again.

在通过该装置(即把电灯拖到“Uninstall”选择)将电灯拖拉时,我将面临这一问题。 但这里是打破以下局面的适当途径:

使用<代码>。 所有指令。 这将防止<代码>。 错误:活动类别{HomeActivity}并不存在。

<>Update:

如果你真的问答,你可以为此使用简称:/gradlew uA

或者在您的<代码>.bash_profile<>/code>中界定共同梯度任务的内容,这样做将节省时间、打字,而且你也不必记住每一指挥或打字。 我建议这样做。

我有同样的问题,这就是我如何确定:

Go to Gradle > Task > Install > uninstallAll

“entergraph

This happens when you do the following

  • connect your device/emulator
  • run the app from Android Studio (AS)
  • use/test the app and uninstall it from the device while it is still connected to your computer
  • try to run the app again from AS

无国界记者协会认为,你在你身上仍然有 app。

tl;dr - 为了解决这个问题,你可以简单地把你的装置隔开并重新连接起来。

应用程序已经安装在另一个用户。 请试图为所有用户提供同样的信息。 然后审判。

或者,你可以经手行事。

adb uninstall PACKAGE_NAME

PACKAGE_NAME是全名,如 com。 我

在重新命名/推算之后,我有同样的错误。 我添加了<编码>应用。 Id Property属我的建筑。 梯度档案,确定其对申请包的价值。

build.gradle:

android {
defaultConfig {
    applicationId "com.example.myapp"  
  }
}

在我的案件中,在问题开始后,我没有听从电话,但以下指挥人员为我工作。

低于终端/立方米指挥

adb uninstall <package_name>

package_name something like com.example.applicationname Then, try to reinstall the application. It should work.

对我来说,由于我的包裹名称与我的亲子身份证明不相符,因此我使用了反应式的代谢。 仅添加-appId YOUR_APP_ID

Try changing the name of the Activity in your AndroidManifest.xml file.

Right now it says:

<activity android:name="LandingActivity" >

活动名称的开始时间:

<activity android:name=".LandingActivity" >

,在活动名称开始之前添加“:

<activity android:name="com.trackingeng.LandingActivity" >

www.un.org/Depts/DGACM/index_spanish.htm 或许也是一个问题,即你的包裹名称只有两部分按期分开(包裹名称为“com.handingeng”;更标准一揽子名称为“com.handeng.app”)。

Follow Steps Below Go to Mobile setting > Apps > Your App > More > Hit Uninstall app for all users.

Reason : Because you are having multiple users in your phone and you had uninstalled that app for only one.

I think another reason that issue happen is that it is not fully deleted for all users on the device.

• 对所有用户开放;

它为我工作。 尤其是,你改变了信标或信标的,这些信标与安伯里夫斯特.xml文档相环。

对我来说,问题是<代码>。 AndersStudiothought that the app was still on the means.

确定:

  1. restart the adb daemon; in a terminal or command prompt, enter:

    adb kill-server
    adb start-server
    
  2. try to launch your app.

  3. 如果它仍然不做工作,则检查

make sure the platform-tools of the Android SDK is added to your system path variables!

下面的指挥为我工作。 有时部分不穿透镜也造成这种情况。

Execute below command in terminal/cmd

adb uninstall <package_name>

然后,试图重新提出申请。 它应当发挥作用。

On Android 6, when I uninstalled the app it actually went to disabled instead of being removed from device.

1. 设置和设计; Apps > 点击你的 app和腹部

有时,在客座用户的移动电话上安装了应用程序,因此试图转换客座和统一申请。

In addition, try to execute the following command to uninstall application adb uninstall package "Your package Name"

File -> Invalidate Caches / Restart

从终点站看

gradlew uninstallAll

This will uninstall all the debug, release, apks of all the versions of your app. And re-install the application

兹警告,如果你在装置上有多个简介,你在另一个简介中可能已经存在。

从所有简介中记录下来的照片对我来说是个问题。

面对同一问题,我使用Antoinudio 3.2 Beta。

Go to

File -> Invalidate Caches / Restart...

解决我的问题

就我而言,这是因为我试图发射的照片是安装在装置上的不同用户。 选择和选择。 Click on the overflow menu and selected “Uninstall for alluser”.

有时,一旦你重新命名项目根基目录,就删除了<>代码>.idea 项目夹,并重开安厅。

For me it was a very specific problem, I ve got a Lg g5 to test my application on, and to reset my apps data I uninstalled it on the phone, but the phone has a "nice" feature to don t uninstall apps immediatly so you might can reinstall them within one day. So the app was installed but not usable(disabled) after removing the app from the phone completely it worked.

Just in case anyone runs into my issue and has no luck with the other solutions... I was trying to start an activity through adb for FireTV while debugging Amazon launcher integration. However, my project had 60 different build variants (multi-platform, multi-app project) and the ApplicationId didn t match any classpath since the runtime package (and classpaths) were different from the applicationId.

I was trying to run adb shell am start -n com.myappid.example.packageone.packagetwo/com.myappid.example.packageone.packagetwo.MySplashActivity

(课程一)与<代码>com.runtimepath.example 进行了许多组合。 由于我面临另一个不同应用的挑战 我在座。 梯度和运行时间的间隔

最终帮助的是:

Which revealed a different format! com.myappid.example/com.runtimepath.example.packageone.packagetwo.MySplashActivity

因此,如果你有不同的经营时间班子试图在建筑中具体说明。 梯度应用 排在弹片之前,然后排在手术室。

你们也可以从<条码>获取这些价值。 《建筑群》。 AppLICATION_ID and this.get LocalClassName(), 如果你希望将其登录在标识上。

在我的案件中,有以下理由:

I have 2 users: me and Guest. and app was installed on both of them but deleted only at first.

当我转向客座屏幕,从那里删除灯,安装了ok。

希望这将有助于:

如果你从该装置中手工填写申请表,而且你设立了多个用户,这一错误就会发生。 该装置的所有用户都必须停止申请。

我有三星银河。 在上述环境中进行搜捕是徒劳的,因为它在我的应用环境中根本没有显示。

我在电话中找到了申请,打上了搜索场的照片。 我认识到,这是在“工作”(使用移动@Work)简介中发现的,并删除了这一简介。 你们可以找到了解情况的环境,到处去; 工作概况和计划;

我希望这一点有助于有些人,他们可能发现,其他许多答复都说,在环境中可以找到。

Gradle -> Tasks -> Install -> Uninstall All.





相关问题
Android - ListView fling gesture triggers context menu

I m relatively new to Android development. I m developing an app with a ListView. I ve followed the info in #1338475 and have my app recognizing the fling gesture, but after the gesture is complete, ...

AsyncTask and error handling on Android

I m converting my code from using Handler to AsyncTask. The latter is great at what it does - asynchronous updates and handling of results in the main UI thread. What s unclear to me is how to handle ...

Android intent filter for a particular file extension?

I want to be able to download a file with a particular extension from the net, and have it passed to my application to deal with it, but I haven t been able to figure out the intent filter. The ...

Android & Web: What is the equivalent style for the web?

I am quite impressed by the workflow I follow when developing Android applications: Define a layout in an xml file and then write all the code in a code-behind style. Is there an equivalent style for ...

TiledLayer equivalent in Android [duplicate]

To draw landscapes, backgrounds with patterns etc, we used TiledLayer in J2ME. Is there an android counterpart for that. Does android provide an option to set such tiled patterns in the layout XML?

Using Repo with Msysgit

When following the Android Open Source Project instructions on installing repo for use with Git, after running the repo init command, I run into this error: /c/Users/Andrew Rabon/bin/repo: line ...

Android "single top" launch mode and onNewIntent method

I read in the Android documentation that by setting my Activity s launchMode property to singleTop OR by adding the FLAG_ACTIVITY_SINGLE_TOP flag to my Intent, that calling startActivity(intent) would ...

From Web Development to Android Development

I have pretty good skills in PHP , Mysql and Javascript for a junior developer. If I wanted to try my hand as Android Development do you think I might find it tough ? Also what new languages would I ...