Migrate to AndroidX - Android Q&A, Help & Troubleshooting

Hello everyone ... I start by saying that I'm rincoxxxnendo .... my apps worked so well with the target sdk 27 ​​... now playstore wants to break the attributes by forcing the target sdk 29.
So to switch to target sdk 29, you need to request the migration to AndroidX (using the appropriate button on the menu).
After the necessary checks, android studio migrates the entire project to AndroidX ... the problem now is that my applications no longer work on the cell with api level 29 (ie Samsung s10), .. while they seem to work perfectly with android systems up to 28 ...
Are there any well-made guides to make the migration happen? what am I doing wrong? is it enough to download api 29 on android studio and migrate? or need to manually fix something else ????

Related

[Q] AVD Simulation Issues

Hey guys,
This is my first time developing apps for a device, please don't be too callous.
Prior to the release of Android Studio I was having a crack at eclipse with the android SDK and attempting to utilise the AVD simulator rather than the actual Galaxy Nexus I have right beside me. My issue was in fact the same as to when I converted to Android Studio, a rather consistent error:
Code:
Waiting for device.
C:\Android\android-studio\sdk\tools\emulator.exe -avd GalaxyNexus -netspeed full -netdelay none
Device connected: emulator-5554
Device is online: emulator-5554
Target device: emulator-5554 (GalaxyNexus)
Uploading file
local path: C:\Ryan\Android\MyFirstApp\build\apk\MyFirstApp-debug-unaligned.apk
remote path: /data/local/tmp/com.example.myfirstapp
Adb Transfer Protocol Error.
No such file or directory
The AVD Simulator boots up, Android Labels displays then fails after a matter of seconds. i understand the issue is obviously not related to the IDE hence why both eclipse and Android Studio are doing the same thing.
I Created an AVD with the following Properties:
Code:
Name: GalaxyNexus
Device: Galaxy Nexus (4.65"...etc
Target: Android 4.2.2 - API Level 17
CPU/ABI: greyed out as "ARM..."etc
Keyboard enabled
Skin enabled
Front Camera None
Rear Camera None
Memory options
- Ram: 512
- VM Heap: 64
- Internal Storage: 8 GiB
- SD 128MiB
Emulation options both left unchecked
Greyed out button for "Override the extisting AVD with the same name"
The basic default hello world app actually runs fine on my galaxy nexus on 4.2.2.
Not sure of my issue, I would assume configuration, though couldn't be sure.
Thanks ahead.
ryanspacef said:
Not sure of my issue, I would assume configuration, though couldn't be sure.
Thanks ahead.
Click to expand...
Click to collapse
Go to SDK Manager and hit the Install button. Mine still had 5 missing packages, including the ARM ABI, which would also explain why the AVD didn't boot. Hope this helps.
ryanspacef said:
Hey guys,
This is my first time developing apps for a device, please don't be too callous.
Prior to the release of Android Studio I was having a crack at eclipse with the android SDK and attempting to utilise the AVD simulator rather than the actual Galaxy Nexus I have right beside me. My issue was in fact the same as to when I converted to Android Studio, a rather consistent error:
Code:
Waiting for device.
C:\Android\android-studio\sdk\tools\emulator.exe -avd GalaxyNexus -netspeed full -netdelay none
Device connected: emulator-5554
Device is online: emulator-5554
Target device: emulator-5554 (GalaxyNexus)
Uploading file
local path: C:\Ryan\Android\MyFirstApp\build\apk\MyFirstApp-debug-unaligned.apk
remote path: /data/local/tmp/com.example.myfirstapp
Adb Transfer Protocol Error.
No such file or directory
The AVD Simulator boots up, Android Labels displays then fails after a matter of seconds. i understand the issue is obviously not related to the IDE hence why both eclipse and Android Studio are doing the same thing.
I Created an AVD with the following Properties:
Code:
Name: GalaxyNexus
Device: Galaxy Nexus (4.65"...etc
Target: Android 4.2.2 - API Level 17
CPU/ABI: greyed out as "ARM..."etc
Keyboard enabled
Skin enabled
Front Camera None
Rear Camera None
Memory options
- Ram: 512
- VM Heap: 64
- Internal Storage: 8 GiB
- SD 128MiB
Emulation options both left unchecked
Greyed out button for "Override the extisting AVD with the same name"
The basic default hello world app actually runs fine on my galaxy nexus on 4.2.2.
Not sure of my issue, I would assume configuration, though couldn't be sure.
Thanks ahead.
Click to expand...
Click to collapse
Have you tried to push your apps apk manually using the adb push command? If that does not work its probably a driver issue. Also you may try changing the sdcard size to >200mb or removing it altogether and only using internal. I would also use a much smaller internal size unless your app needs it. My AVD has an internal of 256mb and no sdcard and runs fine. The AVDs are very picky and have strange issues sometimes.

Android Studio - JDK - Recommended versions and settings on Windows XP 32-bit?

My aims:
- Use Android Studio to develop a basic Android application - should be possible
- Use Android Studio to back up my physical phone (Hisense phone running Nougat 7.0) and create an emulated version of it running on my PC - should be possible, is it?
My PC:
- Windows XP 32-bit
- Pentium Dual Core T2330 processor NOT supporting Intel® Virtualization Technology (VT-x)
- 2 GB RAM
Questions:
- Are the above aims possible to achieve with my PC?
- If yes, what are the recommended Android Studio and Java SE Development Kit versions/settings to use that work for sure?
Story: I have tried to use Android Studio 3.0.1 with various versions of Java SE Development Kit 8 (including 121, 144, and 152) and various settings/hacks constantly running into various bugs/issues, most of which were seemingly resolved by new settings/hacks, yet I ended up with the same error messages after I have tried everything I have found online that nice people suggested on forums.
I am unable to even compile and run a default Android app, I get these error messages:
Gradle build finished with 2 error(s) in 21s 591ms
Error:java.util.concurrent.ExecutionException: java.lang.RuntimeException: No server to serve request. Check logs for details.
Error:Execution failed for task ':app:mergeDebugResources'.
> Error: java.util.concurrent.ExecutionException: java.lang.RuntimeException: No server to serve request. Check logs for details.
I am unable to run a default-loaded Android Virtual Device, I get this error message:
Emulator: Process finished with exit code -1073741511 (0xC0000139)
I am clueless how to continue. If my aims are possible to achieve, could someone tell me the Android Studio and JDK versions and settings that work 100% under 32-bit Win XP?
Thanks in advance!

Custom iMX8 board with Android 10, how to develop with C++ a I2C background service?

I have a specific client request where there is a custom carried board which is controlled by a iMX8 SOM. On this board there is installed the Android system because there are specific Android applications (Java and Kotlin) which need to be run. I need to create a background service which controls specific IO peripherals (I2C, GPIOs, UART, etc...).
I suppose that in order to make a background (using the board IO peripherals) service which runs at the start of the Android OS system is to develop a C/C++ application (CMake based project) which will be cross compiled using a toolchain for the iMX8 and will be started at system boot through the "init.rc" script, right? Have you any available guide/material for such purpose so that I can begin with the best-practice solution?
I already tried using Android NDK, but I have "permission denied" errors also when installing the app in the "system/priv-app" folder (with the correct permissions).
Which is the correct way to approach this kind of project? Thank you.

What should I do if the tool package fails to run when I integrate the HUAWEI AppGallery Connect SDK to Eclipse?

Background​I had recently planned on integrating the Crash SDK to my app. However, my app was developed through Eclipse and the integration process was different from that in Android Studio.
By referring to the official materials, I downloaded the tool package and used it to generate an Eclipse project package.
However, when the build.bat file in the aar2eclipse/aar directory was executed according to the procedures in the document, an error was reported in the command line. The error information was as follows:
FAILURE: Build failed with an exception.
* What went wrong:
Task ' assembleRelease ' not found in root project ' aar '.
Problem Reoccurring​1. I first thought that the problem might be caused by my company's intranet. But when I connected to the Internet, the problem remained unsolved.
2. Then I guessed that it might have something to do with the Android development environment.
I borrowed a colleague's PC to execute the build.bat file, and it that did the trick. Therefore, I was able to conclude that the problem was caused by incorrect configurations in the Android development environment. I compared the configurations on the two PCs and found that the environment variables were different. ANDROID_HOME was missing from the environment variables on my PC.
Cause​Huawei's Eclipse tool package is unable to run properly and reports an error without the ANDROID_HOME variable.
Solution: Right-click This PC and choose Properties from the shortcut menu. In the displayed dialog box, click the Advanced System Settings tab and then click Environment Variables. In the System Variables dialog box, create a new ANDROID_HOME parameter.
Set the value to the installation path of the local Android SDK, and the problem will be resolved, as shown below.
Reference:
https://developer.huawei.com/consumer/en/doc/development/AppGallery-connect-Guides/agc-get-started#h2-1587519820720

Question EVS_APP in emulator

Hi All,
I want to try out the EVS application in the emulator and do some development there.
Here is the EVS documentation: https://source.android.com/docs/devices/automotive/camera-hal
The EVS application is the part of the packages of the Android source: https://cs.android.com/android/plat...r:packages/services/Car/cpp/evs/apps/default/
First I, wanted to have a lunch target where the emulator starts, and it seems that "sdk_car_x86_64-userdebug" targets starts the emulator using this howto: https://cs.android.com/android/platform/superproject/+/master:device/generic/car/tools/README.md
I used the android-13.0.0_r8 tag of the source.
It seems that neither EVS_APP nor its dependencies are not part of the sdk_car_x86_64 build. How can I add EVS application to the build properly?
Any information, hint is more than welcomed.
You can enable it by exporting ENABLE_EVS_SAMPLE=true or you can define in device.mk file such as
ENABLE_EVS_SAMPLE := true.
This will enable evs_app into system/bin/ folder of emulator. But I am not sure how you can use for testing in emulator

Categories

Resources