> 02/08 01:22:34: Launching app
> $ adb push D:\Android\FarmNET\app\build\outputs\apk\debug\app-debug.apk
> /data/local/tmp/com.ishara11rathnayake.farmnet
> $ adb shell pm install -t -r "/data/local/tmp/com.ishara11rathnayake.farmnet"
> Success
> APK installed in 767 ms
> $ adb shell am start -n "com.ishara11rathnayake.farmnet/com.ishara11rathnayake.farmnet.HomeActivity"
> -a android.intent.action.MAIN -c android.intent.category.LAUNCHER
> Error while executing: am start -n "com.ishara11rathnayake.farmnet/com.ishara11rathnayake.farmnet.HomeActivity"
> -a android.intent.action.MAIN -c android.intent.category.LAUNCHER
> Starting: Intent { act=android.intent.action.MAIN cat=[android.intent.category.LAUNCHER]
> cmp=com.ishara11rathnayake.farmnet/.HomeActivity }
> Error type 3
> Error: Activity class {com.ishara11rathnayake.farmnet/com.ishara11rathnayake.farmnet.HomeActivity}
> does not exist.
>
> Error while Launching activity
当我尝试在移动设备上运行我的应用程序时出现此错误,但它可与模拟器一起使用。我试图修复此禁用的即时运行。但这对我不起作用。
这是AndroidManifest.xml
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.ishara11rathnayake.farmnet">
<application
android:allowBackup="true"
android:icon="@mipmap/ic_launcher"
android:label="@string/app_name"
android:roundIcon="@mipmap/ic_launcher_round"
android:supportsRtl="true"
android:theme="@style/AppTheme">
<activity android:name=".HomeActivity">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
</application>
</manifest>
这是HomeActivity.java
package com.ishara11rathnayake.farmnet;
import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;
import android.util.Log;
import com.ittianyu.bottomnavigationviewex.BottomNavigationViewEx;
import com.ishara11rathnayake.farmnet.Utils.BottomNavigationViewHelper;
public class HomeActivity extends AppCompatActivity {
private static final String TAG = "HomeActivity";
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_home);
Log.d(TAG, "onCreate: starting");
}
/**
* BottomNavigationView setup
*/
private void setupBootomNavigationView(){
Log.d(TAG, "setupBootomNavigationView: setting up BottomNavigationView");
BottomNavigationViewEx bottomNavigationViewEx = (BottomNavigationViewEx) findViewById(R.id.bottomNavViewBar);
BottomNavigationViewHelper.setupBottomNavigationView(bottomNavigationViewEx);
}
}
我尝试了很多事情。但是,任何事情都不适合我。请帮助我。