简体   繁体   中英

Appcelerator studio android app failed to run

I have installed fresh appcelerator studio and titanium CLI and also other dependancies when I am trying to run android app then it showing the following error :

[INFO] :   Packaging application: ../sw/android-sdk-macosx/build-tools/24.0.2/aapt "package" "-f" "-m" "-J" "WorkData/Appcelator Projects/test/build/android/gen" "-M" "../Appcelator Projects/test/build/android/AndroidManifest.xml" "-A" "../WorkData/Appcelator Projects/test/build/android/bin/assets" "-S" "../WorkData/Appcelator Projects/test/build/android/res" "-I" "../sw/android-sdk-macosx/platforms/android-23/android.jar" "-F" "../WorkData/Appcelator Projects/test/build/android/bin/app.ap_" "--auto-add-overlay" "--extra-packages" "ti.modules.titanium.ui:android.support.v7.appcompat:android.support.v7.cardview" "-S" "/var/folders/jf/f17wzygx4nbd6fg5wsntf4840000gn/T/116820-1742-1nuy1sx.xxrqp30udi/res" "-S" "/var/folders/jf/f17wzygx4nbd6fg5wsntf4840000gn/T/116820-1742-hop1bc.t53b359udi/res" "-S" "/var/folders/jf/f17wzygx4nbd6fg5wsntf4840000gn/T/116820-1742-6n4mu0.4svn3o9a4i/res"
2016-09-20T06:14:33.921Z | ERROR  | An uncaught exception was thrown!
Path must be a string. Received undefined
2016-09-20T06:14:33.922Z | ERROR  | Path must be a string. Received undefined

and also I am able to run same project on iPhone.

My machine Configuration is as follows :

Operating System
  Name                        = Mac OS X
  Version                     = 10.11.6
  Architecture                = 64bit
  # CPUs                      = 4
  Memory                      = 8589934592
Node.js
  Node.js Version             = 6.5.0
  npm Version                 = 3.10.3
Titanium CLI
  CLI Version                 = 5.0.9
Titanium SDK
  SDK Version                 = 5.5.0.GA
  SDK Path                    = /Users/neosoft/Library/Application Support/Titanium/mobilesdk/osx/5.5.0.GA
  Target Platform             = android
Command

can anyone help me to resolve issue ...

You appear to be using Build Tools SDK 24.#. This is not yet supported by Appcelerator. You should un-install this version and install 23 (the latest supported by appcelerator).

I recommend watching the Compatibility Matrix from time to time.

After that select the minSDK and targetSDK in Tiapp.xml like this:

<android xmlns:android="http://schemas.android.com/apk/res/android">
    <manifest android:versionCode="1"
        android:versionName="1.0.0" package="app.my" xmlns:android="http://schemas.android.com/apk/res/android">
        <uses-sdk android:minSdkVersion="16" targetSdkVersion="23"/>
    </manifest>
</android>

See my Android SDK folder looks like this:

Try to look at your Android SDK folders and check if there is anything related to version 24. And also do these tasks after deleting everything related to 24 version:

  • Remove the uses-sdk tag from tiapp.xml and let Titanium SDK do stuffs on its own.
  • Delete build and Resources folders from your Titanium project root directory
  • Clean and run the project now.

在此输入图像描述

在此输入图像描述

在此输入图像描述

Check your version of node.js with this command:

node -v

If your version is higher than 4.4.2 that's the problem. You can fix it with:

sudo npm cache clean -f
sudo npm install -g n
sudo n 4.4.2

I had the same issue and got resolved after changing my node version to 4.4.2. Just updating it here if that may help anyone.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM