Error launching application on android sdk built for x86

There are a least a dozen previously compiled and running flutter applets that suddenly will not compile under Android Studio or Intellij. Even if i build a new default Flutter app i get this crash

There are a least a dozen previously compiled and running flutter applets that suddenly will not compile under Android Studio or Intellij.

Even if i build a new default Flutter app i get this crash error:

Clearly something has changed .. plugins/dependencies have been upgraded/updated and the .gradle and .idea directories removed … and projects rebuilt .. but nothing gets past this:

Launching lib/main.dart on Android SDK built for x86 in debug mode...
Initializing gradle...
Resolving dependencies...
Gradle task 'assembleDebug'...
Built build/app/outputs/apk/debug/app-debug.apk.
cmd: Can't find service: activity
Installing build/app/outputs/apk/app.apk...
Error: ADB exited with exit code 1
adb: failed to install/home/jedaa/workspace/flutter_apps/studio/flutter_apprescue/build/app/outputs/apk/app.apk: cmd: Can't find service: package
Error launching application on Android SDK built for x86.

asked Nov 29, 2018 at 6:07

Geoff 's user avatar

4

  1. Open AVD Manager
  2. Wipe Data (delete datas from emulator)
  3. Open emulator
  4. Try to run app

answered Feb 16, 2019 at 0:02

DomDunk's user avatar

DomDunkDomDunk

7855 silver badges9 bronze badges

4

I had a similar error when trying to run my flutter application. What I did was:

  1. Open AVD Manager
  2. Press on the small arrow (next to the pen) corresponding to your preferred device
  3. Select «Cold boot now»
  4. Wait for the emulator to open and boot
  5. Run your application

I hope that helps you!

answered Oct 10, 2019 at 15:03

Vlad Hondru's user avatar

Vlad HondruVlad Hondru

2753 silver badges7 bronze badges

1

Changing the emulator to cold boot rather than quick boot also seemed to resolve the problem. Rather than a complete wipe.

It’s in advanced settings > emulated performance > boot option when editing a device in AVD.
enter image description here

answered Aug 3, 2019 at 22:50

akdombrowski's user avatar

no need to change system variables or adb.
it’s not adb or emulator error.
change your device or emulator and check again!!!

answered Jan 28, 2019 at 15:47

BIS Tech's user avatar

BIS TechBIS Tech

15.3k10 gold badges84 silver badges135 bronze badges

<activity                                                                                       

   android:exported="true">                                                                                    
                                                                                                     
                                                                        
</activity>                                                                                            
                                                           

Suraj Rao's user avatar

Suraj Rao

29.3k11 gold badges96 silver badges103 bronze badges

answered Mar 9, 2022 at 6:02

jay mangukiya's user avatar

Try to install using adb through command line:

<C:Androidsdkplatform-tools>adb -s yourdeviceID install -r build/app/outputs/apk/app.apk

you can follow this for more explanation: https://github.com/flutter/flutter/issues/8605

Thanks

shizhen's user avatar

shizhen

12k9 gold badges52 silver badges87 bronze badges

answered Nov 29, 2018 at 7:40

user3151301's user avatar

1

I was installing the application on BlueStacks Emualtor and I resolve this issues using these steps:-

  1. Go to Setting.
  2. Then Go To Advance
  3. Then turn on Android Debug Bridge(ADV)

Using these steps we can resolve this issues on BlueStack.

m4n0's user avatar

m4n0

28.6k26 gold badges74 silver badges89 bronze badges

answered Oct 13, 2021 at 12:53

Rahul Kushwaha's user avatar

Rahul KushwahaRahul Kushwaha

4,9823 gold badges25 silver badges27 bronze badges

My fix in file «build.gradle»

defaultConfig {
    ......
    ndk {
        abiFilters 'x86', 'x86_64', 'armeabi', 'armeabi-v7a', 'mips', 'mips64', 'arm64-v8a'
    }
}

answered Aug 13, 2022 at 15:53

Tran Chau's user avatar

choose the devices marked by «cold boot»

choose the devices marked by "cold boot"

Syscall's user avatar

Syscall

19k10 gold badges36 silver badges51 bronze badges

answered Feb 5 at 8:53

user17499974's user avatar

New contributor

user17499974 is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.

AOA There, you can go simply to your project App-level build.gradle file me change your minSdkVersion to the updated version. Like this:enter image description here

answered Jan 14 at 10:28

Ishaq Raja's user avatar

2

Earlier we have been through articles like how to solve No Connected Devices in Flutter. So, today we are going to learn how to resolve errors in launching applications on android SDK built for x86 in flutter.

Are you ready for the same?? Let’s Get started with the following…

How to Resolve Error in Launching Application on Android SDK Built For x86 In Flutter?

Try to install using ADB through the command line:

<C:Androidsdkplatform-tools>adb -s yourdeviceID install -r build/app/outputs/apk/app.apk

You can follow this for more explanation https://github.com/flutter/flutter/issues/8605

You can also follow the below steps for the same:

  • Open AVD Manager
  • Wipe Data (delete data from emulator)
  • Open Emulator
  • Try to run an app

Changing the emulator to cold boot rather than quick boot also seemed to resolve the problem. Rather than a complete wipe.

It’s in advanced settings > emulated performance > boot option when editing a device in AVD.

Android Virtual Device

Android Virtual Device

You can also try:

