1

I can't run any app on Android Studio (even a new app that I just have created).

I have tried using GenyMotion emulator and the native android emulator.. when I tried to use the native android emulator it just says "Waiting for device." for hours and nothing happens..

When I tried to use the GenyMotion emulator (which I personally prefer ) it shows me this message:

WARNING: linker: libdvm.so has text relocations. This is wasting memory and is a security risk. Please fix. pkg: /data/local/tmp/com.example.me.FirstApp Failure [INSTALL_FAILED_OLDER_SDK]

for this error I have found this answer, but I don't understand it.

What do I have to do in order to fix it?

Nimantha
  • 6,405
  • 6
  • 28
  • 69
user3783609
  • 53
  • 1
  • 1
  • 7
  • What's wrong with Eclipse? – RealDeal_EE'18 Jun 27 '14 at 17:11
  • well to be honest to story is : today i tried to update the SDK to the new L version and after i updated it , it messed up my Eclipse project.. after hours of trying to understand whats wrong i gave up and said to myself :"hey why not Android Studio?" and so i tried Android Studio(wich seems great by the way..) and then i encountered this problem... after hours of trying to fix this problem.. i thought maybe its the SDK? so i opened the SDK manager and i uninstalled all of the packages that i had.. and now Eclipse doesn't work at all.. – user3783609 Jun 27 '14 at 17:21

5 Answers5

0

According to your story I see that you updated your SDK and then the problem occurred.

I recommend you to redownload the SDK from here and then to replace the existing SDK on your Android Studio.

Nimantha
  • 6,405
  • 6
  • 28
  • 69
user3668496
  • 166
  • 1
  • 1
  • 8
0

I've met the same issue and fixed as follows.

  1. My environment
  • Android Studio 0.8 + GenyMotion2.2.2 on Windows8.1
  • Android 4.4W(API20) and Android 4.4.2(API19) SDK installed, running Android 4.4.2 emulator on GenyMotion.
  1. Solution
    Patched the 'build.gradle' file as follows:
    -- compileSdkVersion 'android-L'
    ++ compileSdkVersion 'android-19'

  2. Attention
    You will have to install Android 4.4.2 SDK if you've not installed before.

Nimantha
  • 6,405
  • 6
  • 28
  • 69
0

Change this Lines in your build.gradle

compileSdkVersion 'android-L' to compileSdkVersion 'android-19'

and

targetSdkVersion 'L' to targetSdkVersion 19

also

in your res/values-v21/styles.xml

<style name="AppTheme" parent="android:Theme.Material.Light"></style>
to 
<style name="AppTheme" parent="android:Theme.Holo.Light"></style>

and install 4.4.2 SDK platform

hash
  • 5,336
  • 7
  • 36
  • 59
0

I had a similar problem and found out that the issue was the GenyMotion device, which had an older SDK, namely SDK 19. I don't think GenyMotion supports android-L yet.

trauzti
  • 219
  • 1
  • 9
0

May be your 'com.android.tools.build:gradle:xxx' version is not corresponding with your gradle version!

Nimantha
  • 6,405
  • 6
  • 28
  • 69
  • 1
    This should be a comment. Not an answer. Once you have sufficient [reputation](http://stackoverflow.com/help/whats-reputation) you will be able to [comment on any post](http://stackoverflow.com/help/privileges/comment); instead, [provide answers that don't require clarification from the asker](http://meta.stackexchange.com/questions/214173/why-do-i-need-50-reputation-to-comment-what-can-i-do-instead). – Raju May 21 '16 at 03:40