Android « Różności …

Różności …

25 czerwca 2019

ionic inn-app-browser ERR_CLEARTEXT_NOT_PERMITTED

Zaszufladkowany do: Android — Jacek @ 16:19

To solve the problem there’s other option. in file resources/android/xml/network_security_config.xml. insert:

<network-security-config>
   <base-config cleartextTrafficPermitted="true">
       <trust-anchors>
           <certificates src="system" />
       </trust-anchors>
   </base-config>
    <domain-config cleartextTrafficPermitted="true">
        <domain>localhost</domain>
        <domain includeSubdomains="true">192.168.7.213:8733</domain>
    </domain-config>
</network-security-config>

https://stackoverflow.com/questions/54752716/why-am-i-seeing-neterr-cleartext-not-permitted-errors-after-upgrading-to-cordo

Open the android manifest file (android/app/src/main/AndroidManifest.xml) and add
android:usesCleartextTraffic="true"

to the application tag

<application
        android:name="io.flutter.app.FlutterApplication"
        android:label="tangerine_ui"
        android:icon="@mipmap/ic_launcher"
        android:usesCleartextTraffic="true">

https://github.com/flutter/flutter/issues/30368

----------------------

config.xml:

<platform name=”android”>
<edit-config file=”app/src/main/AndroidManifest.xml” mode=”merge” target=”/manifest/application” xmlns:android=”http://schemas.android.com/apk/res/android”>
<application android:networkSecurityConfig=”@xml/network_security_config” android:usesCleartextTraffic=”true” />
</edit-config>

16 lutego 2018

adb devices not found

Zaszufladkowany do: Android,Programowanie — Tagi: — Jacek @ 12:04

Very likely udev is incorrectly adding your device. I too had this problem & came across a relatively simple solution.

Find your device in lsusb

$ lsusb
Bus 002 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 001 Device 003: ID 8087:0a2b Intel Corp.
Bus 001 Device 002: ID 05c8:03a2 Cheng Uei Precision Industry Co., Ltd (Foxlink)
Bus 001 Device 006: ID 18d1:4ee7 Google Inc.
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub

Point of interest in this case:

Bus 001 Device 006: ID 18d1:4ee7 Google Inc.

Check out the corresponding device file

$ ls -l /dev/bus/usb/001/006

Likely you will see something like

crw-rw-r-- 1 root root 189, 5 Sep  8 21:47 /dev/bus/usb/001/006

This which means that the device file will be owned by the user root and the group root, which is why adb can access it as root but not as your standard user.

This can be solved by creating a new udev rule – I used /etc/udev/rules.d/51-android.rules- to add the device to the group plugdev, which adb already assumes you to be a member of (you shoukd be, check using id)

SUBSYSTEM=="usb", ATTR{idVendor}=="18d1", ATTR{idProduct}=="4ee7", MODE="0660",
GROUP="plugdev", SYMLINK+="android%n"

**Remember to replace the ATTR{idProduct}==”4ee7″ with your own product id that you found out in step one. ** (If your vendor isn’t Google Inc., also replace the vendor id with the one before the colon in lsusb).

Now just unplug your device and plug it back in (udev should automatically respond to the new file) and tadaa:

$ adb devices
List of devices attached
YC873P0G    device
SOURCE:
https://askubuntu.com/questions/908306/adb-no-permissions-on-ubuntu-17-04

Android – enable the developer options. Phone/Tablet

Zaszufladkowany do: Android,Programowanie — Tagi: — Jacek @ 11:02

First, you must enable the developer options:

  1. Open the Settings app.
  2. (Only on Android 8.0 or higher) Select System.
  3. Scroll to the bottom and select About phone.
  4. Scroll to the bottom and tap Build number 7 times.
  5. Return to the previous screen to find Developer options near the bottom.

Open Developer options, and then scroll down to find and enable USB debugging.

7 lutego 2018

Android Studio Font Size

Zaszufladkowany do: Android — Tagi: — Jacek @ 07:35

File -> Settings -> Editor -> General -> Change font size (Zoom) with Ctrl+Mouse Wheel

7 listopada 2017

Android shortcuts

Zaszufladkowany do: Android,Programowanie — Tagi: — Jacek @ 11:23

Ctrl + Shift + Space – code completion

Ctrl + Space – code completion

Ctrl + O – override methods

Shift + F6 – rename classes, methods, variables

30 października 2017

Android cert export

Zaszufladkowany do: Android,Programowanie — Tagi: — Jacek @ 17:42

keytool -exportcert -list -v -alias androiddebugkey -keystore ~/.android/debug.keystore

23 marca 2017

adb android

Zaszufladkowany do: Android — Tagi: — Jacek @ 20:35

./adb root shell

./adb shell

./adb pull ‘/data/data’ /home/jsen/Pulpit/pullAndroid/

19 stycznia 2017

eglsurfaceattrib error 0×3009 – android

Zaszufladkowany do: Android — Tagi: — Jacek @ 18:00

go to the AVD Manager and change the settings of your device. E.g the on the section “Emulated Performance” -> Graphics to Hardware GLSE 2.0.

source: http://stackoverflow.com/questions/40566645/egl-bad-match-error-android-studio

10 września 2015

How to set the JDK for Android Studio?

Zaszufladkowany do: Android,Programowanie — Tagi: — Jacek @ 12:47

I can’t compile a default new project for Android 2.1 because(?) the JDK used by Android Studio is JDK 1.7 but it should be JDK 1.6.

To change it I go to File -> Project Structure and try to find the JDK 1.6 location.

http://askubuntu.com/questions/467870/how-to-set-the-jdk-for-android-studio

Strona startowa: www.jaceksen.pl