Android Studio couldn't see Androidmanifest.xml after adding Google Maps - android

My iOS app is working very well but after I edited Android Manifest and added Google Maps information, my Android app at first was working but it couldn't connect with Google Maps. I edited it again and after that I changed with previous saved one that I had but now I send you the final error that Android Studio shows me, please help to fix this problem.
The error is this:
zipro W 09-13 09:36:37 8721 108688 Error opening archive
/Users/johnhabibpour/StudioProjects/08-19-2021
AM/absolutestonedesignpro/build/app/outputs/flutter-apk/app.apk:
Invalid file ERROR: dump failed because resource AndroidManifest.xml
not found Failed to extract manifest from APK: ProcessException: The
command failed Command:
/Users/johnhabibpour/Library/Android/sdk/build-tools/31.0.0/aapt dump
xmltree /Users/johnhabibpour/StudioProjects/08-19-2021
AM/absolutestonedesignpro/build/app/outputs/flutter-apk/app.apk
AndroidManifest.xml. No application found for
TargetPlatform.android_x86. Is your project missing an
android/app/src/main/AndroidManifest.xml? Consider running "flutter
create ." to create one.

Related

Android studio throwing error Invalid packageName while trying to run the app

I am having one android project with diffrent build flavours like "Debug,release,SIT,UAT,...".Based on the build variant the package name is changing(Dynamic).Like if i select SIT the package name would be com.abc.xyz.SIT and if i will select UAT it will be like com.abc.xyz.UAT.(Suffix).
This is working very fine previously,Suddenly it stopped working with an error as below
2022-12-30 15:46:32.988 562-4108 ActivityManager system_process W Invalid packageName: com.mbb.mketrade.sit 2022-12-30 16:24:03.265 562-932 ActivityManager system_process W Invalid packageName: com.mbb.mketrade.sit
Surprisingly...I am able to generate the signed bundle and apk from the same source code from the android studio and can run the exported apk/bundle to the emulator but when i am trying to run it manually by hitting "Run" option it always give me error "INVALID PACKAGE NAME".
I have tried couple of steps as google suggested as below without luck.
1)Checked my manifest and build.gradle file where i have. not changed anything.
2)Tried creating a new emulator
3)tried invalidating caches and restarted the emulator.
I am still looking for any solution.Can anyone please help me on this.
I have attached my run configurations.
Run Configuration
Thank you everyone.

Error at installing my app on mobile for testing

my package name is com.example.project name but to upload it on google console for publishing it.I change it to com.ahsan.project name, now when i am trying to run it on my mobile it is showing me this error....
already have tried to revert back to old changes but it is not working.still getting the same result.
Run Window
Unknown failure: Exception occurred while executing:
java.lang.IllegalArgumentException: Unknown package: com.example.ethlon
at com.android.server.pm.Settings.getInstallerPackageNameLPr(Settings.java:5051)
at com.android.server.pm.PackageManagerService.getInstallerPackageName(PackageManagerService.java:27786)
at com.android.server.pm.PackageManagerService.isOrphaned(PackageManagerService.java:27792)
at com.android.server.pm.PackageManagerService.deletePackageVersioned(PackageManagerService.java:23919)
at com.android.server.pm.PackageInstallerService.uninstall(PackageInstallerService.java:993)
at com.android.server.pm.PackageManagerShellCommand.runUninstall(PackageManagerShellCommand.java:912)
at com.android.server.pm.PackageManagerShellCommand.onCommand(PackageManagerShellCommand.java:134)
at android.os.ShellCommand.exec(ShellCommand.java:96)
at com.android.server.pm.PackageManagerService.onShellCommand(PackageManagerService.java:28572)
at android.os.Binder.shellCommand(Binder.java:581)
at android.os.Binder.onTransact(Binder.java:481)
at android.content.pm.IPackageManager$Stub.onTransact(IPackageManager.java:3209)
at com.android.server.pm.PackageManagerService.onTransact(PackageManagerService.java:5078)
at android.os.Binder.execTransact(Binder.java:682)
Error while Installing APKs
this error happen because
your package name not the same in all project
search and update your package to be the same
Most of the time this error came due to Changes in file location in Project folder.
To solve this problem you just have to open whole project again as a new Project.
Steps-
File-Export To Zip File (save as new zip file).
Unzip the zip file.
Go to Open and select the location of unzip file.
Now try to run app on device.

Error with Uploading APK to Google Play

