» android の記事

~ google console keystore to facebook keyhash ~

connie 2019.10.08 | android | | No Comments

convert sha-1 hash (from google) to base64 hash for facebook

install xxd in centos
yum install vim-common

echo 33:4E:48:84:19:50:3A:1F:63:A6:0F:F6:A1:C2:31:E5:01:38:55:2E | xxd -r -p | openssl base64

Output:
M05IhBlQOh9jpg/2ocIx5QE4VS4=

copy this to facebook console

1)clean project rebuild

2)restart android studio

3)File->Invalidate cache and restart

4)open android terminal
first time use Gradle have to change the permission
chmod +x gradlew
./gradlew compileDebugSource –stacktrace -info
then see the error for details

Please add this to AndroidManifest.xml:
<uses-library
android:name="org.apache.http.legacy"
android:required="false" />

~ android logcat missing filter gone ~

connie 2019.07.29 | android | | No Comments

-logcat setting change it to floating mode and disable the floating mode, and double click the logcat bar to resize the logcat, it i will appear again

-if still cannot fix restart android studio and retry

~ apk check package name and permission ~

connie 2019.07.15 | android | | No Comments

aapt.exe dump badging [path-to-apk]

~ Android studio create an aar library ~

connie 2019.07.08 | android | | No Comments

Create a project
File->new->new module->android Library

create a class , and modify string.xml for testing

之後打開gradle

assemble then it will create 2 aar

Create a new project>change to project view, insert the aar file to app>libs folder

and change the gradle(apps)

try to execute the apps

~ fix Mac terminal cannot use aapt ~

connie 2019.06.21 | android, Mac OSX | | No Comments

cd ~
touch .bash_profile
nano .bash_profile

AAPT_HOME=/Users/xxx/Library/Android/sdk/build-tools/28.0.3
export AAPT_HOME
export PATH=$PATH:$AAPT_HOME

~ android studio view 2 files side by side ~

connie 2019.06.03 | android | | No Comments

Android resource linking failed
xxx/res/layout/login_landscape.xml:2: error: attribute layout_constraintBottom_toBottomOf (aka xxx:layout_constraintBottom_toBottomOf) not found.

~ android button action example ~

connie 2019.05.30 | android | | No Comments
ImageButton registerBtn;

registerBtn = (ImageButton)findViewById(R.id.loginBtn) ;

registerBtn.setOnClickListener(new View.OnClickListener() {
public void onClick(View v) {
Log.d("test","connie");
}
});
« Previous Page | HOME |

Smiley face

December 2019
S M T W T F S
« Oct    
1234567
891011121314
15161718192021
22232425262728
293031