Eclipse Error - Unable To Resolve Target 'android-23'

Discussion in 'Technical Discussion' started by simontt, Oct 28, 2016.

  1. simontt

    simontt Boxer

    Joined:
    Oct 13, 2016
    Messages:
    66
    Likes Received:
    18
    Hi All
    This is first time i am using Eclipse, it is quite confusing to get all right. Really hope someone can guide me what to do? Basically I just need to create APK which I can test it with my Samsung tablet.

    I got this msg in Eclipse console when importing the file generated from Buildbox
    May i know what is the issue below

    [2016-10-29 07:59:17 - com.game.dropctach] Unable to resolve target 'android-23'
    [2016-10-29 07:59:17 - google-play-services_lib] Unable to resolve target 'android-23'
    [2016-10-29 07:59:18 - com.game.dropctach] Unable to resolve target 'android-23'
    [2016-10-29 07:59:18 - com.game.dropctach] Unable to resolve target 'android-23'
    [2016-10-29 07:59:18 - com.game.dropctach] Unable to resolve target 'android-23'
    [2016-10-29 07:59:18 - com.game.dropctach] Unable to resolve target 'android-23'
    [2016-10-29 07:59:18 - google-play-services_lib] Unable to resolve target 'android-23'

    FYI below are the listed of program i installed in Android SDK manager
    1) Tools
    - Android SDK Tools - 25.2.2
    - Android SDK Platfrom-tools - 25
    - Android SDK Build-tools - 25

    2) Android 7.1.1(API 25)
    -SDK Platfrom
    - Android TV Intelx86 Atom System Images
    - Google APIs Intelx86 Atom_64 System Images
    - Google APIs Intelx86 Atom System Images

    3)Extras
    - Google USB Driver

    Am i missing some of the installation and caused above error?
    Thank you so much. Appreciate any help

    Thanks
    Simon
     
  2. jcalle

    jcalle Miniboss Boxer

    Joined:
    Sep 25, 2015
    Messages:
    1,192
    Likes Received:
    540
    simontt likes this.
  3. blad300

    blad300 Serious Boxer

    Joined:
    Oct 8, 2015
    Messages:
    515
    Likes Received:
    276
    He must know what is happen..
    You must update you SDK in your Manifest
     
    simontt likes this.
  4. simontt

    simontt Boxer

    Joined:
    Oct 13, 2016
    Messages:
    66
    Likes Received:
    18
    Hi Jcalle
    First of all thank you so much. I follow your video which is really helpful and managed export APK but half way processing it stop and this msg shown.
    "No DEX file found" then the build stopped.
    Any idea what to do next?

    Thanks
    Simon

     
  5. blad300

    blad300 Serious Boxer

    Joined:
    Oct 8, 2015
    Messages:
    515
    Likes Received:
    276
    I have installed API from 19 to 25 in SDK Manager .
    1 - You can chose your target API in Android Manifest .
    2 - You can change API for some projects from "Project Properties" .
    Download what API you want .
    Import your project in eclipse and after eclipse load and finish build, right click of your Project->Properties->Android->Chose what API you want to use.
    Modify your project Manifest ( target api is set to 23, change with what api you have selected in project )
    After that you must Clean Project .
    Before export, you must uncheck for lint error from Project->Properties->Android->Lint .
    And Uncheck from Project->Properties->Android->Build . Force error when external jars....and Skip packaging......
    Export your signed app now.
     
    simontt likes this.
  6. jcalle

    jcalle Miniboss Boxer

    Joined:
    Sep 25, 2015
    Messages:
    1,192
    Likes Received:
    540
    Hello, please contact me by PM to connect to your PC remotely (Teamviewer)
     
    simontt likes this.
  7. aayushxn

    aayushxn Boxer

    Joined:
    Aug 15, 2016
    Messages:
    72
    Likes Received:
    7
    Have You resolved Lint threads?
     
  8. simontt

    simontt Boxer

    Joined:
    Oct 13, 2016
    Messages:
    66
    Likes Received:
    18
    Hi Blad300
    Thanks for the step by step, it solved my issue on below step
    And Uncheck from Project->Properties->Android->Build . Force error when external jars....and Skip packaging......
    That is good as i can successfully created the .APK.
    However when i try to install the app to my samsung tablet the msg "App not installed" .

    FYI below is my AndroidManifest.xml
    ------------------------------------------------------------
    <?xml version="1.0" encoding="utf-8"?>
    <manifest xmlns:android="http://schemas.android.com/apk/res/android"
    package="com.game.dropctach2"
    android:versionCode="1"
    android:versionName="1.0" android:installLocation="preferExternal">

    <uses-sdk android:minSdkVersion="11" android:targetSdkVersion="23"/>

    <application android:label="@string/app_name"
    android:icon="@drawable/icon"
    android:allowBackup="true">

    <meta-data android:name="com.google.android.gms.version"
    android:value="@integer/google_play_services_version" />
    <meta-data android:name="com.google.android.gms.games.APP_ID"
    android:value="@string/app_id" />

    <activity android:name=".PTPlayer"
    android:label="@string/app_name"
    android:screenOrientation="portrait"
    android:theme="@android:style/Theme.NoTitleBar.Fullscreen"
    android:configChanges="orientation">
    <intent-filter>
    <action android:name="android.intent.action.MAIN" />
    <category android:name="android.intent.category.LAUNCHER" />
    </intent-filter>
    </activity>

    <!-- FACEBOOK SDK --><!--
    <activity android:name="com.facebook.ads.InterstitialAdActivity"
    android:configChanges="keyboardHidden|orientation"
    android:screenOrientation="portrait"/>
    --><!-- FACEBOOK SDK -->

    <!-- ADMOB --><!--
    <activity android:name="com.google.android.gms.ads.AdActivity"
    android:configChanges="keyboard|keyboardHidden|orientation|screenLayout|uiMode|screenSize|smallestScreenSize"
    android:theme="@android:style/Theme.Translucent" />
    <activity
    android:name="com.vungle.publisher.FullScreenAdActivity"
    android:configChanges="keyboardHidden|orientation|screenSize"
    android:theme="@android:style/Theme.NoTitleBar.Fullscreen"/>
    --><!-- ADMOB -->

    <!-- HEYZAP --><!--
    <activity android:name="com.heyzap.sdk.ads.HeyzapInterstitialActivity"
    android:configChanges="keyboardHidden|orientation|screenSize|smallestScreenSize" />
    <activity android:name="com.heyzap.sdk.ads.HeyzapVideoActivity"
    android:configChanges="keyboardHidden|orientation|screenSize|smallestScreenSize" />
    <activity android:name="com.heyzap.sdk.ads.HeyzapProxyActivity" />
    <activity android:name="com.heyzap.sdk.ads.VASTActivity"
    android:configChanges="keyboardHidden|orientation|screenSize|smallestScreenSize" />
    <activity android:name="com.heyzap.sdk.ads.MediationTestActivity" />
    <receiver android:name="com.heyzap.sdk.ads.PackageAddedReceiver">
    <intent-filter>
    <data android:scheme="package"/>
    <action android:name="android.intent.action.PACKAGE_ADDED"/>
    </intent-filter>
    </receiver>
    --><!-- HEYZAP -->

    <!-- APPLOVIN SDK --><!--
    <activity android:name="com.applovin.adview.AppLovinInterstitialActivity" />
    <activity android:name="com.applovin.adview.AppLovinConfirmationActivity" />
    <meta-data
    android:name="applovin.sdk.key"
    android:value="{{AppLovin_SDK_key}}" />
    --><!-- APPLOVIN SDK -->

    <!-- REVMOB --><!--
    <activity android:name="com.revmob.FullscreenActivity"
    android:theme="@android:style/Theme.Translucent"
    android:configChanges="keyboardHidden|orientation">
    </activity>
    <meta-data android:name="com.revmob.app.id" android:value="{{RevMobMediaID}}"/>
    --><!-- REVMOB -->

    </application>

    <supports-screens android:largeScreens="true"
    android:smallScreens="true"
    android:anyDensity="true"
    android:normalScreens="true"/>

    <uses-permission android:name="android.permission.INTERNET" />

    <uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
    <uses-permission android:name="android.permission.ACCESS_WIFI_STATE"/>
    <uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" />
    <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
    <uses-permission android:name="android.permission.READ_PHONE_STATE"/>

    </manifest>
    ------------------------------------------------------------------------------------------


    FYI - i set project/properties/Project Build Target i selected Android 6.0, API 23.
    i have a questions in the Android SDK manager Android 6.0(API23) i only install SDK Platfrom and Source for Android SDK, I didn't install other like Android TV Arm EABI v7a System Images, Android wear blah blah blah.. Do i need to install all of those?

    Thank you so much. Appreciated all the help.
    Simon
     
    Last edited: Nov 2, 2016
  9. simontt

    simontt Boxer

    Joined:
    Oct 13, 2016
    Messages:
    66
    Likes Received:
    18
    Hi Jcalle
    Thank you so much for offering help via PC remote, but i am not sure how to do those teamveiwer. Gonna to figure it out
     
  10. simontt

    simontt Boxer

    Joined:
    Oct 13, 2016
    Messages:
    66
    Likes Received:
    18
    Hi All
    This is really a strange and frustrating experience to get the APK works fine. I finally managed to get the the APK generated and installed successfully on my samsung tablet after hours of hours researching and also getting help from Blad300 and jcalle. Thank you so much.

    Below are my setting under properties
    1) Java Compiler : 1.7
    2) Android 7.1.1, API 25
    3) Android Lint Preferences - ignore all
    Under window preference
    1) Lint Error Checking - ignore all and uncheck "Run full error check when exporting app and..."
    2) Android/Build only check/tick "Skip packaging and dexing until export or launch.
    Under AndroidManifest.xml change below from 23 to 25
    <uses-sdk android:minSdkVersion="11" android:targetSdkVersion="25"/>

    BUT the result is not consistent - it is so strange, i recorded all the setting and i do it once again by exporting same file but rename the buildbox to another filename, and set different Bundle ID and then export. Go eclipse and do the process once again.
    I noitce each time i export from BB i have different error like "Dalvik format failed with error 1","No DEX file found" etc.

    My question is do you think each time export file from Buildbox the file are different? as each time it will have different error? i really don't want to go through same error in future or each time i want to convert to APK.

    Thanks
    Simon
     
  11. blad300

    blad300 Serious Boxer

    Joined:
    Oct 8, 2015
    Messages:
    515
    Likes Received:
    276
    Every workspace in eclipse is different, so you must uncheck all lint and build settings in every workspace
    Before export your project Clean it (-----> Clean Project .)

    keep the files in workspace, take for screenshots of project properties....
     
    simontt likes this.
  12. simontt

    simontt Boxer

    Joined:
    Oct 13, 2016
    Messages:
    66
    Likes Received:
    18
    Hi Blad300
    Yea. i did save new workspace folder like new workspace 1, new workspace2 etc and also clean it/clean project every time and redo all the setting as i listed last post. The reason i said BB might export difference files as once i imported BB exported file each time it have different error.

    example new workspace1 will have below error in console
    [2016-11-03 17:40:09 - com.game.dropctach26] (skipping file '.dummy' due to ANDROID_AAPT_IGNORE pattern '.*')
    [2016-11-03 17:40:09 - com.game.dropctach26] (skipping file '.dummy' due to ANDROID_AAPT_IGNORE pattern '.*')
    [2016-11-03 17:40:09 - com.game.dropctach26] (skipping file '.dummy' due to ANDROID_AAPT_IGNORE pattern '.*')
    [2016-11-03 17:40:09 - com.game.dropctach26] (skipping file '.dummy' due to ANDROID_AAPT_IGNORE pattern '.*')
    [2016-11-03 17:40:09 - com.game.dropctach26] (skipping file '.dummy' due to ANDROID_AAPT_IGNORE pattern '.*')
    [2016-11-03 17:40:09 - com.game.dropctach26] (skipping file '.dummy' due to ANDROID_AAPT_IGNORE pattern '.*')
    [2016-11-03 17:40:09 - com.game.dropctach26] D:\2_IM\000000_mobile game_buildbox\0_new game1\buildgame\BB_final\dropcatch_26\dropcatch26\android\AndroidManifest.xml:13: error: Error: No resource found that matches the given name (at 'value' with value '@integer/google_play_services_version').

    example new workspace2 no error in console after setting
    but then export signed application package.. to create APK then "No DEX file found"

    example new workspace3 no error in console after setting
    but then export signed application package.. to create APK then "Dalvik format failed with error 1"

    Very strange.. it is not consistent

     
  13. blad300

    blad300 Serious Boxer

    Joined:
    Oct 8, 2015
    Messages:
    515
    Likes Received:
    276
    At workspace 1 - you did'nt add corectly Google play services
    At workspace 2 - you must read how to uncheck for "Build"
    At wordspace 3 - you must read how to uncheck for "Build"

    Export a fresh BB project .
    Open Eclipse and delete all you have inside your project .
    Restart Eclipse .
    Open Eclipse and Import the project .
    Read again how to add API 25 to your project .
    Clean your project .
    Read again how to uncheck Lint and Build .

    Let as to show you by team viewer once...
     
    simontt likes this.
  14. simontt

    simontt Boxer

    Joined:
    Oct 13, 2016
    Messages:
    66
    Likes Received:
    18
    Hi All

    My problem solved, all thanks to Jcalle, he connected to my PC remotely (Teamviewer) and magic started happen haha. Big Thumb up to him. It is really important to clean and refresh and also other step like Java compiler to 1.7, uncheck in window preference under Android Build skip packing and dexing..

    Thanks
    Simon
     

Share This Page