Upload failed:
Your APK cannot be analyzed using 'aapt dump badging'. Error output:
to run aapt dump badging:
W/ResourceType(12713): Bad XML block: header size 28024 or total size 1702240364 is larger than data size 3783
ERROR: AndroidManifest.xml is corrupt
This is the error I am getting when I attempt to upload an APK onto Google Play and am completely unsure of what to do. I have looked at other posts but am unable to fix my problem. Any help is appreciated!!
-- Moksh
Is your apk run on emulator or device..?
Clean and build your project again. Sign it with your very own keystore and then try to upload it.
Make sure following points are need to be taken care of while uploading file on android market
"android:versionCode" attribute from AndroidManifest.xml is proper.
"android:versionName" attribute from AndroidManifest.xml is proper.
The package name is very unique,. Because all the apps on android market are separated by the package.

Can't update my app in Google Play: aapt error

Today when I tried to upload an update of my app, I got this from Google Play console:
UPLOAD NEW APK TO PRODUCTION
Upload failed Your APK cannot be analyzed using 'aapt dump badging'.
Error output: Failed to run aapt dump badging: ERROR getting
'android:value' attribute for meta-data:attribute could not be found
I can upload normally before. I haven't made any change in AndroidManifest.xml.
The app is built via ant. I also tried building it again, even with the last-known-good code, the same error occurs.
Should I report this to Google Play team, or is it a known issue of Google Play?
Is there any work around?
It's now acknowledged by Google:
Some developers have reported seeing the error "Failed to run aapt dump badging: ERROR getting 'android:value' attribute for meta-data:attribute could not be found" when attempting to upload their .apk.
We're working on solving this problem. In the meantime, you can try adding the "android:value" to any meta-data manifest property that lacks that attribute. See API Guides - for more information.
https://support.google.com/googleplay/android-developer/known-issues/24493
I had the exact same problem, but managed to fix it now.
The problem is definitely in your manifest file. For me it was the Samsung MultiWindow feature. I found the solution here: Google Code Issue 46311
I had to change
<meta-data android:name="com.sec.android.multiwindow.DEFAULT_SIZE_W" android:resource="#dimen/app_defaultsize_w"/>
<meta-data android:name="com.sec.android.multiwindow.DEFAULT_SIZE_H" android:resource="#dimen/app_defaultsize_h"/>
into
<meta-data android:name="com.sec.android.multiwindow.DEFAULT_SIZE_W" android:value="632dp"/>
<meta-data android:name="com.sec.android.multiwindow.DEFAULT_SIZE_H" android:value="598dp"/>
Worked fine since yesterday, but now i had to change it.
Hope it helps.
Same problem here after generating new apk for alpha release with same certificate I get the error (in Dutch):
Upload mislukt
Uw APK kan niet worden geanalyseerd met 'aapt dump badging'. Foutuitvoer:
Failed to run aapt dump badging:
ERROR getting 'android:value' attribute for meta-data:attribute could not be found
I found one place in my Manifest where I use android:value for samsun multiwindow support.
<meta-data
android:name="com.sec.android.support.multiwindow"
android:value="true" />
I removed that from the Manifest. generated new apk (after project clean rebuild) and got the same error. This Manifest worked in my apk when uploading a previous version two weeks ago.
Use
android:name="some string value"
Instead of
android:name="#string/name_of_string_resource"
In my case, when building for ionic I forgot to add the .aab extension in the command land
I entered this into the cmd line
zipalign -v 4 app-release.aab appname_2.0.0
instead of
zipalign -v 4 app-release.aab appname_2.0.0.aab

Gradle Error for Android Studio

I'm trying out Android Studio on OS X and am running into a mysterious error message. I went through the Google guide to building a simple UI, but when I finished writing the XML file and hit Run in the IDE, I get the following message ("Test2" is the name of the project):
Gradle: Execution failed for task ':Test2:validateDebugSigning'.
> Could not find matching constructor for: org.gradle.tooling.BuildException(java.lang.String)
I have never developed an android app before, so I don't know how common this is. I did a search for this error and found no one encountering the same problem.
I tried the solution from Abhan and I get a new error message:
Error: org.jetbrains.plugins.gradle.settings.GradleSettings cannot be cast to org.jetbrains.plugins.gradle.settings.GradleSettings
It warns you that android plug-in task validateDebugSigning cannot access the debug key. Check your accessibility to the debug.keystore.
On linux or OS X, the default location is ~/.android. On windows, it's in C:\Documents and Settings\.android\ or C:\Users\.android.

Categories

Resources