Create an error by referencing the build.xml file and proguard: "null null: 1"

When creating my PhoneGap application (with the Facebook SDK plugin installed), I encountered this error:

STRICTLY FAILURE C: \ adt-bundle-windows-x86_64-20130522 \ sdk \ tools \ ant \ build.xml: 653: The following error occurred while executing this line: C: \ adt-bundle-windows-x86_64-2016430 \ sdk \ tools \ ant \ build.xml: 698: null: 1

Line 653:

<do-only-if-manifest-hasCode elseText="hasCode = false. Skipp aidl/renderscript/R.java"> 

Line 698:

 proguardFile="${out.absolute.dir}/proguard.txt" 

My solutions so far include the following:

  • Ran android update project , to force the generation of the proguard-project.txt file, as well as update the local.properties and project.properties files.
  • Edited C:\adt-bundle-windows-x86_64-20130522\sdk\tools\ant\build.xml so that all references to proguard.txt become proguard-project.txt .
  • ran ant -logfile ./antLogFile.txt release . Here is the log file.

-set test mode:

-set-release-mode:

-release-obfuscation check: [echo] proguard.config is C: \ adt-bundle-windows-x86_64-20130522 \ sdk / tools / proguard / proguard-android.txt: proguard-project.txt [echo] Proguard is enabled. config

-pre-builds:

-check-env: [checkenv] Android SDK Tools Version 22.6.2 [checkenv] Installed in C: \ adt-bundle-windows-x86_64-20130522 \ sdk

-setup: [echo] Project name: HelloWorld [gettype] Project type: Application

-build-setup: [getbuildtools] Using the latest build tools: 19.0.3 [echo] Resolving the build task for HelloWorld ... [gettarget] Project goal: Android 2.3.3 [gettarget] API level: 10 [gettarget] ATTENTION: attribute minSdkVersion in AndroidManifest.xml (14) is higher than API level (10) [echo] ---------- [echo] Creating output directories if necessary ... [echo] ------- --- [echo] Resolution of dependencies for HelloWorld ... [dependencies] Library dependencies: [dependency] [dependency] ------------------ [dependency] Ordered libraries: [ dependency] [dependency] ------------------ [dependency] API <= 15: Adding annotations.jar to the classpath. [echo] ---------- [echo] Creating libraries with 'release' ...

nodeps:

-set test mode:

-set-release-mode:

-release-obfuscation check: [echo] proguard.config is C: \ adt-bundle-windows-x86_64-20130522 \ sdk / tools / proguard / proguard-android.txt: proguard-project.txt [echo] Proguard is enabled. config

-pre-builds:

-check-env: [checkenv] Android SDK Tools Version 22.6.2 [checkenv] Installed in C: \ adt-bundle-windows-x86_64-20130522 \ sdk

-setup: [echo] Project name: facebook [gettype] Project type: Android library

-build-setup: [getbuildtools] Using the latest build tools: 19.0.3 [echo] Resolving the build task for facebook ... [gettarget] Project goal: Android 2.3.3 [gettarget] API level: 10 [echo] --- ------- [echo] Creating output directories if necessary ... [mkdir] Created by dir: C: \ Users \ brian.lee \ Desktop \ Eclipse Workspace \ chumba_connect_trunk_new \ facebook-android-sdk-3.14.1 \ facebook \ bin \ rsObj [mkdir] Created by dir: C: \ Users \ brian.lee \ Desktop \ Eclipse Workspace \ chumba_connect_trunk_new \ facebook-android-sdk-3.14.1 \ facebook \ bin \ rsLibs [echo] ----- ----- [echo] Resolution of dependencies for facebook ... [dependencies] Library dependencies: [dependency] No libraries [dependency] [dependency] ------------------ [ The dependence] API <= 15: annotations.jar add to the classpath.

-code-gen: [mergemanifest] Found Remote target file [mergemanifest] Merge AndroidManifest files into one. [mergemanifest] The merge manifest is disabled. Use only the project manifest. [echo] Processing help files ... [aidl] There are no AIDL files to compile. [echo] ---------- [echo] Processing RenderScript files ... [echo] ---------- [echo] Processing resources ... [aapt] Creating resource identifiers. .. [aapt] invalid resource directory name: C: \ Users \ brian.lee \ Desktop \ Eclipse Workspace \ chumba_connect_trunk_new \ facebook-android-sdk-3.14.1 \ facebook \ bin \ res / crunch

STRICTLY FAILURE C: \ adt-bundle-windows-x86_64-20130522 \ sdk \ tools \ ant \ build.xml: 601: an error occurred while executing this line: C: \ adt-bundle-windows-x86_64-20130522 \ sdk \ tools \ ant \ build.xml: 653: an error occurred while executing this line: C: \ ADT-bundle of windows-x86_64-20130522 \ SDK \ tools \ ant \ build.xml: 698: null: 1

Total time: 2 seconds

All my attempts have made no progress. Why is this error occurring? What should I do to build successfully?

+9
android cordova proguard
May 20 '14 at 7:20
source share
7 answers

Close Eclipse, and then run ant clean in the project folder.

+31
May 21 '14 at 5:12
source share

For me: I had

incorrectly edited my config.xml

. Try reverting your changes or placing a common config.xml file and then see if it will build.

+3
Sep 10 '14 at 16:36
source share

Check that your JAVA_HOME variable is correctly set to some path, for example C:\Program Files\Java\jdk1.7.0_67\ , and if the error still continues, you can solve it by going to build.xml and setting true for the fork variable or the passed variable ${need.javac.fork} , which sets the fork value to:

fork = "$ {need.javac.fork}"

+2
Nov 25 '14 at 17:43
source share

For me, conflicting build goals were to blame. It is necessary to change project.properties in my library directory (which was appcompat) to "target = android-21" instead of android-19, which I had before. If you encounter a similar error and the previous answer (ant clean) does not work, check all build goals.

+2
Dec 13 '14 at 18:33
source share

You can also make sure your local.properties file has a path to your sdk: sdk.dir=/path/to/adt/sdk

0
Oct 01 '14 at 22:33
source share

To determine if a problem arises from your development environment or because of a bug in the project, I recommend everyone to try creating a new project from the CLI cordova.

  • Open terminal
  • Type cordova create foo; cd foo; cordova create foo; cd foo;
  • Type cordova platform add android
  • Type cordova build

It works? Therefore, the problem is setting up your project. It was my mistake: To add icons to the application, I created a folder called android inside `foo / plataforms / android / res / {android / icon * .png}

The correct way to add icons is to create a res folder in the root directory of the project Foo / {Res / Android / icon * .png}

Then add these files to the configuration file as follows:

 <platform name="android"> <icon src="res/android/icon@ldpi.png" density="ldpi" /> <icon src="res/android/icon@mdpi.png" density="mdpi" /> <icon src="res/android/icon@hdpi.png" density="hdpi" /> <icon src="res/android/icon@xhdpi.png" density="xhdpi" /> </platform> 
0
Jan 14 '15 at 10:15
source share

I had the same problem, I solved it like this:

Go to the framework directory in the project and enter these commands to create the jar file (you will need to install ant to create the jar file, but it should already be on your system):

 android update project -p . -t android-23 ant jar 

So just make sure you have the android type, because you may have tried android-19 .

-one
Feb 17 '16 at 21:20
source share



All Articles