I am trying to using Payu gateway integration.So i added dependency implementation 'com.payumoney.sdkui:plug-n-play:1.6.0' .After sync **Default activity not found ** coming.
Dont understand error. if i remove dependency ,its working fine.
Build.gradle:
implementation 'com.payumoney.sdkui:plug-n-play:1.6.0'
Manifest FIle :
<activity
android:name=".activity.SplashActivity"
android:theme="#style/AppTheme.NoActionBar">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
Add tools:replace="android:allowBackup,android:usesCleartextTraffic" in the App Manifest file and
Invalidate and Restart the project once.
Related
I converted a legacy Android app to library and placed it into my current flutter project to call it using Method Channel. It's working fine, but the problem is that flutter is installing those two apps at the same time and showing two icons on device screen! Even using this second app as library and dependency. Flutter is installing both as regular apps.
I am using flutter 1.7.8.
I tried to follow this answer -> How to use a library project in android studio
I would like to install only my flutter app and using the second one as library/dependency inside of it.
You have to changes the types of your second module as library, change
apply plugin: 'com.android.application'
into
apply plugin: 'com.android.library'
on the build.gradle of your module.
and also remove any intent filter main and launcher on these module.
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
Remove these part.
You might have two activities with below code.
<meta-data
android:name="io.flutter.app.android.SplashScreenUntilFirstFrame"
android:value="true" />
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
Use above code with only one activity, otherwise android launch two application at the same time.
For example, Use this in your code.
<activity
android:name=".MainActivity"
android:configChanges="orientation|keyboardHidden|keyboard|screenSize|locale|layoutDirection|fontScale"
android:hardwareAccelerated="true"
android:theme="#style/LaunchTheme"
android:windowSoftInputMode="adjustResize">
<meta-data
android:name="io.flutter.app.android.SplashScreenUntilFirstFrame"
android:value="true" />
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
I have an application that I want to create an instantApp for it.
I successfully apply changes to my project and it builds successfully.
But there is 2 problem:
-I couldn't run the application and the error is:
Default Activity not found
And another problem is that when I run the instantApp I see an error message that says Google Play Store has stoped
I have an app and two Instant App Feature Module that are base and feature.
And these is my feature manifest:
<manifest xmlns:android="http://schemas.android.com/apk/res/android" xmlns:tools="http://schemas.android.com/tools"
package="instantapp.samples.yaramobile.com.base.feature">
<application tools:ignore="GoogleAppIndexingWarning">
<activity android:name=".presenter.MainActivity">
<intent-filter>
<action android:name="android.intent.action.MAIN"/>
<category android:name="android.intent.category.LAUNCHER"/>
</intent-filter>
<intent-filter
android:autoVerify="true"
android:order="1">
<action android:name="android.intent.action.VIEW"/>
<category android:name="android.intent.category.BROWSABLE"/>
<category android:name="android.intent.category.DEFAULT"/>
<data android:host="test.com"/>
<data android:pathPattern="/"/>
<data android:scheme="https"/>
<data android:scheme="http"/>
</intent-filter>
</activity>
<activity android:name=".presenter.display.DisplayActivity"/>
<activity android:name=".presenter.display.PermissionActivity"/>
</application>
</manifest>
I finally found the problems and solutions:
The problem was about AppCompact dependency:
implementation 'androidx.appcompat:appcompat:1.0.2'
there was a conflict and I had to use of api instead of implementation
api 'androidx.appcompat:appcompat:1.0.2'
and there was another conflict with room dependencies:
implementation 'androidx.lifecycle:lifecycle-extensions:2.0.0'
kapt 'androidx.lifecycle:lifecycle-compiler:2.0.0'
implementation 'androidx.room:room-runtime:2.1.0-alpha02'
kapt 'androidx.room:room-compiler:2.1.0-alpha02'
I had to replaced with api too:
api 'androidx.lifecycle:lifecycle-extensions:2.0.0'
kapt 'androidx.lifecycle:lifecycle-compiler:2.0.0'
api 'androidx.room:room-runtime:2.1.0-alpha02'
kapt 'androidx.room:room-compiler:2.1.0-alpha02'
Another problem was about databinding
I Just added databinding in my base module but it's needed in installed module too:
dataBinding{
enabled = true
}
and again is about room:
I had to add a provider into the manifest of the base module because I had an error in merge manifest in my installed module because of these provider that is used in room dependencies:
<provider
tools:replace="android:authorities"
android:name="androidx.lifecycle.ProcessLifecycleOwnerInitializer"
android:authorities="codenevisha.ir.mvvmwithdagger.base.lifecycle-process"
android:exported="false"
android:multiprocess="true"/>
don't forget to replace this provider with adding tools:replace="android:authorities"
Hope these guidelines will you too.
Based from this thread, if you see that error occur after upgrading versions of IntelliJ IDEA or Android Studio, or after Generating a new APK, you may need to refresh the IDE's cache.
File -> Invalidate Caches / Restart...
It also means that you don't have an activity declared in AndroidManifest.xml that is marked as the main activity to be launched when the application starts.
My android studio seems to be not detecting AndroidManifest.xml file. When I try to run the app, configuration says that Default Activity not found, but in my manifest there is activity tag with necessary intent-filter:
<activity
android:name=".ui.MainActivity">
<intent-filter>
<action android:name="ANDROID.INTENT.ACTION.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
AndroidManifest.xml is located at app/src/main where it was initially created. Cleaning build, rebuilding, invalidating caches / restart does not help.
Names are case sensitive. Use:
<action android:name="android.intent.action.MAIN" />
If that still doesn't work try to provide the full path to your activity e.g.:
<activity
android:name="com.example.package.ui.MainActivity">
there maybe duplicate of this but I can't find any solution working for me.
I have downloaded latest Eclipse Juno from developer.android.com day before yesterday and it seems to act weirdly. I am trying to run "Hello World" but it is not creating default Activity in Manifest file.
Then I am also getting this error :
Unable to write Jarlist cache file
workspace\appcompat_v7\bin\jarlist.cacheworkspace\appcompat_v7\bin\jarlist.cache
Can someone please suggest
Add this code in your Manifest.
<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>
I'm using Android studio for making android app.
but i have a problem that when i run the app , i found 3 apps on my device ,and all of them belonging to the same APK file.
also i'm sure that the mainfeest.xml has one <intent-filter>
<activity
android:name="com.amman.android.MainActivity"
android:label="#string/app_name"
android:theme="#android:style/Theme.Holo.Light.NoActionBar">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
but i guess the problem from Build Veriants , but im not sure :(
what are the names of other apps? during the android studio build/gradle build there is a manifest merge which combines all the manifests in the library projects u included. I assume the 'other' apps are from them, try removing
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
from the all lib projects manifests