“sencha app build native”给我这个错误:
[aapt]生成资源ID ...
[aapt] C:\ wamp \ www \ sencha_app \ build \ native-package-mobile \ my_app \ packager.json \ bin \ AndroidManifest.xml:7:错误:错误:找不到与给定名称匹配的资源(在'icon'处,其值为'@ drawable / icon')。
建筑失败
C:\ ADT \ sdk \ tools \ ant \ build.xml:653:执行此行时发生以下错误:
C:\ ADT \ sdk \ tools \ ant \ build.xml:698:返回null:1
总时间:1秒
“”C:/ ADT / sdk \ tools \ android“创建项目--target android-19 --name my_app --activity STActivity --path”C:\ wamp \ www \ sencha_app / build / native-package-mobile / my_app / packager.json /“ - package com.pocketmedia.my_app”
无法运行ant并出现错误:1
无法打包申请
[错误]
[ERR]建筑失败
[ERR] com.sencha.exceptions.ExProcess:stbuild以非零代码退出:7
[错误]在org.apache.tools.ant.Target.performTasks(Targ
[ERR] et.java:413)
[错误]
[ERR]总时间:13秒
[ERR]执行此行时发生以下错误:
C:\ wamp \ www \ sencha_app \ .sencha \ app \ build-impl.xml:422:执行此行时发生以下错误:
C:\ wamp \ www \ sencha_app.sencha \ app \ packager-impl.xml:112:执行此行时发生以下错误:
C:\ wamp \ www \ sencha_app \ .sencha \ app \ packager-impl.xml:114:执行此行时发生以下错误:
C:\ wamp \ www \ sencha_app \ .sencha \ app \ packager-impl.xml:98:执行此行时发生以下错误:
C:\ wamp \ www \ sencha_app \ .sencha \ app \ packager-impl.xml:7:com.sencha.exceptions.ExProcess:stbuild以非零代码退出:7
我的package.json
{
/**
* @cfg {String} applicationName
* @required
* This is the name of your application, which is displayed on the device when the app is installed. On IOS, this should match
* the name of your application in the Apple Provisioning Portal.
*/
"applicationName":"my_app",
/**
* @cfg {String} applicationId
* This is the name namespace for your application. On IOS, this should match the name of your application in the Apple Provisioning Portal.
*/
"applicationId":"com.company.my_app",
/**
* @cfg {String} bundleSeedId
* A ten character string which stands before aplication ID in Apple Provisioning Portal
*/
"bundleSeedId":"KPXFEPZ6EF",
/**
* @cfg {String} versionString
* @required
* This is the version of your application.
*/
"versionString":"1.0",
/**
* @cfg {Integer} versionCode
* @required
* This is the integer version code of your application, or you can refer to it as a build number. Used only for Android builds.
*/
"versionCode":"1",
/**
* @cfg {Object} icon
* For iOS, please refer to their documentation about icon sizes:
* https://developer.apple.com/library/ios/documentation/userexperience/conceptual/mobilehig/IconMatrix.html
*
* For Android, please refer to the Google Launcher icons guide:
* http://developer.android.com/design/style/iconography.html
*
* iOS 7 uses 60, 76, 120, 152 (29, 58 for the Settings app; 40, 80 for Spotlight search results).
* iOS 6.1 and earlier uses 57, 72, 114, 144 (29, 58 for the Settings app, for Spotlight search results on iPhone; 50 and 100 for Spotlight search results on iPad).
* Android uses 36, 48, 72, 96.
* If you package for Android you can ignore iOS icons and vice versa.
*/
"icon": {
"60":"resources/icons/Icon.png",
"120":"resources/icons/Icon@2x.png",
"76":"resources/icons/Icon~ipad.png",
"152":"resources/icons/Icon~ipad@2x.png",
"36":"resources/icons/Icon-36.png",
"48":"resources/icons/Icon-48.png",
"96":"resources/icons/Icon-96.png",
"57":"resources/icons/Icon-57.png",
"114":"resources/icons/Icon-57@2x.png",
"72":"resources/icons/Icon-72.png",
"144":"resources/icons/Icon-72@2x.png",
"29":"resources/icons/Icon-Small.png",
"58":"resources/icons/Icon-Small@2x.png",
"40":"resources/icons/Icon-Small-40.png",
"80":"resources/icons/Icon-Small-40@2x.png",
"50":"resources/icons/Icon-Small-50.png",
"100":"resources/icons/Icon-Small-50@2x.png"
},
/**
* @cfg {String} inputPath
* @required
* This is location of your Sencha Touch 2 application, relative to this configuration file.
*/
"inputPath":"./",
/**
* @cfg {String} outputPath
* @required
* This is where the built application file with be saved. Make sure that output path is not in your input path, you may get into endless recursive copying
*/
"outputPath":"../build/",
/**
* @cfg {String} configuration
* @required
* This is configuration for your application. `Debug` should always be used unless you are submitting your app to an online
* store - in which case `Release` should be specified.
*/
"configuration":"Debug",
/**
* @cfg {String} platform
* @required
* This is the platform where you will be running your application. Available options are:
* - iOSSimulator
* - iOS
* - Android
* - AndroidEmulator
*/
"platform":"Android",
/**
* @cfg {String} deviceType
* @required
* This is device type that your application will be running on.
*
* If you are developing for Android, this is not necessary.
*
* Available options are:
* - iPhone
* - iPad
* - Universal
*/
"deviceType":"Universal",
/**
* @cfg {String} certificatePath
* This is the location of your certificate.
* This is required when you are developing for Android or you are developing on Windows.
*/
"certificatePath":"./appkey.keystore",
/**
* @cfg {String} certificateAlias
* This is the name of your certificate.
*
* IF you do not specify this on OSX, we will try and automatically find the certificate for you using the applicationId.
*
* This can be just a simple matcher. For example, if your certificate name is "iPhone Developer: Robert Dougan (ABCDEFGHIJ)", you
* can just put "iPhone Developer".
*
* When using a certificatePath on Windows, you do not need to specify this.
*/
"certificateAlias":"app_keystore",
/**
* @cfg {String} certificatePassword
* The password which was specified during certificate export
*/
"certificatePassword":"password",
/**
* @cfg {String} provisionProfile
* The path to the provision profile (APP_NAME.mobileprovision) which you can create and then download from Apple's provisioning portal
*/
"provisionProfile":"",
/**
* @cfg {String} URLScheme
* URL scheme for communication with your application, can be empty if you don't use custom URL scheme in your project.
*/
"URLScheme":"",
/**
* @cfg {String} notificationConfiguration
* Notification configuration for push notifications, can be "debug", "release" or empty if you don't use push notifications in your project.
*/
"notificationConfiguration":"",
/**
* @cfg {String} sdkPath
* This is the path to the Android SDK, if you are developing an Android application.
*/
"sdkPath":"C:/ADT/sdk",
/**
* @cfg {String} androidAPILevel
* This is android API level, the version of Android SDK to use, you can read more about it here: http://developer.android.com/guide/appendix/api-levels.html.
* Be sure to install corresponding platform API in android SDK manager (android_sdk/tools/android)
*/
"androidAPILevel":"19",
/**
/**
* @cfg {Array[String]} permissions
* Array of permissions that is used by an application (Android only)
* Full list of permissions for Android application can be found here: http://developer.android.com/reference/android/Manifest.permission.html#ACCESS_CHECKIN_PROPERTIES
*/
"permissions":[
"INTERNET",
"ACCESS_NETWORK_STATE",
"VIBRATE"
],
/**
* @cfg {Array[String]} orientations
* @required
* This is orientations that this application can run.
*/
"orientations": [
"portrait"
]
}
我的操作系统是 Windows 7 Home Edition 64bit
Sencha版本:2.3.1
Sencha CMD:4.0.4.84
Sencha工具:2.0.0-beta3
JDK版本:1.7.0_01
Ant版本:1.9.3
答案 0 :(得分:0)
C:\ wamp \ www \ sencha_app.sencha \ app \ build-impl.xml:422:以下 执行此行时发生错误:
C:\ wamp \ www \ sencha_app.sencha \ app \ packager-impl.xml:112:以下 执行此行时发生错误:
C:\ wamp \ www \ sencha_app.sencha \ app \ packager-impl.xml:114:The 执行此行时发生以下错误:
C:\ wamp \ www \ sencha_app.sencha \ app \ packager-impl.xml:98:以下 执行此行时发生错误:
C:\瓦帕\ WWW \ sencha_app.sencha \应用\打包器-impl.xml中:7:
我遇到了同样的问题。
在Android SDK Manager中安装所需的SDK平台为我修复了它。
希望这有助于你:P
答案 1 :(得分:0)
我在构建文件夹下创建了一个文件夹,并将其命名为res,然后在res下将另一个名为drawable的文件命名为res,然后复制该图标。
它有效:)