Blacksmith’s Knife
Blacksmith’s Knife
Blacksmith knife. Playing around with adding some embellishments to the handle. Sort of a prototype.
Blacksmith knife. Playing around with adding some embellishments to the handle. Sort of a prototype.
If this:
java.lang.NoSuchMethodError: No static method metafactory(Ljava/lang/invoke/MethodHandles$Lookup;Ljava/lang/String;Ljava/lang/invoke/MethodType;Ljava/lang/invoke/MethodType;Ljava/lang/invoke/MethodHandle;Ljava/lang/invoke/MethodType;)Ljava/lang/invoke/CallSite; in class Ljava/lang/invoke/LambdaMetafactory; or its super classes (declaration of 'java.lang.invoke.LambdaMetafactory' appears in /apex/com.android.art/javalib/core-oj.jar)
Do this:
android {
...
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
}
kotlinOptions {
jvmTarget = '1.8'
}
}
Android “App isn’t installed” error.
Ensure export=true
is set on your Activity in the manifest
Convert .cer
to .crt
openssl x509 -inform DER -in <certificate>.cer -out <certificate>.crtÂ
Generate the SHA256
hash:openssl x509 -pubkey < <certificate
>.crt | openssl pkey -pubin -outform der | openssl dgst -sha256 -binary | base64
You get your base64
hash pin
Adding a trusted cert to your cacerts keystore. Helps if you see an error that looks like this when trying to download some 3rd party dependencies for Android dev Unable to find valid certification path to requested target
cacerts
in the jre your AndroidStudio is configured to use. I’m using the packaged instance so I’m looking in /Applications/Android\ Studio.app/Contents/jre/jdk/Contents/Home/jre/lib/security
The password for this is “changeit
“Need to have a look at a sqlite DB in an android app. Need to grab this first.
Then do the backup (This is currently deprecated, so probably won’t be around forever, but works for now)
adb backup [your.app.package.name]
Check the phone and allow the backup
java -jar abe.jar unpack backup.ab backup.tar ""
Creates a zip where you can find the db. Open it with your favorite db app.
adb -d shell "run-as [your.app.package.name] cat /data/data/your.app.package.name/databases/[your_database.db] > /sdcard/filename.sqlite"
adb pull /sdcard/filename.sqlite
But all I get is an empty filename.sqlite
file. May need to make it work if/when the above is removed.