简体   繁体   English

Appcelerator工作室Android应用程序无法运行

[英]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 : 当我尝试运行Android应用程序然后它显示以下错误时,我已经安装了新的appcelerator工作室和钛CLI以及其他依赖项:

[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. 而且我也可以在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.#. 您似乎正在使用Build Tools SDK 24.#。 This is not yet supported by Appcelerator. Appcelerator尚不支持此功能。 You should un-install this version and install 23 (the latest supported by appcelerator). 您应该卸载此版本并安装23(appcelerator支持的最新版本)。

I recommend watching the Compatibility Matrix from time to time. 我建议不时观看兼容性矩阵

After that select the minSDK and targetSDK in Tiapp.xml like this: 之后在minSDK中选择minSDKtargetSDK ,如下所示:

<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: 看我的Android SDK文件夹如下所示:

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: 尝试查看您的Android SDK文件夹并检查是否存在与版本24相关的任何内容。并在删除与24版本相关的所有内容后执行以下任务:

  • Remove the uses-sdk tag from tiapp.xml and let Titanium SDK do stuffs on its own. tiapp.xml中删除uses-sdk标记,让Titanium SDK独立完成。
  • Delete build and Resources folders from your Titanium project root directory 从Titanium项目根目录中删除构建资源文件夹
  • Clean and run the project now. 立即清理并运行项目。

在此输入图像描述

在此输入图像描述

在此输入图像描述

Check your version of node.js with this command: 使用以下命令检查node.js的版本:

node -v

If your version is higher than 4.4.2 that's the problem. 如果您的版本高于4.4.2,那就是问题所在。 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. 我遇到了同样的问题,并在将节点版本更改为4.4.2后得到了解决。 Just updating it here if that may help anyone. 如果这可以帮助任何人,只需在此更新。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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