android Failed to start emulator:Cannot run program

前端 未结 8 697
情深已故
情深已故 2021-02-01 06:25

I have installed android SDK and android eclipse plugin successfully on Ubuntu.

Every thing was working fine until I removed Ubuntu and installed Linux Mint. I installe

相关标签:
8条回答
  • 2021-02-01 06:34

    It looks like your SDK path in eclipse has a mistake:

    Cannot run program "/home/anas/android//tools/emulator"

    That double "//" may be the problem. Check in Eclipse: Window -> Preferences -> Android. There should be a field there pointing the SDK Location. Edit it.

    Check your path : /home/anas/android/ to see if it really is where you put your SDK . If not repeat these steps to have it

    The missing R resource message is a compile error right? Then in this case your emulator should not be the problem. However, if your SDK path is incorrect like I suspect, then .. you can expect this compile error along with any other android libraries import

    0 讨论(0)
  • 2021-02-01 06:35

    I used the command-line tool android (android avd), and used Tools->Manage SDK to install 64 bit emulators. I then mv'ed emulator to emulator.old, and emulator64-arm to emulator. Now the AVD starts up.

    0 讨论(0)
  • 2021-02-01 06:36
    1. Installed on Ubuntu successfully. but not running avd

      If you're running a 64-bit system, you need to install ia32-libs

      sudo apt-get install ia32-libs
    
    1. R can not be resolved to a variable

    This can be due to following Reason

    • class is not the part of that package add proper package

    • not properly defined in manifest file class path define it properly

    clear and run the avd it will work

    0 讨论(0)
  • 2021-02-01 06:36

    This is sorted by running this on Ubuntu.

    sudo cp ~/Android/Sdk/platform-tools/adb /usr/bin/adb
    

    Refer this: Can't connect to emulator through ADB genymotion

    0 讨论(0)
  • 2021-02-01 06:47

    Like you have written the specified path and the files are exists in the same path, but i suggest to check that one more time.

    and like you are getting R cannot be resolved to a variable, do not worry:

    Reasons:

    1. Check Package name in Manifest File
    2. If you are already getting something like this: import com.version.bajrang.january.R; so first of all try to change package name here, or secondly just delete this line and clean your program
    3. If you are not getting something like: import com.version.bajrang.january.R; then add import packagename.R;

    I believe that you will get your answer.....

    0 讨论(0)
  • 2021-02-01 06:49

    I solved it doing a backup of the "emulator" and creating a symbolic link to the correct emulator:

    mv emulator emulator_bup
    ln -s emulator64-arm emulator
    
    0 讨论(0)
提交回复
热议问题