- Troubleshooting Android development
- Your application crashes immediately after launch
- The game crashes after a couple of seconds when playing video
- No Android device found
- Failed to re-package resources
- Unable to merge Android manifests
- Unable to convert classes into DEX format
- Unable to install APK to device
- Troubleshooting ADB Mode with Android
- Common Errors
- Android OS 4.2.2 (Jelly Bean) or newer
- Error: Found an Android device, but unable to connect to DejaOffice
- Advanced Troubleshooting
- Disable Antivirus
- Installation of the Universal Driver
- Checking if Device Driver has been Installed
- Communication Test
- Manually Installing the Universal Driver
- Failed run android simulator : No connected devices! #3091
- Comments
- nvcken commented Sep 28, 2015
- satya164 commented Sep 28, 2015
- nvcken commented Sep 28, 2015
- ide commented Sep 28, 2015
- nvcken commented Sep 28, 2015
- mgenev commented Feb 11, 2016
- ide commented Feb 11, 2016
- TheNotary commented May 23, 2016 •
- Make sure you have an Android emulator running or a device connected and have set up your Android development environment #1384
- Comments
- darijus commented Feb 21, 2019 •
- diegotejadav commented Feb 22, 2019
- vadim-96 commented Mar 16, 2019 •
- kevinvangelder commented Apr 3, 2019
- jamonholmgren commented Apr 10, 2019
- certilremy commented May 16, 2019
- jamonholmgren commented May 21, 2019
- kukokp commented Jun 20, 2019
- GreenRidingHood commented Apr 17, 2020
Troubleshooting Android development
While developing for Android using Unity, you could encounter a number of issues. Problems are often related to plug-ins A set of code created outside of Unity that creates functionality in Unity. There are two kinds of plug-ins you can use in Unity: Managed plug-ins (managed .NET assemblies created with tools like Visual Studio) and Native plug-ins (platform-specific native code libraries). More info
See in Glossary or incorrect Project settings A broad collection of settings which allow you to configure how Physics, Audio, Networking, Graphics, Input and many other areas of your project behave. More info
See in Glossary . This section outlines the most common scenarios and relavant troubleshooting advice.
Your application crashes immediately after launch
Remove any native plug-ins A platform-specific native code library that is created outside of Unity for use in Unity. Allows you can access features like OS calls and third-party code libraries that would otherwise not be available to Unity. More info
See in Glossary you have.
Use adb logcat to get the crash report from your device. Consult the official Android Developer Logcat Command-Line Tool documentation for more information.
The game crashes after a couple of seconds when playing video
Ensure Settings > Developer Options > Don’t keep activities isn’t enabled on the device.
The video player is its own activity, and therefore regular game activity will be destroyed if the video player is activated.
No Android device found
If Unity cannot find an Android device connected to the system, check the following:
Make sure that your device is actually connected to your computer — check the USB cable and the sockets.
Make sure that your device has USB Debugging enabled in the Developer options. For more details, refer to the Android SDK/NDK Setup page.
Run the adb devices command from the platform-tools directory of your Android SDK installation and check the output.
If the output list is empty and you are using Windows, you may need to install the driver for ADB An Android Debug Bridge (ADB). You can use an ADB to deploy an Android package (APK) manually after building. More info
See in Glossary devices. For more details, refer to the Android SDK/NDK Setup documentation.
If the list contains entries with the unauthorized label, you may need to authorize your computer on your device and give it permission to debug it. Check the device’s screen for the corresponding dialog.
If the list contains your device with the device label, build your Project in Unity again.
Failed to re-package resources
This error occurs when the Android Asset Packaging Tool (AAPT) fails. AAPT is used to build the intermediate Asset packages A collection of files and data from Unity projects, or elements of projects, which are compressed and stored in one file, similar to Zip files, with the .unitypackage extension. Asset packages are a handy way of sharing and re-using Unity projects and collections of assets. More info
See in Glossary during Android build. This issue is most often caused by missing resources or duplicate resources in your Android plug-ins.
Check the console message for more details — it should contain the IDs of the resources that are missing or duplicates. Fix the error in your plug-ins by either adding the missing resources/settings or removing the duplicate plug-ins.
Unable to merge Android manifests
The most likely cause for this issue is that one of your plug-ins has a manifest that is incompatible with the main Unity manifest.
Check the console message for more details on which attributes are conflicting, and fix the manifests accordingly.
See the Android Manifest documentation for more details on Android manifests.
Unable to convert classes into DEX format
The most likely cause for this issue is that you have a Java plug-in added twice. This results in duplicate classes when Unity tries to build a DEX (Dalvik Executable Format) file from all the compiled Java plug-ins. Check the console output for the list of duplicate entries, and fix the plug-ins.
If your console messages says “Too many references”, it means that the number of fields and methods exceeded the DEX limit of 64k. This usually happens when the number of plug-ins or plug-in resources is too high. Due to the way the references are generated, the limit could be hit with just a couple of large plug-ins.
There are several ways to handle this issue. One of these is by stripping the plug-ins. However, the quickest way to fix it is to switch to the Gradle build system, or export the Project and build it in Android Studio.
Unable to install APK to device
This error can be caused by:
Installing to an incompatible device.
Installing to a device running a version of Android lower than the Minimum API Level in your Player settings.
Check the console for the actual error code and output.
Источник
Troubleshooting ADB Mode with Android
Common Errors
If you receive «Unable to connect to DejaOffice» or «Unable to find an Android device» please follow these steps below to resolve your issue.
1. Restart your Android device. This fixes the issue about 90% of the time.
- NOTE: For most phones, press and hold the power button, then tap «Restart».
2. Make sure USB debugging is enabled on your device. Enable Android USB Debugging Mode. 3. Make sure the correct ADB drivers are installed on your PC. Download ADB drivers for DejaConnect USB. 4. Make sure your PC recognizes your device as an ADB device.
Android OS 4.2.2 (Jelly Bean) or newer
Starting in version 4.2.2 of Android, you must agree to allow your computer to access your device in debugging mode. You should say OK to this prompt on the device — and click to always allow connections to your computer. More info here.
Error: Found an Android device, but unable to connect to DejaOffice
This message indicates that CompanionLink was able to communicate with your device and that the proper drivers are installed and working, but DejaOffice is not responding to CompanionLink. Visit the link below to solve this issue.
Advanced Troubleshooting
Disable Antivirus
- Verify if the has any antivirus applications running on the PC or Android device that can interfere with the following processes:
- Adb.exe
- Companionlink.exe
Installation of the Universal Driver
Make sure no Android device is connected to the PC via USB prior to installing the CompanionLink Universal ADB Driver.
When installing the universal ADB driver if there is a prompt to turn off ADB.exe before the install can continue it may mean one or more of the following.
- An Android ADB device driver has previously been installed.
- More than likely the phone is plugged into the PC.
In this situation the ADB process will need to be manually stopped in the Task Manager. If the user follows the system prompts to automatically stop the process, a pc reboot will be required. – Advise user again to disconnect any Android devices that are connected to the PC prior to rebooting the PC. Move to the “Communication Test” section below.
Checking if Device Driver has been Installed
Check the PC’s Device Manager and verify the device shows as a “Composite ADB Interface”. To verify that the driver is installed as a Composite device use the following steps:
- Press the Windows key + R on the keyboard
- In the run box type in the following, devmgmt.msc
- This will open the Device Manager, you will be looking for an Android device
If you do see an Android Composite device, verify the driver signer by doing the following:
- Right click on the device in the list and go to Properties
- Click on the Driver tab and look the Driver Signer
- If it does not say Companion Link Software Inc follow the steps to manually choose the driver by going to the manual install section. If it is signed by Companion Link continue on to the Communication Test.
If you do not see this listed as a composite device please complete the following:
- Make sure that device is plugged in and has USB Debugging enabled
- Verify that the Universal Driver has been installed and supports that device
- Check to see if the device is being shown under the Other Devices listing. If it shows under this listing please complete the steps to Manually Install the Driver.
Communication Test
- Verify USB Debugging is enabled on the Android device and Connect to the PC Via USB Cable.
- Click the Start menu.
- Click Run.
- Type in CMD and hit enter.
- Type in the following including the quotations,
- cd «c:\program files\companionlink\android» ( 32 bit system )
- cd «c:\program files (x86)\companionlink\android» ( 64bit system )
- In the command window type in the following string:
- adb devices
- Click Enter.
At this point you should see either a numeric or an alpha-numeric serial number and to the right of that it should say device. If you see the device serial number then you should be ok to sync.
Manually Installing the Universal Driver
- Right click the device in the device manager and choose “Update Driver Software”
- Click on “Browse my computer for driver software»
- Click on the option to “Let me pick from a list of device drivers on my computer”
- You may see one of 2 screens after this, please pick the closest option below and follow those instructions.
- You see a screen asking you what kind of device you want to install a driver for, choose All Devices and then in the next screen click “Have Disk…”. Navigate to the following location:
- C:\Program Files\DejaConnect\
- C:\Program Files (x86)\DejaConnect\
You should see a file called android_winusb.inf, double click this and it will start the install process.
-
- You see a window with a list of Models and there is an option for Android Composite ADB Interface*. Double click on the Composite Interface and it will start to install.
- The device should install and display a dialog indicating an Android Composite ADB Interface has been installed.
- If the prompt does not show up, it may be there are other drivers that are interfering with ours and they may need to be uninstalled.
If installing an Amazon Kindle device driver select the “USB Composite Interface”
The Barnes and Noble Nook device is not able to sync via DejaConnect USB due to USB Debugging not being able to be enabled
Источник
Failed run android simulator : No connected devices! #3091
Comments
nvcken commented Sep 28, 2015
I try to run app on android simulator but failed
The text was updated successfully, but these errors were encountered:
satya164 commented Sep 28, 2015
What does adb devices print? If debugging mode turned on in your phone?
nvcken commented Sep 28, 2015
I have not plug real phone for running app.
I want to run app on «virtual android» simulator as like as xcode emulator
ide commented Sep 28, 2015
Launch the simulator and try running again.
nvcken commented Sep 28, 2015
It works.
Thanks all
mgenev commented Feb 11, 2016
@ide how to launch the simulator on its own? Cordova has always launched it for me so far
ide commented Feb 11, 2016
TheNotary commented May 23, 2016 •
Google brought me here, thought I’d share notes:
If you don’t have any devices listed from adb devices You’ll want to start by creating an Android Virtual Device image.
can be anything, such as react, should be one of the options produced by the below command.
If that listing is empty, use the android command’s GUI to install a target platform and such.
When you have the platform, and the device, you can then boot the device with emulator:
Once booted, the command you were likely trying to run react-native run-android should produce the effect of a react mobile app running in your emulator window.
Источник
Make sure you have an Android emulator running or a device connected and have set up your Android development environment #1384
Comments
darijus commented Feb 21, 2019 •
ignite doctor results:
Doesn’t happen on a normal react native app
The text was updated successfully, but these errors were encountered:
diegotejadav commented Feb 22, 2019
@darijus, do you have android studio installed, configured and some virtual device running in the AVD Manager?
I use these and everything runs well:
vadim-96 commented Mar 16, 2019 •
@darijus first you need to run android emulator from the AVD Manager, then start your project: react-native run-android
Don’t forget about the android paths: https://reactnative.dev/docs/environment-setup
kevinvangelder commented Apr 3, 2019
@darijus By «normal React Native app» do you by chance mean an Expo generated app? If so, you’ll probably need to download and install Android Studio, it’s dependencies, and the necessary SDKs to get an emulator up and running. Under the hood, we’re actually running the same commands to launch the React Native app on your emulator as vanilla React Native, so it is unlikely we have caused the issue you are experiencing.
jamonholmgren commented Apr 10, 2019
Since this issue is pretty old, I’m going to close it. Please open a new issue if you continue to run into this problem!
certilremy commented May 16, 2019
I Have the same Problem here. When I create a fresh new app it work , if I close an reopen the app I can’t run it keeps telling me this error. I need to create a fresh app an copy my old code to continue working every time i close my App .
jamonholmgren commented May 21, 2019
@certilremy, that sounds really painful! I’m not sure what we can do here to help you, though. If you provide a fresh Ignite-powered app that reproduces the issue, then we can take a look. Please open a new issue if you do.
kukokp commented Jun 20, 2019
I open genymotion and device is show in android studio but when i run react-native project then
«Make sure you have an Android emulator running or a device connected and have
set up your Android development environment:»
This error is showing please guide me for the same
GreenRidingHood commented Apr 17, 2020
chmod 755 android/gradlew && react-native run-android
You can’t perform that action at this time.
You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session.
Источник