可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试):
问题:
I had error , whenever i try to launch the app it crashes. I tried few times using virtual and also my mobile, but it still doesn;t works
I'm using firebase auth and database in the project, although there are no errors, i wonder does it has any affect to the error.
$ adb shell am start -n "com.example.juice.health/com.example.juice.health.MainActivity" -a android.intent.action.MAIN -c android.intent.category.LAUNCHER Client not ready yet..Waiting for process to come online Connected to process 3016 on device Nexus_5X_API_23 [emulator-5554] Application terminated.
Manifest :
<?xml version="1.0" encoding="utf-8"?> <manifest xmlns:android="http://schemas.android.com/apk/res/android" package="com.example.juice.health"> <uses-permission android:name="android.permission.INTERNET" /> <application android:allowBackup="true" android:icon="@mipmap/ic_launcher" android:label="@string/app_name" android:supportsRtl="true" android:theme="@style/AppTheme"> <activity android:name=".MainActivity" android:exported="true"> <intent-filter> <action android:name="android.intent.action.MAIN" /> <category android:name="android.intent.category.LAUNCHER" /> </intent-filter> </activity> <activity android:name=".LoginActivity"/> <activity android:name=".ProfileActivity"/> <activity android:name=".EditProfileActivity"></activity> </application> </manifest>
回答1:
In Android-Studio : File -> Invalidate Caches / Restart
Try it
回答2:
follow this steps
- go to the phone setting
- "select developer option"
- "select app to be debugged"
and select your application,
and ready
enter image description here
回答3:
My similar error had to do with material design and colors somehow interfering. Changed the parent theme for style away from Material but kept noactionbar and it worked.
回答4:
I had the same issue when i migrated to androidx. I changed styles.xml
App theme for one of the Material one. You can check the full list here:
回答5:
Disable "Instant Run" in Settings | Build, Execution, Deployment | Instant Run as Honor LT suggested in a comment.
回答6:
In my case the minSDK in the AndroidManifest.xml file doesn't match to SDK that I have installed. Try to use latest SDK that you have in your machine.
android:minSdkVersion="[your_latest_SDK]"
or install SDK that match that required by the app.
回答7:
If your app is targeting API level 28 (Android 9.0) or above, you must include the following declaration within the element of Android Manifest.
<uses-library android:name="org.apache.http.legacy" android:required="false" />
If your app is targeting a lower API level, this is handled for you.
my case was adding a Google map into my App with an Intent
回答8:
This solution only works on Android Studio versions earlier than 3.2.x.
Follow these steps:
- Clean your project
- Go to Tools>Android and Enable ADB Integration
It worked for me.
回答9:
Well, after editing manifest a bit I do not receive this error anymore:
<?xml version="1.0" encoding="utf-8"?> <manifest xmlns:android="http://schemas.android.com/apk/res/android" package="com.example.juice.health"> <uses-permission android:name="android.permission.INTERNET" /> <application android:allowBackup="true" android:icon="@mipmap/ic_launcher" android:label="@string/app_name" android:supportsRtl="true" android:theme="@style/AppTheme" android:fullBackupContent="true"> <activity android:name=".MainActivity" android:exported="true"> <intent-filter> <action android:name="android.intent.action.MAIN" /> <category android:name="android.intent.category.LAUNCHER" /> </intent-filter> </activity> <activity android:name=".LoginActivity"/> <activity android:name=".ProfileActivity"/> <activity android:name=".EditProfileActivity"/> </application> </manifest>

回答10:
I had the same problem.No matter whether I ran it using debug mode or normal mode, I still had the same problem. I solved the issue by disabling 'INSTANT MODE'. It worked for me
回答11:
Sync the project, If you are using Kotlin, you may have to configure it. Syc project shall help to configure.