defaultConfig { // TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html). ndk { abiFilters "armeabi-v7a", "x86_64", "armeabi", "mips" // abiFilters "arm64-v8a", "armeabi-v7a","armeabi", "mips", "x86" } applicationId "com.example.tvs_visibility" minSdkVersion 16 targetSdkVersion 28 versionCode flutterVersionCode.toInteger() versionName flutterVersionName testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner" }

Conclusion:

Thank you for reading!! We hope you got what you were looking for 🙂

Also, let us know what worked for you in the comments right below. Lots of content coming up your way!! Stay Connected 🙂

So in this article, we have been through how to resolve errors in launching applications on Android SDK built for x86 in flutter.

Keep Learning !!! Keep Fluttering !!!

Do let us know in the comments if you are still confused in flutter!! we are here for you.

FlutterAgency.com is our portal Platform dedicated to Flutter Technology and Flutter Developers. The portal is full of cool resources from Flutter like Flutter Widget GuideFlutter ProjectsCode libs and etc.

FlutterAgency.com is one of the most popular online portals dedicated to Flutter Technology and daily thousands of unique visitors come to this portal to enhance their knowledge of Flutter.

@d-apps

My laptop is weak to emulate x64 or latest android versions (6.0 — 9.0), so before flutter, I programmed in native and I always tested my apps in Nexus 4 or Galaxy Nexus with API 19 (Android 4.4) and the emulators worked fine for native apps, once I started with Flutter ( since 1.0) emulators doesn’t work correctly (Only for Flutter apps). I always get this error: «Unfortunately app_name has stopped.«

Launching libmain.dart on Android SDK built for x86 in debug mode...
Initializing gradle...
Resolving dependencies...
Running Gradle task 'assembleDebug'...
Built buildappoutputsapkdebugapp-debug.apk.
WARNING: linker: libdvm.so has text relocations. This is wasting memory and is a security risk. Please fix.

Installing buildappoutputsapkapp.apk..

My emulators configuration:
1
2

`

So I tried to use other android versions, tried with 5.0, and I get the error;

Launching libmain.dart on Android SDK built for x86 in debug mode...
Initializing gradle...
Running Gradle task 'assembleDebug'...

Built buildappoutputsapkdebugapp-debug.apk.
Installing buildappoutputsapkapp.apk...
**Package install error: Failure [INSTALL_FAILED_DEXOPT]
Error launching application on Android SDK built for x86.**

Flutter doctor

[√] Flutter (Channel stable, v1.7.8+hotfix.3, on Microsoft Windows [versão 10.0.18362.239], locale pt-BR)
    • Flutter version 1.7.8+hotfix.3 at C:srcflutter
    • Framework revision b712a172f9 (23 hours ago), 2019-07-09 13:14:38 -0700
    • Engine revision 54ad777fd2
    • Dart version 2.4.0


[√] Android toolchain - develop for Android devices (Android SDK version 29.0.0)
    • Android SDK at C:UsersDihAppDataLocalAndroidsdk
    • Android NDK location not configured (optional; useful for native profiling support)
    • Platform android-29, build-tools 29.0.0
    • Java binary at: C:Program FilesAndroidAndroid Studiojrebinjava
    • Java version OpenJDK Runtime Environment (build 1.8.0_152-release-1343-b01)
    • All Android licenses accepted.

[√] Android Studio (version 3.4)
    • Android Studio at C:Program FilesAndroidAndroid Studio
    • Flutter plugin version 37.0.1
    • Dart plugin version 183.6270
    • Java version OpenJDK Runtime Environment (build 1.8.0_152-release-1343-b01)

[√] Connected device (1 available)
    • Android SDK built for x86 • emulator-5554 • android-x86 • Android 4.4.2 (API 19) (emulator)

• No issues found!

My laptop:
3

@saravananmnm

My laptop is weak to emulate x64 or latest android versions (6.0 — 9.0), so before flutter, I programmed in native and I always tested my apps in Nexus 4 or Galaxy Nexus with API 19 (Android 4.4) and the emulators worked fine for native apps, once I started with Flutter ( since 1.0) emulators doesn’t work correctly (Only for Flutter apps). I always get this error: «Unfortunately app_name has stopped.«

Launching libmain.dart on Android SDK built for x86 in debug mode...
Initializing gradle...
Resolving dependencies...
Running Gradle task 'assembleDebug'...
Built buildappoutputsapkdebugapp-debug.apk.
WARNING: linker: libdvm.so has text relocations. This is wasting memory and is a security risk. Please fix.

Installing buildappoutputsapkapp.apk..

My emulators configuration:
1
2

`

So I tried to use other android versions, tried with 5.0, and I get the error;

Launching libmain.dart on Android SDK built for x86 in debug mode...
Initializing gradle...
Running Gradle task 'assembleDebug'...

Built buildappoutputsapkdebugapp-debug.apk.
Installing buildappoutputsapkapp.apk...
**Package install error: Failure [INSTALL_FAILED_DEXOPT]
Error launching application on Android SDK built for x86.**

Flutter doctor

[√] Flutter (Channel stable, v1.7.8+hotfix.3, on Microsoft Windows [versão 10.0.18362.239], locale pt-BR)
    • Flutter version 1.7.8+hotfix.3 at C:srcflutter
    • Framework revision b712a172f9 (23 hours ago), 2019-07-09 13:14:38 -0700
    • Engine revision 54ad777fd2
    • Dart version 2.4.0


[√] Android toolchain - develop for Android devices (Android SDK version 29.0.0)
    • Android SDK at C:UsersDihAppDataLocalAndroidsdk
    • Android NDK location not configured (optional; useful for native profiling support)
    • Platform android-29, build-tools 29.0.0
    • Java binary at: C:Program FilesAndroidAndroid Studiojrebinjava
    • Java version OpenJDK Runtime Environment (build 1.8.0_152-release-1343-b01)
    • All Android licenses accepted.

[√] Android Studio (version 3.4)
    • Android Studio at C:Program FilesAndroidAndroid Studio
    • Flutter plugin version 37.0.1
    • Dart plugin version 183.6270
    • Java version OpenJDK Runtime Environment (build 1.8.0_152-release-1343-b01)

[√] Connected device (1 available)
    • Android SDK built for x86 • emulator-5554 • android-x86 • Android 4.4.2 (API 19) (emulator)

• No issues found!

My laptop:
3

plz try this lines

defaultConfig {
// TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html).
ndk {
abiFilters «armeabi-v7a», «x86_64», «armeabi», «mips»
// abiFilters «arm64-v8a», «armeabi-v7a»,»armeabi», «mips», «x86»
}
applicationId «com.example.tvs_visibility»
minSdkVersion 16
targetSdkVersion 28
versionCode flutterVersionCode.toInteger()
versionName flutterVersionName
testInstrumentationRunner «android.support.test.runner.AndroidJUnitRunner»
}

@d-apps

My laptop is weak to emulate x64 or latest android versions (6.0 — 9.0), so before flutter, I programmed in native and I always tested my apps in Nexus 4 or Galaxy Nexus with API 19 (Android 4.4) and the emulators worked fine for native apps, once I started with Flutter ( since 1.0) emulators doesn’t work correctly (Only for Flutter apps). I always get this error: «Unfortunately app_name has stopped.«

Launching libmain.dart on Android SDK built for x86 in debug mode...
Initializing gradle...
Resolving dependencies...
Running Gradle task 'assembleDebug'...
Built buildappoutputsapkdebugapp-debug.apk.
WARNING: linker: libdvm.so has text relocations. This is wasting memory and is a security risk. Please fix.

Installing buildappoutputsapkapp.apk..

My emulators configuration:
1
2
`
So I tried to use other android versions, tried with 5.0, and I get the error;

Launching libmain.dart on Android SDK built for x86 in debug mode...
Initializing gradle...
Running Gradle task 'assembleDebug'...

Built buildappoutputsapkdebugapp-debug.apk.
Installing buildappoutputsapkapp.apk...
**Package install error: Failure [INSTALL_FAILED_DEXOPT]
Error launching application on Android SDK built for x86.**

Flutter doctor

[√] Flutter (Channel stable, v1.7.8+hotfix.3, on Microsoft Windows [versão 10.0.18362.239], locale pt-BR)
    • Flutter version 1.7.8+hotfix.3 at C:srcflutter
    • Framework revision b712a172f9 (23 hours ago), 2019-07-09 13:14:38 -0700
    • Engine revision 54ad777fd2
    • Dart version 2.4.0


[√] Android toolchain - develop for Android devices (Android SDK version 29.0.0)
    • Android SDK at C:UsersDihAppDataLocalAndroidsdk
    • Android NDK location not configured (optional; useful for native profiling support)
    • Platform android-29, build-tools 29.0.0
    • Java binary at: C:Program FilesAndroidAndroid Studiojrebinjava
    • Java version OpenJDK Runtime Environment (build 1.8.0_152-release-1343-b01)
    • All Android licenses accepted.

[√] Android Studio (version 3.4)
    • Android Studio at C:Program FilesAndroidAndroid Studio
    • Flutter plugin version 37.0.1
    • Dart plugin version 183.6270
    • Java version OpenJDK Runtime Environment (build 1.8.0_152-release-1343-b01)

[√] Connected device (1 available)
    • Android SDK built for x86 • emulator-5554 • android-x86 • Android 4.4.2 (API 19) (emulator)

• No issues found!

My laptop:
3

plz try this lines

defaultConfig {
// TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html).
ndk {
abiFilters «armeabi-v7a», «x86_64», «armeabi», «mips»
// abiFilters «arm64-v8a», «armeabi-v7a»,»armeabi», «mips», «x86»
}
applicationId «com.example.tvs_visibility»
minSdkVersion 16
targetSdkVersion 28
versionCode flutterVersionCode.toInteger()
versionName flutterVersionName
testInstrumentationRunner «android.support.test.runner.AndroidJUnitRunner»
}

I did it with Android 4.4 emulator, same problem.
I tested Pixel API 21 1080 x 1920 with Android 5.0 (Google APIs) x86, and it worked, looks like the problem is testing apps in emulators with lower resolution. Those I tested was < 768 x 1280. And for images lower than 5.0 the same problem happened even with emulators with high resolutions (Pixel API 21 1080 x 1920):

Launching libmain.dart on Android SDK built for x86 in debug mode...
Initializing gradle...
Resolving dependencies...
Running Gradle task 'assembleDebug'...
Built buildappoutputsapkdebugapp-debug.apk.
WARNING: linker: libdvm.so has text relocations. This is wasting memory and is a security risk. Please fix.

Installing buildappoutputsapkapp.apk..

Emulator: «Unfortunately app_name has stopped.»

@rdinkel

In the emulated android go to factory reset. Let it run. This fixed it for me.
Seems to be a bug that android, after creating the vm, thinks its low on space even it has over 2gb of space and a lot of ram.

@bettdouglas

In the emulated android go to factory reset. Let it run. This fixed it for me.
Seems to be a bug that android, after creating the vm, thinks its low on space even it has over 2gb of space and a lot of ram.

This fixed my issue

@janmoppel

Hello @d-apps !

Thank you for posting an issue.
Have you tried solution proposed by the @rdinkel? Did it solve the problem for you?

@d-apps

I ended up using emulator with android 6.0, changed the configuration and now its working.

@janmoppel

Hello @d-apps !

Great, nice to hear it’s working now!

Closing this issue then.

@github-actions

This thread has been automatically locked since there has not been any recent activity after it was closed. If you are still experiencing a similar issue, please open a new bug, including the output of flutter doctor -v and a minimal reproduction of the issue.

@github-actions
github-actions
bot

locked as resolved and limited conversation to collaborators

Aug 24, 2021

Есть как минимум дюжина ранее скомпилированных и запущенных апплетов флаттера, которые внезапно перестают компилироваться под Android Studio или Intellij.

Даже если я создам новое приложение Flutter по умолчанию, я получаю эту ошибку:

Очевидно, что-то изменилось … плагины / зависимости были обновлены / обновлены, а каталоги .gradle и .idea удалены … и проекты перестроены … но ничего не выходит за рамки этого:

Launching lib/main.dart on Android SDK built for x86 in debug mode...
Initializing gradle...
Resolving dependencies...
Gradle task 'assembleDebug'...
Built build/app/outputs/apk/debug/app-debug.apk.
cmd: Can't find service: activity
Installing build/app/outputs/apk/app.apk...
Error: ADB exited with exit code 1
adb: failed to install/home/jedaa/workspace/flutter_apps/studio/flutter_apprescue/build/app/outputs/apk/app.apk: cmd: Can't find service: package
Error launching application on Android SDK built for x86.


Ответы
6

Попробуйте установить с помощью adb через командную строку:

<C:Androidsdkplatform-tools>adb -s yourdeviceID install -r build/app/outputs/apk/app.apk

Вы можете следить за этим, чтобы узнать больше: https://github.com/flutter/flutter/issues/8605

Спасибо

Не нужно менять системные переменные или adb.
это не ошибка adb или эмулятора.
смени свой девайс или эмулятор и проверь еще раз !!!

  1. Откройте AVD Manager
  2. Wipe Data (удалить данные из эмулятора)
  3. Открыть эмулятор
  4. Попробуйте запустить приложение

Смена эмулятора на «холодную» загрузку, а не на быструю, также, похоже, решила проблему. А не полный вайп.

Это в расширенных настройках> эмулируемая производительность> параметр загрузки при редактировании устройства в AVD.

У меня была аналогичная ошибка при попытке запустить приложение flutter. Что я сделал:

  1. Откройте AVD Manager
  2. Нажмите на маленькую стрелку (рядом с ручкой), соответствующую вашему предпочтительному устройству.
  3. Выберите «Холодная загрузка сейчас».
  4. Подождите, пока эмулятор откроется и загрузится
  5. Запустите ваше приложение

Надеюсь, это вам поможет!

Я устанавливал приложение на BlueStacks Emualtor и решил эту проблему, выполнив следующие действия: —

  1. Перейти к настройке.
  2. Затем переходите к продвижению
  3. Затем включите Android Debug Bridge (ADV).

Используя эти шаги, мы можем решить эти проблемы в BlueStack.

Другие вопросы по теме

There are a least a dozen previously compiled and running flutter applets that suddenly will not compile under Android Studio or Intellij.
Even if i build a new default Flutter app i get this crash error:
Clearly something has changed .. plugins/dependencies have been upgraded/updated and the .gradle and .idea directories removed ... and projects rebuilt .. but nothing gets past this:
Launching lib/main.dart on Android SDK built for x86 in debug mode...
Initializing gradle...
Resolving dependencies...
Gradle task 'assembleDebug'...
Built build/app/outputs/apk/debug/app-debug.apk.
cmd: Can't find service: activity
Installing build/app/outputs/apk/app.apk...
Error: ADB exited with exit code 1
adb: failed to install/home/jedaa/workspace/flutter_apps/studio/flutter_apprescue/build/app/outputs/apk/app.apk: cmd: Can't find service: package
Error launching application on Android SDK built for x86.

Open AVD Manager
Wipe Data (delete datas from emulator)
Open emulator
Try to run app

Try to install using adb through command line:
<C:Androidsdkplatform-tools>adb -s yourdeviceID install -r build/app/outputs/apk/app.apk
you can follow this for more explanation: https://github.com/flutter/flutter/issues/8605
Thanks

no need to change system variables or adb.
it's not adb or emulator error.
change your device or emulator and check again!!!

Related

React-Native, Android, Genymotion: ADB server didn’t ACK

I am working with React-Native, Android, and Genymotion on Mac. When I run react-native run-android I get this lines at the end of the launch operation:
...
04:54:40 E/adb: error: could not install *smartsocket* listener: Address already in use
04:54:40 E/adb: ADB server didn't ACK
04:54:40 E/ddms: '/Users/paulbrie/Library/Android/sdk/platform-tools/adb,start-server' failed -- run manually if necessary
04:54:40 E/adb: * failed to start daemon *
04:54:40 E/adb: error: cannot connect to daemon
:app:installDebug FAILED
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':app:installDebug'.
> com.android.builder.testing.api.DeviceException: Timeout getting device list.
...
However, adb devices returns this:
List of devices attached
192.168.59.101:5555 device
So far I've found no solution to run my app on the emulator. Has anyone encountered the same issue?
Thanks,
Paul
After more research I've realized that Genymotion uses by default its own adb.
I switched to my main adb (the same used by react-native) and it solved the issue. I guess that because Genymotion's adb was launched first I got the Address already in use error message.
I am using genymotion, but Paul's solution alone did not fix the error (for Mac).
I had to:
Update Android SDK to the latest version (24.4.1) via the SDK manager
Type android in the command line
In the SDK manager find the latest SDK tools and install.
Once installed the SDK path should update the new SDK location like below.
Then update the $ANDROID_HOME to use the new SDK
export ANDROID_HOME=/usr/local/Cellar/android-sdk/24.4.1_1
export PATH=$PATH:$ANDROID_HOME/tools:$ANDROID_HOME/platform-tools
Confirm it has been added by viewing your path with echo $PATH
Then in genymotion do what #Paul says above and point genymotion ADB to use the same sdk
System: Windows 10
My issue: Setting Genymotion to point to the custom SDK didn't have any affect. I still received the:
Couldn't start project on Android: could not install smartsocket
listener: cannot bind to 127.0.0.1:5037: Only one usage of each socket
address (protocol/network address/port) is normally permitted. (10048)
could not read ok from ADB Server * failed to start daemon * error:
cannot connect to daemon
What I discovered was there was a difference in ADB versions being used throughout the system. Here is the command I used to find them:
where /r C: adb.exe
This produced the results:
C:Program FilesExpo XDEresourcesappnode_modulesxdlbinarieswindowsadbadb.exe
C:Program FilesGenymobileGenymotiontoolsadb.exe
C:UserskyleAppDataLocalAndroidSdkplatform-toolsadb.exe
C:UserskyleAppDataLocalAndroidSdkplatform-toolsadb backupadb.exe
Navigating to each directory and running:
adb.exe version
Allowed me to see that Expo was running ADB version:
Android Debug Bridge version 1.0.36
Revision fd9e4d07b0f5-android
While Genymotion using the custom SDK had version (c:UserskyleAppDataLocalAndroidSdkplatform-toolsadb.exe):
Android Debug Bridge version 1.0.39
Revision 3db08f2c6889-android
As a test I took the adb files (adb.exe, AdbWinApi.dll, AdbWinUsbApi.dll) from
c:UserskyleAppDataLocalAndroidSdkplatform-toolsadb.exe
and placed them into a backup folder. I then moved the adb files located at
c:Program FilesExpo XDEresourcesappnode_modulesxdlbinarieswindowsadbadb.exe
into that same location. I killed adb with:
adb kill-server
which caused a restart of the adb server automatically due to having my Genymotion device already running. I hit the "Restart" button inside of the Expo XDE and it immediately began working. Here is the log where I hit the restart button at 1:13:04 AM:
12:45:53 AM
could not install *smartsocket* listener: cannot bind to 127.0.0.1:5037: Only one usage of each socket address (protocol/network address/port) is normally permitted. (10048)
could not read ok from ADB Server
* failed to start daemon *
error: cannot connect to daemon
1:13:04 AM
Restarting project and clearing packager cache (Hold shift while clicking restart to avoid clearing cache).
1:13:11 AM
Starting React Native packager...
1:13:17 AM
Scanning 543 folders for symlinks in C:Userskylegitbetalognode_modules (49ms)
1:13:17 AM
1:13:19 AM
Couldn't adb reverse: closed
1:13:20 AM
Project opened! You can now use the "Share" or "Device" buttons to view your project.
1:13:26 AM
Couldn't adb reverse: closed
1:13:26 AM
Downloading latest version of Expo
1:13:28 AM
Installing Expo on device
1:13:33 AM
Opening on Android device
1:13:56 AM
Building JavaScript bundle: finished in 59643ms.
1:14:01 AM
Dependency graph loaded.
1:14:03 AM
Your JavaScript transform cache is empty, rebuilding (this may take a minute).
Conclusion: Genymotion and Expo may need to use the same version of adb so that Expo can properly communicate with the simulated device. Pointing Genymotion to your android SDK location as well as ensuring Expo XDE has that same version will allow correct communication between devices. I moved the Expo XDE version to the SDK location, but you might be able to go the other way (take the sdk ADB files and place them in the Expo XDE resource location).
P.S. I've been all through the stackoverflow posts related to this issue. Just so you guys know my task manager shows three instances of adb.exe running. If you kill any of them they just come back.
Hope this helps /cheers
Maybe your adb versions are mismatching
Check:
adb version
Then:
cd /Path/to/Android/Sdk/platform-tools && ./adb version
If these two are different you have an error here, just remove adb from sys and copy the one that is in platform-tools to /usr/bin/
I had a similar issue.
First, I uninstalled the app.
Then, I pointed GenyMotion to the android sdk provided from Android Studio
Next, I ran "adb kill-server" into the terminal.
Finally, I re-ran "react-native run-android" and got a build success.
I had the same thing while I tried to run from expo UI.
Did the same things, as described in answers, but app was not running.
When once tried run exp android from command line (in the project folder), application ran successfully and next times runs from Expo UI was successfully.
The steps worked for me are :
$ adb kill-server
$ adb start-server
$ cd android
$ ./gradlew clean
$ cd ..
$ react-native run-android
If want to keep your system clean, you can also use Genymotion without Android Studio:
Find Genymotion's copy of adb. On macOS this is normally /Applications/Genymotion.app/Contents/MacOS/tools/.
Add the Genymotion tools directory to your path - execute/add the line export PATH=/Applications/Genymotion.app/Contents/MacOS/tools/:$PATH to your ~/.bash_profile or ~/.bash_rc.
Make sure that you can run adb from your terminal.
(From https://docs.expo.io/versions/latest/workflow/genymotion)
the adb version on your system is different from the adb version on the android sdk platform-tools .
Below suggestion is work for me for Linux operating system
check sys adb version run the below command
adb version
Android Debug Bridge version 1.0.39
check sdk adb version
cd /root/Android/Sdk/platform-tools
./adb version
Android Debug Bridge version 1.0.32
copy
rm /usr/bin/adb
[Note : the above command remove the existing adb then copy the adb from sdk/platform-tools directory ]
sudo cp /root/Android/Sdk/platform-tools/adb /usr/bin/adb
Then run the project using this command
react-native run-android
1.use custom sdk path in genymotion.(Suppose this one won't work means,Try to execute the second one)
2.Manually use this command to execute(SDK PATH/adb she
ll am start -n/Package name/MainActivity).
C:UsersAppDataLocalAndroidSdk/platform-tools/adb she
ll am start -n com.example/com.example.ManiActivity
And try to run the application by using react-native run-android.

Could not create service of type ScriptPluginFactory using BuildScopeServices.createScriptPluginFactory() react-native. How to fix?

I have the template code for my "Helloworld" app written in javascript and react-native on Windows. I connected my android emulator and wanted to launch the app on it. The following happens when I run "react-native run-android" command. Node.js opens as a separate window and it's written "Loading dependency graph, done". However, in the terminal window, there is following error message:
>User helloworld $ react-native run-android
Starting JS server...
Building and installing the app on the device (cd android && gradlew.bat installDebug)...
FAILURE: Build failed with an exception.
>*What went wrong:
Could not create service of type ScriptPluginFactory using
BuildScopeServices.createScriptPluginFactory().
>Could not create service of type PluginResolutionStrategyInternal using BuildScopeServices.createPluginResolutionStrategy().
>Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.
>Get more help at https://help.gradle.org
BUILD FAILED in 1s
Could not install the app on the device, read the error above for details.
Make sure you have an Android emulator running or a device connected and have
set up your Android development environment:
https://facebook.github.io/react-native/docs/getting-started.html
Command failed: gradlew.bat installDebug
Error: Command failed: gradlew.bat installDebug
at checkExecSyncError (child_process.js:616:11)
at Object.execFileSync (child_process.js:634:13)
at runOnAllDevices (C:UsersUserhelloworldnode_modulesreact-nativelocal-clirunAndroidrunAndroid.js:299:19)
at buildAndRun (C:UsersUserhelloworldnode_modulesreact-nativelocal-clirunAndroidrunAndroid.js:135:12)
at isPackagerRunning.then.result (C:UsersUserhelloworldnode_modulesreact-nativelocal-clirunAndroidrunAndroid.js:65:12)
at process._tickCallback (internal/process/next_tick.js:68:7)
-Concerning whether emulator is connected:
$ adb devices
List of devices attached
emulator-5554 device
(Works similarly for my Android smartphone). USB debugging is enabled.
-Concerning what I have tried to solve the problem:
My user is set as administrator.
I had JDK11.0.1 version. I installed JDK1.8.0_201 and it is now set as my java version.
User helloworld $ java -version
java version "1.8.0_201"
I created ".gradle" folder in my project's directory in case there are problems with accessing/creating this kind of folder.
-I specified the path for sdk.dir in local.properties file
-My OS is Windows 8.1. Gradle's version is 4.7.
-I have installed Android Studio, JDK8 and 11.
-I am using GitBash for the terminal purposes.
-I have the following system's environment variables:
ANDROID_HOME = c:UsersUserAppDataLocalAndroidSdk
GRADLE_HOME = C:UsersUser.gradlewrapperdistsgradle-4.7-all4cret0dgl5o3b21weaoncl7ysgradle-4.7
JAVA_HOME = C:Program FilesJavajdk1.8.0_201
Path = C:Program Files (x86)Common FilesOracleJavajavapath;C:Windowssystem32;C:Windows;C:WindowsSystem32Wbem;C:WindowsSystem32WindowsPowerShellv1.0;C:Program Files (x86)NVIDIA CorporationPhysXCommon;C:Program FilesGitcmd;.Plugins;C:UsersUserAppDataLocalProgramsPythonPython37-32;C:Program Filesnodejs;c:UsersUserAppDataLocalAndroidSdkplatform-tools;C:UsersUserAppDataLocalAndroidSdkplatform-tools;%GRADLE_HOME%bin;%JAVA_HOME%bin
In case you are interested what was in the question before:
My initial problem was that there just was not any error shown, but still nothing was launched on the emulator. I went around that by putting my project's "android" folder into Android Studio and it launched the app on my smartphone. However, when I introduced small changes to App.js, the project could not be updated due to some unknown error, and I couldn't reopen it as a new project. So I had to solve this problem by trying to run the app by using "react-native run-android" through terminal, and now I'm at this state of the problem.
Mmmm... when you run react-native run-android on the console, 1 it should check if you have the android sdk's, second it should compile some things, and third, it should start metro bundler in ANOTHER console . The "Loading dependency graph, done" should appear on that OTHER console, while the main console is gonna still compile for about a minute or even more... then it's gonna launch the intent and open the app. Sometimes it just displays a blank screen after the first load, so you should exit the app and delete it from recents, and reopen the app
Post screenshots, it seems like you only see that secondary console while the main console is not displaying (?)
Do you want to run a react-native or purely java application for which you must have used Android studio?
If for the studio app: you must enable the developer's options from your phone for enabling that check this:
https://www.samsung.com/uk/support/mobile-devices/how-do-i-turn-on-the-developer-options-menu-on-my-samsung-galaxy-device/

Android : App not installed

Newbie here.....I made my first game with Godot game engine and exported to android successfully.....copied to my phone, it installs and runs fine. After a couple of hours, I made some changes and exported it again.....Again copied the apk but now when I try to install it, It does not complete installation. I tried to change the export settings so many times but it wont install. Please help.
Tried installing using adb and I get this:
C:UsersSuhailAppDataLocalAndroidSdkplatform-tools>adb install -r .apk
adb: failed to install .apk: Failure [INSTALL_PARSE_FAILED_NO_CERTIFICATES: Package /data/app/vmdl1790547402.tmp/base.apk has no certificates at entry AndroidManifest.xml]
I am using jarsigner from oracle jdk 10(the latest version), and the debug keystore was created by the same jdk.
My device runs on Android 8.0
I downloaded APK Editor on my phone.....chose my apk….. and tried different 'install location' settings inside it. It was by default on Auto (OS Make Decision)…..changed it to 'Internal only'......still did not install...….changed it to Default(Not Specified) and it installed and works fine.
So does all this help my case any bit? I should not have to use APK Editor every time after exporting.
Thanks for your time anyways
When I try one-click deploy in Godot:
Exception occurred while executing:
java.lang.IllegalArgumentException: Unknown package: org.godotengine.dangerousplane
at com.android.server.pm.Settings.getInstallerPackageNameLPr(Settings.java:5053)
at com.android.server.pm.PackageManagerService.getInstallerPackageName(PackageManagerService.java:27945)
at com.android.server.pm.PackageManagerService.isOrphaned(PackageManagerService.java:27951)
at com.android.server.pm.PackageManagerService.deletePackageVersioned(PackageManagerService.java:24078)
at com.android.server.pm.PackageInstallerService.uninstall(PackageInstallerService.java:996)
at com.android.server.pm.PackageManagerShellCommand.runUninstall(PackageManagerShellCommand.java:912)
at com.android.server.pm.PackageManagerShellCommand.onCommand(PackageManagerShellCommand.java:134)
at android.os.ShellCommand.exec(ShellCommand.java:96)
at com.android.server.pm.PackageManagerService.onShellCommand(PackageManagerService.java:28755)
at android.os.Binder.shellCommand(Binder.java:581)
at android.os.Binder.onTransact(Binder.java:481)
at android.content.pm.IPackageManager$Stub.onTransact(IPackageManager.java:3211)
at com.android.server.pm.PackageManagerService.onTransact(PackageManagerService.java:5111)
at android.os.Binder.execTransact(Binder.java:682)
Installing into device (please wait..): Samsung SM-A520F
running cmdline: "C:/Users/Suhail/AppData/Local/Android/Sdk/platform-tools/adb.exe" "-s" "5210d5c5e2787409" "install" "-r" "C:UsersSuhailAppDataLocalTemp/Godot/tmpexport.apk"
adb: failed to install C:UsersSuhailAppDataLocalTemp/Godot/tmpexport.apk: Failure [INSTALL_PARSE_FAILED_NO_CERTIFICATES: Package /data/app/vmdl2125437658.tmp/base.apk has no certificates at entry AndroidManifest.xml]
running cmdline: "C:/Users/Suhail/AppData/Local/Android/Sdk/platform-tools/adb.exe" "-s" "5210d5c5e2787409" "shell" "am" "start" "-a" "android.intent.action.MAIN" "-n" "org.godotengine.dangerousplane/org.godotengine.godot.Godot"
Starting: Intent { act=android.intent.action.MAIN cmp=org.godotengine.dangerousplane/org.godotengine.godot.Godot }
Error type 3
Error: Activity class {org.godotengine.dangerousplane/org.godotengine.godot.Godot} does not exist.
I just want to enjoy making games but this Android is giving me a headache.
Go to /data/local/tmp in your your device foldres Like this
Delete folder named with your package name
Rebuild/clean & build project
Click run
I have faced the same issue trying to install an application on Android emulator with insufficient free space on the internal phone memory. After uninstalling of a couple other apps this error have been disappeared.

Visual Studio Code IDE returns error when attempt to debug React Native project: Could not find device with the id: “simulator”

My environment.
Windows 10 with Android SDK and AVD Manager and VS Code 1.26.1
Android Nexus S simulator with SDK API 23 Android 6.0 x86_64
react-native: 0.55.4
Problem:
I am failing to debug my sample app.js in Visual Studio Code IDE and fail to stop at any breakpoint.
I have AVD emulator running and when I simply run my simple project, the simulator loads it without issues. So, I do not see a problem with my project.
I also can execute “react-native run-android” in Terminal window of VS Code IDE and it returns success, for example:
BUILD SUCCESSFUL Total time: 10.283 secs Running
C:UsersmyusernameAppDataLocalAndroidSdk/platform-tools/adb -s
emulator-5554 reverse tcp:8081 tcp:8081 Starting the app on
emulator-5554
(C:UsersmyusernameAppDataLocalAndroidSdk/platform-tools/adb -s
emulator-5554 shell am start -n
com.vscodereactdebug3/com.vscodereactdebug3.MainActivity)... Starting:
Intent { cmp=com.vscodereactdebug3/.MainActivity }
However, when I attempt to debug it through Visual Studio IDE (Debug/Start Debugging), the Debug Console shows the following:
OS: win32 x64 Adapter node: v8.9.3 x64 vscode-chrome-debug-core: 3.17.3 Could not debug. Unknown error: not all success patterns were matched. It means that "react-native run-android" command failed.
Please, check the View -> Toggle Output -> React Native, View ->
Toggle Output -> React Native: Run android output windows.
So, below is output from React Native: Run Android:
[Warning] Target simulator is not supported for Android platform. If you want to use particular device or simulator for launching Android
app, please specify device id (as in 'adb devices' output)
instead. [Info] local.properties file doesn't exist. Using
Android SDK location from PATH. [Info] Starting React Native
Packager. [Info] Attaching to running React Native
packager Scanning folders for symlinks in
e:SoftwareAndroidVSCodeReactDebug3node_modules (20ms) Could not
find device with the id: "simulator". Choose one of the
following: [ 'emulator-5554' ]
I searched forums for the greater wisdom and saw a few posts related to this erratic behavior but those, while sharing good troubleshooting clues, did not solve my problem:
https://github.com/Microsoft/vscode-react-native/issues/624
My project is very simple, almost empty few liners. So, very likely the problem is with my environment, but I cannot find anything that could explain it. I do not recall assigning ID “simulator” to anything. And do not know where it is controlled.
Any ideas are greatly appreciated.
Update.
Today I came across of post React Native debug with Visual Studio Code not working
and attempted uninstalling react-native package and installing react-native-cli. I literally ran following commands in that sequence to use create-react-native-app:
npm install react-native --global
npm uninstall -g react-native
npm install -g react-native-cli
So, now the IDE debugs and stops on breakpoints as before.
I am yet to learn what happened and why my other project suddenly stopped being debugged. I, perhaps, broke my environment attempting to recover from some other problem.
And I still cannot explain the error related to "Could not find device with the id: "simulator"" in the Debug output.

Android Emulator is running but not loading my app in Titanium

I can run the app in the "mobile app preview in browser", and I can boot up the Android Emulator successfully. But the emulator just showed me the home screen all the time without loading my app. I've looked through all the similar questions online but couldn't find a solution.
Here is the console...hope someone can help me out. Thanks!
*Titanium Command-Line Interface, CLI version 3.1.0, Titanium SDK version 3.1.0.GA
Copyright (c) 2012-2013, Appcelerator, Inc. All Rights Reserved.
[INFO] : Running emulator process: python "C:UsersNiAppDataRoamingTitaniummobilesdkwin323.1.0.GAandroidbuilder.py" "emulator" "myFirstApp" "C:UsersNiAndroid-sdkadt-bundle-windows-x86sdk" "C:UsersNiDocumentsTitanium_Studio_WorkspacemyFirstApp" "com.yn.myFirstApp" "4" "HVGA" "armeabi"
[INFO] : Running build process: python "C:UsersNiAppDataRoamingTitaniummobilesdkwin323.1.0.GAandroidbuilder.py" "simulator" "myFirstApp" "C:UsersNiAndroid-sdkadt-bundle-windows-x86sdk" "C:UsersNiDocumentsTitanium_Studio_WorkspacemyFirstApp" "com.yn.myFirstApp" "4" "HVGA"
[INFO] logfile = C:UsersNiDocumentsTitanium_Studio_WorkspacemyFirstAppbuild.log
[INFO] Building myFirstApp for Android ... one moment
[INFO] Titanium SDK version: 3.1.0 (04/15/13 18:45 57634ef)
[INFO] : Emulator process exited successfully
[INFO] : Project built successfully in 3s 24ms
[INFO] : Emulator not running, exiting...*
Don't know if you have solved this, but for the reference of others, you shouldn't run the emulator yourself, allow Titanium Studio to launch the emulator by simply running your application with the emulator option (like Martin says)
In my own experience, i'm able to run my app in the emulator, but for all subsequent runs, i need to close the emulator and run the app again since Studio fails to detect the emulator and gives me an error similar to yours.
I forgot to add an answer for this question...
I could successfully run the Titanium only when I choose "run as administrator".
When this happens, you can install the app manually.
You will find your app's executable in the following directory under your app directory: build/android/bin/YOURAPPNAME.apk. On the Mac, you need to open a terminal window, cd to that directory, and type "chmod 777 YOURAPPNAME.apk". Then cd to the platform-tools directory under your android sdk installation directory, and run the following commands:
./adb kill-server
./adb start-server
./adb install <full path name to YOURAPPNAME.apk>
You will see your app appear on the home screen of the emulator.
I made a shell script to do this.

Forewords

This question gets the first result from Google, so my answer covers a bit different error.

The error in question has [INSTALL_FAILED_INSUFFICIENT_STORAGE] code. My answer is for any Performing Streamed Install error that does not specifically define [INSTALL_FAILED_INSUFFICIENT_STORAGE] code.

My Environment

  • KDE Neon 5.24 (a.k.a. Ubuntu 20.04 but latest KDE stuff)
  • Visual Studio Code from Snap (I use this mainly)
  • Android Studio from Snap (I use this to install SDK, Platform Tools and Build Tools)

Troubleshooting

The problem is this globally installed /usr/bin/adb overrides the adb that Flutter uses. As you know, Ubuntu has many outdated packages (to protect their system’s stability). ADB is one of them. So, if you try to do:

adb kill-server
adb start-server

You will highly likely get an output similar to below:

* daemon not running; starting now at tcp:5037
ADB server didn't ACK
Full server startup log: /tmp/adb.1000.log
Server had pid: 12668
--- adb starting (pid 12668) ---
adb I 03-26 03:19:35 12668 12668 main.cpp:57] Android Debug Bridge version 1.0.39
adb I 03-26 03:19:35 12668 12668 main.cpp:57] Version 1:8.1.0+r23-5ubuntu2
adb I 03-26 03:19:35 12668 12668 main.cpp:57] Installed as /usr/lib/android-sdk/platform-tools/adb
adb I 03-26 03:19:35 12668 12668 main.cpp:57] 
adb I 03-26 03:19:35 12668 12668 adb_auth_host.cpp:416] adb_auth_init...
adb I 03-26 03:19:35 12668 12668 adb_auth_host.cpp:174] read_key_file '/home/erayerdin/.android/adbkey'...
adb I 03-26 03:19:35 12668 12668 adb_auth_host.cpp:391] adb_auth_inotify_init...
adb I 03-26 03:19:35 12668 12668 adb_auth_host.cpp:467] Calling send_auth_response
adb server killed by remote request

* failed to start daemon
error: cannot connect to daemon

In some flutter run sessions, I’ve got an output similar to «adb server version (whatever) does not match the client (whatever); killing». That’s when I had the doubt maybe I have installed adb globally. Check this:

which adb
# /usr/bin/adb
# This is a sign that this adb might be globally installed.
# This must be a symlink. Just to make sure, I do the following...

realpath /usr/bin/adb
# /usr/lib/android-sdk/platform-tools
# This is the evidence that it has been installed globally.

So, we use an outdated version of adb, which does not match the target device’s adb server.

Solution

So, we need to get rid of this global adb first.

⚠ Warning

If you use adb from terminal, what we are going to do will remove it. You can add your {SDK PATH}/platform-tools where SDK PATH is where you have installed SDK to get it back.

Simply do:

sudo apt remove android-sdk android-sdk-common android-sdk-build-tools android-sdk-build-tools-common android-sdk-platform-tools android-sdk-platform-tools-common

However, doing these actually does not remove adb from the system. It still lays there for some reason, so, for the last step, we do:

# simply backup our symlink
sudo mv /usr/bin/adb /usr/bin/adb.bak

# and backup global android-sdk tools
sudo mv /usr/lib/android-sdk /usr/lib/android-sdk.bak

After these steps, you can restart your editor and try again. If you want to make double sure, you can optionally do (while your editor’s closed):

# clean the build artifacts
flutter clean

# reinstall the packages because we have cleared them
flutter pub get
flutter pub get packages

Понравилась статья? Поделить с друзьями:
  • Error launching app please reinstall from google play
  • Error launching activity что это
  • Error launcher installer что делать
  • Error launch plug in failure
  • Error launch game using photon launcher ок