I'm trying to build android app using Crosswalk. I followed this official guideto set up.
And succeed in building example project. But after when I try to build from my own HTML5 project, it builds failed.
ERROR Outputs:
Starting application build (arm)
* Checking keystore for signing
No keystore provided for signing. Using xwalk's keystore for debugging.
Please use a valid keystore when distributing to the app market.
* Updating project with xwalk_core_library
* Checking for external extensions
* Copying native libraries for arm
* Building Android apk package with Crosswalk embedded (arm)
[javac] warning: [options] source value 1.5 is obsolete and will be removed in a future release
[javac] warning: [options] target value 1.5 is obsolete and will be removed in a future release
[javac] warning: [options] To suppress warnings about obsolete options, use -Xlint:-options.
[javac] 3 warnings
[javac] warning: [options] source value 1.5 is obsolete and will be removed in a future release
[javac] warning: [options] target value 1.5 is obsolete and will be removed in a future release
[javac] warning: [options] To suppress warnings about obsolete options, use -Xlint:-options.
[javac] 3 warnings
BUILD FAILED
/home/jian/app/android-sdk-linux/tools/ant/build.xml:928: The following error occurred while executing this line:
/home/jian/app/android-sdk-linux/tools/ant/build.xml:946: null returned: 1
Total time: 40 seconds
Command "/home/jian/app/ant/bin/ant release -f /tmp/Threecakes-Qqo589/build.xml -Dkey.store=/home/jian/app/crosswalk-14.43.343.17/xwalk-debug.keystore -Dkey.alias=xwalkdebugkey -Dkey.store.password=xwalkdebug -Dkey.alias.password=xwalkdebug" exited with non-zero exit code 1
This is my environment setting:
export JAVA_HOME=/usr/lib/jvm/java-8-oracle
export ANDROID_HOME=/home/jian/app/android-sdk-linux
export ANT_HOME=/home/jian/app/ant
export PATH=/home/jian/app/ant/bin:/usr/lib/jvm/java-8-oracle/bin:$PATH
export PATH=/home/jian/app/android-sdk-linux:$PATH
export PATH=/home/jian/app/android-sdk-linux/tools:$PATH
export PATH=/home/jian/app/android-sdk-linux/platform-tools:$PATH
This is version information:
java -version
java version "1.8.0_51"
Java(TM) SE Runtime Environment (build 1.8.0_51-b16)
Java HotSpot(TM) 64-Bit Server VM (build 25.51-b03, mixed mode)
ant -version
Apache Ant(TM) version 1.9.6 compiled on June 29 2015
adb help
Android Debug Bridge version 1.0.32
crosswalk version
14.43.343.17
And This is part of ant/build.xml where the error occured.
<target name="-package-resources" depends="-crunch">
<!-- only package resources if *not* a library project -->
<do-only-if-not-library elseText="Library project: do not package resources..." >
<aapt executable="${aapt}"
command="package"
versioncode="${version.code}"
versionname="${version.name}"
debug="${build.is.packaging.debug}"
manifest="${out.manifest.abs.file}"
assets="${asset.absolute.dir}"
androidjar="${project.target.android.jar}"
apkfolder="${out.absolute.dir}"
nocrunch="${build.packaging.nocrunch}"
resourcefilename="${resource.package.file.name}"
resourcefilter="${aapt.resource.filter}"
libraryResFolderPathRefid="project.library.res.folder.path"
libraryPackagesRefid="project.library.packages"
libraryRFileRefid="project.library.bin.r.file.path"
previousBuildType="${build.last.target}"
buildType="${build.target}"
ignoreAssets="${aapt.ignore.assets}">
<res path="${out.res.absolute.dir}" />
<res path="${resource.absolute.dir}" />
<!-- <nocompress /> forces no compression on any files in assets or res/raw -->
<!-- <nocompress extension="xml" /> forces no compression on specific file extensions in assets and res/raw -->
</aapt>
</do-only-if-not-library>
</target>
Why I succeed in building example project but failed to building my own project? And how do I fix this error. Thank you for your help!
I had the same problem.
I downgrade version of Java to fix it :
java -version
java version "1.7.0_51"
Java(TM) SE Runtime Environment (build 1.7.0_51-b13)
Java HotSpot(TM) 64-Bit Server VM (build 24.51-b03, mixed mode)
You can report your issue to https://crosswalk-project.org/jira/browse/ to get faster response from Crosswalk developer.
Related
I'm trying to compile a new project on cmd using cocos2d-x v3.10, but the build is failing and I'm getting the following error:
The output as seen on cmd.
-pre-compile:
-compile:
[javac] Compiling 29 source files to D:\Varun\MyApp\MyApp\cocos2d\cocos\platform
\android\java\bin\classes
[javac] error: error reading D:\Varun\MyApp\MyApp\cocos2d\cocos\platform\android
\java\libs\._android-async-http-1.4.8.jar; error in opening zip file
[javac] warning: [options] source value 1.5 is obsolete and will be removed
in a future release
[javac] warning: [options] target value 1.5 is obsolete and will be removed
in a future release
[javac] warning: [options] To suppress warnings about obsolete options, use
-Xlint:-options.
[javac] 1 error
[javac] 3 warnings
BUILD FAILED
D:\adt-bundle-windows-x86_64-20140321\sdk\tools\ant\build.xml:601: The following
error occurred while executing this line:
D:\adt-bundle-windows-x86_64-20140321\sdk\tools\ant\build.xml:720: The following
error occurred while executing this line:
D:\adt-bundle-windows-x86_64-20140321\sdk\tools\ant\build.xml:734: Compile faile
d; see the compiler error output for details.
Total time: 2 seconds
Error running command, return code: 1.
I'm using the following:
JDK: 1.8.0_73
Android api: 19
NDK: r9
Ant: 1.9.6
Python: 2.7.11
I think ._android-async-http-1.4.8.jar is a hidden file or the file is corrupted.
For case one, just rename it to android-async-http-1.4.8.jar and refer it to again.
For case two, just download a new one.
I'm trying to build a web app with Crosswalk and I get an error while following the example tutorial from here : https://crosswalk-project.org/documentation/getting_started/run_on_android.html
Console :
>>python make_apk.py --package=org.crosswalkproject.example \ --manifest=xswag/manifest.json
Checking manifest file
Checking system requirements...ok
options.arch: x86
Starting application build (x86)
* Checking keystore for signing
No keystore provided for signing. Using xwalks keystore for debugging.
Please use a valid keystore when distributing to the app market.
* Updating project with xwalk_core_library
* Checking for external extensions
* Copying native libraries for x86
* Building Android apk package with Crosswalk embedded (x86)
BUILD FAILED
C:\Users\Jules\AppData\Local\Android\android-sdk\tools\ant\build.xml:601: The following error occurred while executing this line:
C:\Users\Jules\AppData\Local\Android\android-sdk\tools\ant\build.xml:653: The following error occurred while executing this line:
C:\Users\Jules\AppData\Local\Android\android-sdk\tools\ant\build.xml:698: null returned: 1
Total time: 4 seconds
Command "C:\ant-1.9.4\bin\ant.bat release -f C:\Users\Jules\AppData\Local\Temp\Example-2kvo67im\build.xml -Dkey.store=C:\Users\Jules\Desktop\crosswalk-11.40.277
.7\xwalk-debug.keystore -Dkey.alias=xwalkdebugkey -Dkey.store.password=xwalkdebug -Dkey.alias.password=xwalkdebug" exited with non-zero exit code 1
build.xml lines 683 to 701 :
<echo level="info">----------</echo>
<echo level="info">Handling Resources...</echo>
<aapt executable="${aapt}"
command="package"
verbose="${verbose}"
manifest="${out.manifest.abs.file}"
originalManifestPackage="${project.app.package}"
androidjar="${project.target.android.jar}"
rfolder="${gen.absolute.dir}"
nonConstantId="${android.library}"
libraryResFolderPathRefid="project.library.res.folder.path"
libraryPackagesRefid="project.library.packages"
libraryRFileRefid="project.library.bin.r.file.path"
ignoreAssets="${aapt.ignore.assets}"
binFolder="${out.absolute.dir}"
proguardFile="${out.absolute.dir}/proguard.txt">
<res path="${out.res.absolute.dir}" />
<res path="${resource.absolute.dir}" />
</aapt>
Line 698 is proguardFile="${out.absolute.dir}/proguard.txt">
I have Python, ant, adb, Android JDK, Java and Oracle JDK installed and my Path variable is working.
I was getting similar errors when building apk using apache-ant (1.9.7).
I found that it needed java 8 version to convert it successfully (.class to .dex and then apk), initially I had java 7.
There needs to be some pre-requisite regarding versions of all the tools we use in this process i.e compliance of Android-NDK tools, Android-SDK tools, apache-ant an java (jdk/jre) versions in order to successfully get the apk. Since we do not get any relevant print/error message pointing to actual problem for such issues, we end up spending hard time to debug it. Thus make sure that you are all good with the versions of all tools in use.
I had the same issue, fixed it by installing lib32z1 lib32z1-dev
To see more verbose output try to use:
python make_apk.py --package=org.crosswalkproject.example \ --manifest=xswag/manifest.json --verbose
Hi World App is running in simulator but not generating the BUILD files.
I am getting this error
goBlank:
testFail:
setupJavac:
jar:
[echo] Compile is forcing compliance to the supported API's/features for maximum device compatibility. This allows smaller
[echo] code size and wider device support
[copy] Copying 1 file to E:\rainforest\rfl1\rfl1-1\testcodenameone\build\tmp
[javac] E:\rainforest\rfl1\rfl1-1\testcodenameone\build.xml:131: warning: 'includeantruntime' was not set, defaulting to build.sysclasspath=last; set to false for repeatable builds
[javac] Compiling 3 source files to E:\rainforest\rfl1\rfl1-1\testcodenameone\build\tmp
[jar] Building jar: E:\rainforest\rfl1\rfl1-1\testcodenameone\dist\testcodenameone.jar
[javac] E:\rainforest\rfl1\rfl1-1\testcodenameone\build.xml:155: warning: 'includeantruntime' was not set, defaulting to build.sysclasspath=last; set to false for repeatable builds
BUILD FAILED
E:\rainforest\rfl1\rfl1-1\testcodenameone\build.xml:155: Class not found: javac1.8
Total time: 3 seconds
You need Eclipse itself to run under JDK 1.7 (this needs to be configured via the Eclipse ini file). Also make sure JAVA_HOME points to JDK 1.7.
Command:
C:\Users\Vince\Desktop\cordova-android\framework>ant jar
Build:
-check-env:
[checkenv] Android SDK Tools Revision 23.0.2
[checkenv] Installed at D:\softs\android-SDK
-setup:
[echo] Project Name: Cordova
[gettype] Project Type: Android Library
-build-setup:
[getbuildtools] Using latest Build Tools: 20.0.0
[echo] Resolving Build Target for Cordova...
[gettarget] Project Target: Android 4.3
[gettarget] API level: 18
[echo] ----------
ERROR:
[javac] symbol: method setWebContentsDebuggingEnabled(boolean)
[javac] location: class CordovaWebView
[javac] C:\Users\Vince\Desktop\cordova-android\framework\src\org\apache\co
rdova\IceCreamCordovaWebViewClient.java:78: error: cannot find symbol
[javac] return android.os.Build.VERSION.SDK_INT >= android.os.Build.
VERSION_CODES.KITKAT && "content".equals(uri.getScheme());
[javac]
^
[javac] symbol: variable KITKAT
[javac] location: class VERSION_CODES
[javac] Note: C:\Users\Viince\Desktop\cordova-android\framework\src\org\apa
che\cordova\CordovaWebView.java uses or overrides a deprecated API.
[javac] Note: Recompile with -Xlint:deprecation for details.
[javac] 4 errors
BUILD FAILED
D:\softs\android-SDK\tools\ant\build.xml:720: The following error occurred while
executing this line:
D:\softs\android-SDK\tools\ant\build.xml:734: Compile failed; see the compiler e
rror output for details.
Total time: 1 second
Any advice to take down this error would be great! thanks to all people who will put an answer. I have Android SDK build-tools 20.
I fixed this exact error by opening the project in Eclipse and then right clicking on the CordovaLib Project then properties, and then under 'Android' ensuring API version 19 was selected.
This matched what i had selected in My App project and what is entered below.
Then i ran the commands as described here:
https://github.com/Wizcorp/phonegap-facebook-plugin/blob/master/platforms/android/README.md
android update project -p platforms/android/
cd platforms/android/
ant clean
cd FacebookLib
ant clean
open -e AndroidManifest.xml
// change your minSdkVersion and your targetSdkVersion to your environment settings for me it was:
// <uses-sdk android:minSdkVersion="14" android:targetSdkVersion="19" />
ant release
cd ../../..
cordova build android
I am new to ant and Android uiautomator. When using ant to build my testing program I get:
-dex:
[dex] input: c:\Eclipse\workspace\Android\bin\classes
[dex] Converting compiled files and external libraries into c:\Eclipse\wor
kspace\Android\bin\classes.dex...
[dx] no classfiles specified
BUILD FAILED
C:\Android\sdk\tools\ant\uibuild.xml:198: null returned: 1
This is on the sample test code at: http://developer.android.com/tools/testing/testing_ui.html#sample
The full output from running the 'android create uitest...' and 'ant build' commands follows:
c:\Eclipse\workspace\Android>android create uitest-project -n AllAppsTest -t 7 -
p C:\Eclipse\workspace\Android\
Updated file C:\Eclipse\workspace\Android\build.xml
c:\Eclipse\workspace\Android>ant build
Buildfile: c:\Eclipse\workspace\Android\build.xml
-check-env:
[checkenv] Android SDK Tools Revision 23.0.2
[checkenv] Installed at C:\Android\sdk
-build-setup:
[getbuildtools] Using latest Build Tools: 19.1.0
[echo] Resolving Build Target for AllAppsTest...
[getuitarget] Project Target: Android 4.2.2
[getuitarget] API level: 17
[echo] ----------
[echo] Creating output directories if needed...
-pre-compile:
compile:
-post-compile:
-dex:
[dex] input: c:\Eclipse\workspace\Android\bin\classes
[dex] Converting compiled files and external libraries into c:\Eclipse\wor
kspace\Android\bin\classes.dex...
[dx] no classfiles specified
BUILD FAILED
C:\Android\sdk\tools\ant\uibuild.xml:198: null returned: 1
Total time: 0 seconds
My problem is similar to Android ant build project failure which didn't seem to have an answer (or at least one that I could descern from the responses.
I can't post an image (not enough mojo yet) but my test project is set up as:
AllAppsTest
src
com.uia.example.my
LaunchSettings.java
JRE System Library[JavaSE-1.6] (there are number of jar files here but I am not
listing them here)
Referenced Libraries
android.jar
uiautomator.jar
JUnit 4
I executed the following:
c:\Eclipse\workspace\Android>android create uitest-project -n AllAppsTest -t 7 -
p C:\Eclipse\workspace\Android\
Updated file C:\Eclipse\workspace\Android\build.xml
c:\Eclipse\workspace\Android>ant build
Buildfile: c:\Eclipse\workspace\Android\build.xml
Which resulted in the 'ant build' error output at the top of this post.
Any ideas?
Thanks
Eric
Not sure this is kosher answering my own question but...
I believe there is an error in the documentation (or the create step) for executing the build.xml file. The build.xml must be copied to the project directory, in my case AllAppsTest, and the 'ant build' command executed from there.
So the sequence of events to get this to work (in Windows command window):
Run the 'android create' command
c:\Eclipse\workspace\Android>android create uitest-project -n AllAppsTest -t 7 -
p C:\Eclipse\workspace\Android\
Switch to the AllAppsTest directory
cd AllAppsTest
Copy the build.xml file from the parent directory
copy ../build.xml
(which for some reason copies local.properties and project.properties also)
Run the 'ant build' command
When I first tried this the build failed as it didn't like the single and double quotes I had that were on comment lines. Not sure why that was but I removed them and the ant build worked OK.