I've signed an app with a sign which I've created. I've installed this apk in my phone and this is ok, but when I've tried to open the app crashes (doesn't show any activity), and it doesn't give me the posibility to watch the log (this dialog doesn't have the report button)
The problem is the sign which I've signed the app. I've tested with other sign and the app opens perfectly. I can't post any information about the creation of the sign, but only I can say I've used:
Letters and _ character in alias
Letters, numbers and - character in password
50 in years
and Letters in name
others field are blank.
The main problem is that the app is published in the google play, so How I can publish a new signed apk without to unpublish this app and create a new app?
Cleaning the project solved the problem in my case.
For anyone getting this in a react-native environment, remember to bundle your js before generating the signed APK.
Easy to forget if you're using something like Android Studios GUI 🙃
Delete "gen" folder from the Project then Cleaning the project
In my case, I had to change the minifyEnabled to false in build.gradle
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
}
}
You can see this publish APK and its details like version code and version name and etc. in you developer account on google play
There is one button "Upload new APK"
Click on "Upload new APK" Button
Upload new sign APK with bug fixed
deactive current APK
Active new apk
Note : Don't change package name for new APK
Another possible cause (as was the case for me) is using the wrong JDK/JRE version when building your signed APK.
If you're using Eclipse, check Window -> Preferences -> Java -> Installed JREs and see which one is checked as the default. Android is not yet compatible with Java 8.
I had the same problem today and for me it turned out the reason was:
I used void blaMethod() in my Java code which I tried to call by onClick methods of XML Buttons. I had to learn that these methods need to be public void ... - I usually do that, but this time I got a little sloppy.
The strange thing is: my unsigned APK worked perfectly fine on all my devices, but the signed one just crashed when using those methods (could not find method (view) in a parent or ancestor context). Don't get why that is...
May this help someone!
Greets
You can simply create a new keystore if you are in testing
Or simply in my case retype the password
Related
i am trying to implement the force update feature using app center, i have followed their documentation found here and it doesnt seem to work at all
here's the code inside the App Class
AppCenter.start(
getApplication(), {APP SECRET HERE}, Crashes::class.java,
Distribute::class.java, Analytics::class.java
)
and i have tried uploading a build like this then downloading first, and after that i uploaded a newer version with higher version code / version name and set the checkbox for "Mandatory Update", i don't get any prompt at all to update when i start the app then.
Found the problem with the appcenter force update, AppCenter Distribute will not work on release mode if debuggable in gradle is set to true.
so make sure to leave it on false at the build type you will be testing on
debuggable false
adding this line before starting AppCenter showed me the logs that clued me to this.
AppCenter.setLogLevel(Log.VERBOSE)
This question already has answers here:
Your Android App Bundle is signed with the wrong key. Ensure that your app bundle is signed with the correct signing key and try again
(27 answers)
Closed 1 year ago.
I've just now started using app bundles. I've set the two certificates in the App signing section of the dashboard (signing certificate and upload certificate).
I've built an app bundle and signed it with the upload certificate, but when I upload the bundle under Android Instant Apps (which is in fact the reason I switched to app bundles) it says that:
Your Android App Bundle is signed with the wrong key. Ensure that your app bundle is signed with the correct signing key and try again: xx:xx:xx:xx.....
I've manually checked the SHA-1 of the upload keystore (using keytool in the terminal) and it matches the xx:xx:xx.... it says in the error message.
What am I doing wrong? The app bundle IS signed with the required upload certificate, but google play doesn't seem to like it.
Ideas?
The solution was a very basic one. I had to clean my project and then rebuild it.
Android Studio was signing my app bundle with the old certificate i was using.
What I did previously is go to Build -> Generate Signed Bundle / APK and i changed the jks file in the file selector to the new upload jks. It seems Android Studio caches the old certificate path and uses it even though I've selected a new one. Might be a bug in AS.
So yeah ... now if I clean the project every time i change the jks file it works, the apk or app bundle gets signed with the proper certificate...
I see there are an answer but in my case I forgot to remove
debuggable = true
from app build.gradle
I tried using the multiple answers here & in this question, but somehow I was getting this error because I had some issues with my android/app/build.gradle and android/gradle.properties files.
Two things you should check (in addition to the other solutions here) are:
In android/gradle.properties and android/app/build.gradle, make sure your keystore variables match exactly.
In android/gradle.properties, you probably have something like this:
MYAPP_RELEASE_STORE_FILE=<>
MYAPP_RELEASE_KEY_ALIAS=<>
MYAPP_RELEASE_STORE_PASSWORD=<>
MYAPP_RELEASE_KEY_PASSWORD=<>
Make sure these variable names exactly match those in android/app/build.gradle:
android {
...
signingConfigs {
release {
if (project.hasProperty('MYAPP_RELEASE_STORE_FILE')) {
storeFile file(MYAPP_RELEASE_STORE_FILE)
storePassword MYAPP_RELEASE_STORE_PASSWORD
keyAlias MYAPP_RELEASE_KEY_ALIAS
keyPassword MYAPP_RELEASE_KEY_PASSWORD
}
}
}
}
In android/app/build.gradle, make sure you set signingConfig to signingConfigs.release in your release buildTypes:
android {
...
buildTypes {
debug ...
release {
signingConfig signingConfigs.release
}
}
}
Note: If you're doing react-native development and found yourself here, make sure you follow all steps on "Publishing to Google Play Store". I thought I could skip a few steps without causing problems, and that led to hours of debugging
In my case the issue was Android App bundle, I had forgotten to increment the versionCode for the project and it was not showing that error on the console. Instead, it was showing the error related to certificate SHA.
After a little bit of searching, I found that I accidentally had testCoverageEnabled true in my release build type.
release {
testCoverageEnabled true
...
}
This will make the APK / App Bundle debuggable, and Google Play Console will consider it's not signed. Removing this resolved the issue.
App bundles are just signed using the same format as jarsigner. So you can check the cert hash of your app bundle signature yourself. For example, on linux:
zipinfo -1 ${APK?} \
| grep -E "META-INF/.*(RSA|DSA|EC)$" \
| xargs -I{} unzip -p ${APK?} {} \
| keytool -printcert
If the output from this shows a signature that does match the correct signing key, then there is a bug in Play store, and you should escalate to Play Console support. This is available on the help menu on the Play Console.
On the other hand, if the certificate doesn't match, then even though you think you are signing with the right keystore/key you are doing something wrong, and the app bundle is not signed with the correct upload certificate.
I faced this error because :-
I created a new key for testing and then generate a app bundles/apk
That apk/app bundle had some error so after resolving that error again I created a new key and made a brand new app bundles/apk in which this error occur
so if you did something like this then try to provide a path of first key made with project ,in key store path with same Password and same key alias
This will work because we can only have a one key for a project which is the first key generated. and every time when you want to make a apk/app bundles of your app for publishing/updating purpose you have to provide a same key and password therefor it is highly recommended to store key on safe place
Note:- in some cases(if you already have multiple failed tries) you may face something like "you already have one with same version" error on play store console in that case, in build.gradle file just increment versionCode and versionName no by one and regenerate apk/app bundles
In my case, I upload the wrong application with the same name. Just make sure you upload the same applicationId than previous one.
For me, what went wrong was that, in my google play console, I had already opted in to play app signing, so when I first uploaded the aab, google registered and signed my app for subsequent releases. This means if i upload another aab, the signed certificate will be different from the one google signed.
I needed to delete this so I upload another aab. In other to do this, I had to click on my profile and select manage developer accounts. I saw the drafts of my aab google has signed, I deleted this so that I can generate and reupload another one.
When I deleted it, I then generated another aab from my android studio and uploaded it again to my google play console. This time, it did not give me the warning for wrong signing key
How do I get rid of console logs from an ionic 2 release application?
I am developing an ionic 2 app. When I build the release apk and run on a device, I can still attach to the process from chrome://inspect, and view console logs. I have tried removing the cordova-plugin-console, but that makes no difference.
Edit: I found a package that can remove console logs: https://www.npmjs.com/package/remove-console-logs
Just not sure how I can use it to automatically remove them when I build release. Please help.
Thanks.
You can use uglifyjs.config.js for drop all console logs when is a production build.
1 . Copy uglifyjs.config.js from node_modules into your project folder
2 . In the new config file set the flag drop_console to true if production
var isProduction = process.env.IONIC_ENV === 'prod';
...
compress: {
drop_console: isProduction
}
3 . Set your custom configuration in the package.json
"config": { "ionic_uglifyjs": "uglifyjs.config.js" },
And that's all !
If you can still connect with the debugger then it is not a release build - sounds like you may be unintentionally installing the debug build OR connecting to some other app.
EDIT; Above is not necessarily true - there are instances where you can debug the js/html/css content via chrome in a release build ; specifically if the webview debuggability flag is set in code / not set by the build system etc. - this flag is seperate from the application debug flags so if not properly set you will be able to debug a "release" build / not be able to debug a "debug" build - see remote debugging webviews.
END OF EDIT.
( note you have to sign a release build before it will install )
Is it possible the release install failed and you're still looking at a previous debug build ?
Assuming you have a release build and can't connect to see logs via chrome inspect then ;
console.log calls will still be in the release build unless you comment them out - and possibly visible in other ways eg. android tools sdk\tools\monitor - The only way to be sure they aren't visible is to comment them out. You could use something like ;
console.log = function(){} ;
at the end of your device ready function after any plugins have done anything they're likely to do - though there's still no 100% guarantee with this as a badly behaving 3rd party plugin or library might reassign it later and then your calls will still happen - to be absolutely sure you will need to comment them out.
Have you tried remove console logs ?
cordova plugin rm cordova-plugin-console
Then
cordova build --release android
I am using caldroid library for calendar activity and It works fine.
But I needed to change it's style.
So I added caldroid library(directory) under the application like this.
and I changed my dependencies
dependencies {
...
compile 'com.roomorama:caldroid:2.3.1'
...
}
to
dependencies {
...
compile project(':libraries:caldroid')
...
}
Then, It works fine under the debug mode.
But I can't generate signed APK because of this message.
Error:Execution failed for task ':app:validateExternalOverrideSigning'.
Keystore file /Users/xxxxxxx.android.keystore not found for signing config 'externalOverride'.
Is there any solution about this error?
I had this same problem here. The point is that when you created your KeyStore, Android Studio sent it to another place, different from the path of your app. Probably she was saved in
suaHome/documents/android-studio/bin
Just search it in this place and ready. Everything is solved. Tip: never miss this KeyStore view after you publish your APP with it. I have helped.
I find android studio -> Build -> Generate Signed APK -> Next -> key store path(if you Create new.. then it will be a key name only, SO to fix it(Choose existing),then key store path will be on Absolute address. In end it will be OK.
On OSX Sierra (v10.12.3), Android Studio (v2.3) create the KeyStore in:
Macinthosh HD/Applications/Android Studio/Contents/bin
Move the KeyStore in your app directory, and you can create APK
As of Studio 2.3.3 by default, it creates the file under Android Studio\jre\jre\bin\.
I have published my app in alpha mode. But i am getting this response while licensing my application. I have set the test accounts as well.I have set the License Test Response as "Licensed". But still getting the Not_Market_Managed error.Please help
Make sure you have incremented your version code in your app build.gradle file. If you are trying to publish a new version of your app and the version code is the same, you cannot publish.
I had a similar story. In my case, I added a new flavor and applicationIdSuffix so the package name changed. I thought that the problem was that the application was not uploaded into the play market but when uploading it got an error :
"Upload failed
Your APK needs to have the package name _my_old_packagename_ ". Then I commented out the applicationIdSuffix and the problem was solved. The application did not even need to be uploaded since the application ran under the published account.