Building signed APK failure - java

I'm trying to build a release signed Android app bundle file for my android app but I keep getting a Failed to start monitoring R9JN502ET6J notification at the Event log.
Might I be inputting the wrong password for my .jks file ?
I have tried to invalidate caches and restart but still getting the same output at Event log.

Related

Platform signed OTA updater app for android

Trying to build an app for updating android OS built from source. Even after signing the app with the platform key, the method RecoverySystem.installPackage(context,file) when applied on an updatefile placed in '/data/cache' gives error that writing to /cache is not permitted for the app. Also, an SElinux error is thrown for trying to access /cache partition.
The app holds the necessary permissions android.permission.RECOVERY, android.permission.REBOOT and android.permission.ACCESS_CACHE_FILESYSTEM
Going through the source code, the lines
...
FileWriter uncryptFile = new FileWriter(UNCRYPT_PACKAGE_FILE);
try {
uncryptFile.write(filename + "\n");
} finally {
uncryptFile.close();
}
...
in RecoverySystem.installPackage() triggers the error.
(http://androidxref.com/9.0.0_r3/xref/frameworks/base/core/java/android/os/RecoverySystem.java#562)
Even though the error is displayed, the device still reboots to apply update but the recovery shows "no command" screen most probably as no commands are written to /cache/recovery
the OS build is user build and thus not rooted.
am i missing something? is there any other way for a platform signed app to install firmware updates for the user build?
Similar : Android development RecoverySystem.installPackage() cannot write to /cache/recovery/command permission denied

Android Studio error "Internal error when trying to read zip file"

i'm a beginner in android studio (first time). I have this problem after i created empty activity then run with real device (mobile phone).
I hope some one can help me. Thank you.
More information
My device run on android 5.1 and connect with usb
Android studio v. 3.0.1
่JDK v. 9.0.4
JRE v. 9.0.4
Original code (empty project template)
I got the following message in the console.
Error:java.lang.RuntimeException: Internal error when trying to read zip file 'C:\Users\Jimmy.gradle\caches\transforms-1\files-1.1\support-core-ui-26.1.0.aar\3ac945728978df452e7f8cdd66ea71d9\jars\classes.jar'.
Error:com.google.common.base.VerifyException
Error:Execution failed for task ':app:transformClassesWithDexBuilderForDebug'.
com.android.build.api.transform.TransformException: java.lang.RuntimeException: java.lang.RuntimeException: Internal error when trying to read zip file 'C:\Users\Jimmy.gradle\caches\transforms-1\files-1.1\support-core-ui-26.1.0.aar\3ac945728978df452e7f8cdd66ea71d9\jars\classes.jar'.
Attached Images

Android Studio, unable to access data folder for database file on emulator

Ok, I have searched and searched without any success for someone with a similar question. I am developing an Android app using Android Studio and have started creating my SQLite database. In order to test my creation and upgrade functions I would like to extract my SQLite database and view it's contents.
Instructions online are fairly clear, open up Android Device Monitor, select the device, go to file explorer, and then browse a few levels deep in the data folder to find your .db file. Here is where the trouble starts. I am unable to expand the root level data folder at all. I have found numerous other questions regarding people having the same problem but they are all due to people trying to do it on un-rooted physical devices. I am simply trying to do it on an emulated device. I am certain it is a permissions problem but I'm not sure how to fix it.
Things I've tried:
Verified that my app is listed as a process on the device selected in the device monitor.
Restarted the AVD, Android Studio, and then my entire machine.
Uninstalled my app and reinstalled.
TLDR; can't access data folder in DDMS for emulated device in order to extract SQLite database file.
Same question to me.
When I want to access /data directory via Android Device Monitor, some error have occurred :
08-21 07:32:36.837: W/ls(3101): type=1400 audit(0.0:50): avc: denied { getattr } for path="/default.prop" dev="rootfs" ino=2941 scontext=u:r:shell:s0 tcontext=u:object_r:rootfs:s0 tclass=file permissive=0
08-21 07:32:37.418: W/PlatformStatsUtil(2507): Could not retrieve Usage & Diagnostics setting. Giving up.
This information tells us we don't have permission to access the directory.
Here are what I have done and works for me.
My OS is Window10
Start your ADV & Open Android Device Monitor
cd to /the/path/to/Android/sdk/platform-tools
Open your cmd or openshell here (shift + right click you will see the option)
execute following commands
.
./adb.exe shell
su
chmod -R 777 /data/data/your/package
Now, enjoy your coding.
Run your app in an emulator with API 23 (or lower).
check detailed information in link below,
Android Device Monitor "data" folder is empty

Failed to read key AndroidDebugKey from store "C:\Users\....\.android\debug.keystore": Invalid keystore format

I am trying to publish a simple project in android studio .so i go to menu>build>build apk .but i get this error :
Error:Execution failed for task ':app:packageDebug'.
> Failed to read key AndroidDebugKey from store "C:\Users\ehsan\.android\debug.keystore": Invalid keystore format
I am so new in android studio
I'm also facing same issue. for mine getting this type of issue, when I run app with my physical device.
Solution
Delete .android (path:C:\Users{your pc name}) folder in your work space then try with step by step process.
good luck

Android Market - Error While Uploading APK file

Just now I have developed an application and now I am ready to upload it to Android market,
but when I am trying to upload, it shows the following error message:
Market does not accept apk signed with the debug certificate. Create a new certificate that is valid for atleast 50 years. Market requires that the certificated used to sign the apk be Valid until at least October 22, 2033. Create a new Certificate.
Now how do I fix this problem, so that I can upload the APK file to Android market successfully?
While developing and testing, you can compile in debug mode(debug certificate).
When your application is ready for release, you must compile in release mode and then sign the .apk with your private key.
The following link gives will help you
http://developer.android.com/guide/publishing/app-signing.html

Categories