I'm trying to including the NewRelic library into my project, but I get this error when I build it
Error:Execution failed for task ':v1:preDexDebug'.
com.android.ide.common.internal.LoggedErrorException: Failed to run command:
C:\Program Files\Android\android-studio\sdk\build-tools\19.1.0\dx.bat --dex --output
C:\Documents and Settings\t.hart\My Documents\Android\MoneyTracker\v1\build\pre-dexed\debug\android-agent-3.378.0-27125f93a249f513379e837d75ebec255f6dcaa4.jar
C:\Documents and Settings\t.hart\.gradle\caches\modules-2\files-2.1\com.newrelic.agent.android\android-agent\3.378.0\1ebf0e20081a7f1b9a5c31bfc4e7dba776e0c171\android-agent-3.378.0.jar
Error Code:
1
Output:
Error opening zip file or JAR manifest missing : C:\Documents
To include the library you need to add 3 lines to your build.gradle files,
//This to the buildscript dependancies
classpath 'com.newrelic.agent.android:agent-gradle-plugin:3.378.0'
//This line (in the example it's under the android line
apply plugin: 'newrelic'
//And this to dependancies
compile 'com.newrelic.agent.android:android-agent:3.378.0'
After some trial and error it seems it's the last line (the compile one) that's causing the error to be thrown. Is this because of the spaces in C:/Documents And Settings
?
I'm also using these librarys, and they all downloaded to the build/pre-dexed/debug folder fine with no issues.
compile 'com.android.support:appcompat-v7:19.1.0'
compile 'com.android.support:gridlayout-v7:19.1.0'
compile 'com.android.support:support-v4:19.1.0'
EDIT: Updated error message
Error:Execution failed for task ':v1:preDexDebug'.
com.android.ide.common.internal.LoggedErrorException: Failed to run command:
C:\Program Files\Android\android-studio\sdk\build-tools\19.1.0\dx.bat --dex --output
C:\MoneyTracker\v1\build\pre-dexed\debug\support-v4-19.1.0-cd41ef807caadb29c9df0131dee869d3723185ad.jar
C:\Program Files\Android\android-studio\sdk\extras\android\m2repository\com\android\support\support-v4\19.1.0\support-v4-19.1.0.jar
Error Code:
1
Output:
Error opening zip file or JAR manifest missing : C:\Documents
Now that's a strange error...