Default Activity not found in downloaded derived APK - android

I've published an app to Google Play which uses the "Let Google Sign the App" option (yeah, I'm a dummy for doing that). I've downloaded the derived APK from Play Console and imported into Android Studio. When I try to run it I get the "Default Activity not found" error.
The manifest has a default activity specified (See below). I've tried clearing cache, changing run config to "None" activity, etc.
All ideas are welcome!
<activity
android:theme="#ref/0x0103000a"
android:label="#ref/0x7f090014"
android:name="com.godot.game.GodotApp"
android:launchMode="2"
android:screenOrientation="1"
android:configChanges="0x1ff0"
android:resizeableActivity="false">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>

This appears to be a bug in ASv4.0 or incompatibility between Godot Android export template and ASv4.0.
Downgraded to ASv3.6.3 and all is good.
If you are using Godot to build Android apps, recommend you do not upgrade Android Studio to v4.0

Related

Error while installing release version of Flutter app on Android 12 : "Parse Error : There was a problem parsing the package"

I have a Flutter app, working properly on multiple Android and iOS devices.
Recently I found it's release version APK can't be installed on Pixel phone having Android 12, I receive this error :
Parse Error : There was a problem parsing the package
(I am using Flutter 2.5.3, current latest version)
In Android 12 and later any launchable activity should contain this flag in manifest :
exported="true"
use
android:exported="true"
on activity
follow the image
please install android SDK 30 in android studio
if you are using razorpay in your project then you will have to add these lines in your manifest-
<receiver
android:name="com.razorpay.RzpTokenReceiver"
android:exported="false">
<intent-filter>
<action android:name="rzp.device_token.share" />
</intent-filter>
</receiver>
<activity
android:name="com.razorpay.CheckoutActivity"
android:configChanges="keyboard|keyboardHidden|orientation|screenSize"
android:exported="true"
android:theme="#style/CheckoutTheme">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<data
android:host="rzp.io"
android:scheme="io.rzp" />
</intent-filter>
</activity>
As #Avebrahimi said (Try him first)
In Android 12 and later any launchable activity should contain this
flag in manifest :
android:exported="true"
Didnt work?
But, still in many cases it doesn't works. So if it doesn't works, try to sign your app with a custom key, instead of default test key. It worked for me

HERE maps can't use android premium sdk

I have originally created a project that uses ANDROID SDK STARTER, but now my requirements have changed, so I want to use ANDROID SDK PREMIUM. Since it is the same project, I used the same package name. I downloaded Premium SDK and replaced with old Started SDK, however, the screen where the map should be is black.
After reverting back to the STARTER sdk, I am able to use it but can't use the Premium sdk.
Is this because the packages are similar in the dev console? If yes, how do I delete the ANDROID SDK STARTER project?
Alright, I just had to add the code in manifest, particularly
1. <meta-data
android:name="com.here.android.maps.license.key"
android:value="{YOUR_LICENSE_KEY}" />
2. <meta-data android:name="INTENT_NAME" android:value="YOUR_INTENT_NAME" />
3. <service
android:name="com.here.android.mpa.service.MapService"
android:label="YOUR_LABEL_NAME"
android:exported="false">
<intent-filter>
<action android:name="YOUR_INTENT_NAME"/>
</intent-filter>
</service>
This was not needed in Started SDK, but needed for Premium

Android Studio expands Activity name in AndroidManifest.xml

I upgraded my project from Eclipse to Android Studio.
Everything is working, including different flavors (in Eclipse I had an ANT script that auto-generated the sourcecode for the different flavors).
I can also generate the different signed APK's. And these all work on the device.
Also uploading these APK's to GooglePlay is no problem.
User also get these updates, but after the update they need to re-create the shortcut to the app on the home screen. The old shortcut is removed.
I believe this is due to the fact that "Android Studio" modifies stuff in the AndroidManifest.xml when generating the APK.
In Eclipse source, in Android studio source and when I inspect the Eclipse generated APK I have the following (with the name being .StartUpActivity) :
<activity android:name=".StartUpActivity" >
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
However, when I look into the generated apk from Android Studio this is modified to :
<activity android:name="be.abc.android.StartUpActivity">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
So the name has been changed from .StartUpActivity to be.abc.android.StartUpActivity.
In the end, this is the same path but I believe the shortcut just looks at the name .StartUpActivity, and decides it is no longer available and removes the shortcut....
Can I fix this in someway that the shortcuts don't get deleted. Or that Android Studio doesn't mess with the shortened package names in the AndroidManifest.xml ?
Indeed, as soon as you modify the launcher manifest entry, the shortcut has to be recreated. To avoid such issue, you can make use of activity-alias. A step-by-step guide can be found here.

Apk installed on the device but I don't see it in the apps

I wanted to tweak a piece of sample code from API Demos group - GridLayout0. For it I created a separate project and copied GridLayout0.java into it. Now when I try to see the results of my changes, I get in the LogCat is
Uploading GridLayoutSampleTwicked.apk onto device '0388920542204257'
Installing GridLayoutSampleTwicked.apk...
Success!
/GridLayoutSampleTwicked/bin/GridLayoutSampleTwicked.apk installed on device
Done!
Apparently the apk is successfully installed on the device, but I don't see the app in the list of apps where I could launch it from (Wasn't it supposed to launch right after it was installed anyway?)
I am a noob, might have missed something.
If it matters, while creating the new project Eclipse asked me about the "root parent." I had to link it back to the API Demos package because Eclipse wouldn't let me proceed with the new project.
verify if this element exist in your main activity on manifest.xml :
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
Yes, this part was missing. Adding this and deleting the snippet I gave below launched the app as I wanted it to.
Eclipse generated this code and I don't quite understand what it does
<meta-data android:name="android.support.PARENT_ACTIVITY"
android:value="com.example.android.apis.view.GridLayout0" />

Flex Native Extension with Dropbox API for Android

I´m trying to develop a Native Extension for Flex in order to use the Dropbox API for Android. I have already tried this dropbox-r33 module for FLEX but it`s deprecated for Android 4, so this is not a solution for me.
I have already an ANE with Vibration and Dropbox connection. Vibration works perfectly (example from the web) and I tried to include the functions to use Dropbox API for Android (I have already tested it in an Android project and it works).
The problem is that I´ve been force to unpack the classes from the .jars needed in the Dropbox API in order that my ANE recognizes them but I´m getting this error:
05-29 12:02:21.489: I/ConnectionError(5798): android.content.ActivityNotFoundException: Unable to find explicit activity class {air.TestVibrationExtension.debug/com.dropbox.client2.android.AuthActivity}; have you declared this activity in your AndroidManifest.xml?
where TestVibrationExtension is my ANE´s project name. My package name is air.extensions and in that folder I have included the unpacked dropbox api classes (under air.extension.com and air.extensions.org).
Who has worked with Dropbox API knows that in the AndroidManifest you have to include the following activity declaration:
<activity
android:name="com.dropbox.client2.android.AuthActivity"
android:configChanges="orientation|keyboard"
android:launchMode="singleTask" >
<intent-filter>
<!-- Change this to be db- followed by your app key -->
<data android:scheme="db-myAppKey" />
<action android:name="android.intent.action.VIEW" />
<category android:name="android.intent.category.BROWSABLE" />
<category android:name="android.intent.category.DEFAULT" />
</intent-filter>
</activity>
I think the error is related to that activity declaration but I don´t know what to do in order my ANE recognizes it.
Help please!
Dropbox-r33.swc module works but it is necessary to upload AIR library to it latest version. Doing it works on every Android platform perfectly.

Categories

Resources