android studio-Android studio 混淆打包报错了

问题描述

Android studio 混淆打包报错了

先运行gradlew clean,没有问题。
再运行gradlew assembleRelease 就报了下面的错:

Warning: D:deveAdrichAndroidManifest.xml:23:5 Warning:
application@android:icon was tagged at AndroidManifest.xml:23 to replace other declarations but no other declaration present
Warning: D:deveAdrichAndroidManifest.xml:23:5 Warning:
application@android:theme was tagged at AndroidManifest.xml:23 to replace other declarations but no other declaration present
D:deveAdrichAndroidManifest.xml:23:5 Warning:
application@android:icon was tagged at AndroidManifest.xml:23 to replace other declarations but no other declaration present
D:deveAdrichAndroidManifest.xml:23:5 Warning:
application@android:theme was tagged at AndroidManifest.xml:23 to replace other declarations but no other declaration present
:Adrich:processReleaseResources
D:deveAdrichuildintermediates
es
eleaselayout
echarge1_activity.xml:100: error: Error: No resource found that matches the given name (at 'background' with value '@color/white').
D:deveAdrichuildintermediates
es
eleaselayout
echarge2_activity.xml:52: error: Error: No resource found that matches the given name (at 'background' with value '@color/white').
D:deveAdrichuildintermediates
es
eleaselayout
echarge2_activity.xml:74: error: Error: No resource found that matches the given name (at 'background' with value '@color/white').
:Adrich:processReleaseResources FAILED

FAILURE: Build failed with an exception.

  • What went wrong:
    Execution failed for task ':Adrich:processReleaseResources'.

    com.android.ide.common.internal.LoggedErrorException: Failed to run command:
    D:androidadt-bundle-windows-x86_64-20140702sdkuild-toolsandroid-4.4Waapt.exe package -f --no-crunch -I D:androidadt-bundle-windows-x86_64-20140702sdkplatformsandroid-19android.jar -M D:deveAdrichuildintermediatesmanifestsfull
    eleaseAndroidManifest.xml -S D:deveAdrichuildintermediates
    es
    elease -A D:deveAdrichuildintermediatesassets
    elease -m -J D:deveAdrichuildgeneratedsource

    elease -F D:deveAdrichuildintermediates
    es
    esources-release.ap_ -G D:deveAdrichuildintermediatesproguard-rules
    eleaseaapt_rules.txt --custom-package com.adrich.adrich -0 apk --output-text-symbols D:deveAdrichuildintermediatessymbols
    elease
    Error Code:
    1
    Output:
    D:deveAdrichuildintermediates
    es
    eleaselayout
    echarge1_activity.xml:100: error: Error: No resource found that matches the given name (at 'background' with value '@color/white').
    D:deveAdrichuildintermediates
    es
    eleaselayout
    echarge2_activity.xml:52: error: Error: No resource found that matches the given name (at 'background' with value '@color/white').
    D:deveAdrichuildintermediates
    es
    eleaselayout
    echarge2_activity.xml:74: error: Error: No resource found that matches the given name (at 'background' with value '@color/white').

  • Try:
    Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.

BUILD FAILED

Total time: 2 mins 3.648 secs

解决方案

Android Studio 混淆打包
使用Android Studio混淆打包(ProGuard基础语法和打包配置)
Android Studio中使用Gradle打包

时间: 2024-09-17 07:23:15

android studio-Android studio 混淆打包报错了的相关文章

线程-Android Studio跑程序的时候报错了 求大神指教!!

问题描述 Android Studio跑程序的时候报错了 求大神指教!! 02-29 21:27:52.770 13264-13270/com.example.cms.yibujiazai E/jdwp: Failed sending reply to debugger: Broken pipe 02-29 21:27:52.820 13264-13264/com.example.cms.yibujiazai W/dalvikvm: VFY: unable to find class refer

ANDROID应用程序的混淆打包分享_Android

android应用程序的混淆打包1 . 在工程文件project.properties中加入下proguard.config=proguard.cfg , 如下所示:target=android-8 proguard.config=proguard.cfg Eclipse会通过此配置在工程目录生成proguard.cfg文件 2 . 生成keystore (如已有可直接利用) 按照下面的命令行 在D:\Program Files\Java\jdk1.6.0_07\bin>目录下,输入keytoo

ANDROID应用程序的混淆打包分享

android应用程序的混淆打包1 . 在工程文件project.properties中加入下proguard.config=proguard.cfg , 如下所示:target=android-8 proguard.config=proguard.cfg Eclipse会通过此配置在工程目录生成proguard.cfg文件 2 . 生成keystore (如已有可直接利用) 按照下面的命令行 在D:\Program Files\Java\jdk1.6.0_07\bin>目录下,输入keytoo

app-android代码混淆打包报错

问题描述 android代码混淆打包报错 FAILURE: Build failed with an exception. What went wrong: Execution failed for task ':app:shrinkReleaseMultiDexComponents'. > java.io.IOException: The output jar [/root/.jenkins/jobs/Android-PRD/workspace/app/build/intermediates/

android ant最简单的打包签名及混淆方法

使用ant打包,如果脚本都是我们自己一步一步来写的话,是一个比较麻烦的东西. 关于ant,我们详细看下: ant支持 ant debug,ant release等命令,我们需要签名混淆,那么就需要ant release这个命令. 首先:ant环境搭建,这我就不多说了,很多博客都有介绍,包括一些环境配置 然后:ant环境可以之后,我们需要一个 build.xml文件,这个是ant编译去找的一个东西 <?xml version="1.0" encoding="UTF-8&q

android studio 混淆后,打包报错!!!

问题描述 android studio 混淆后,打包报错!!! `` Exception while processing task java.io.IOException: The same input jar [E:Workgvapplibsopen_sdk_r5509.jar] is specified twice. > at proguard.ConfigurationChecker.checkConflicts(ConfigurationChecker.java:216) > at

android studio 混淆打包时报错,找不到解决方案求帮助啊

问题描述 android studio 混淆打包时报错,找不到解决方案求帮助啊 混淆打包,报错,百度也查不到,困扰1天了... Error:ProGuard: [JinFu1.1] java.io.IOException: Can't read C:Usersadmin.AndroidStudio1.2systemcompile-server_temp_proguard_input0.jar)) Error:ProGuard: [JinFu1.1] at proguard.InputReader

Android studio 混淆+打包+验证是否成功

前言: 单挑Android项目,最近即时通讯用到环信,集成sdk的时候 官方有一句 在 ProGuard 文件中加入以下 keep. -keep class com.hyphenate.** {*;} -dontwarn com.hyphenate.** 即:混淆规则. 自己没写过关于混淆打包的文章,在此补上. 下面了解Android studio环境下 项目混淆打包的操作. 一.打包: 即 将Android项目生成.apk文件,让用户去安装. 1.工具栏 Build->Generate Sig

图片-Android studio安装报错了

问题描述 Android studio安装报错了 解决方案 为什么没人说是版本装错了呢 解决方案二: 你没装jdk吧....或者就是环境变量没配置好 解决方案三: JDK没装,或者JDK的bin路径环境变量没配置 解决方案四: java_home 环境有误,就是JDK的安装路径,注意:后面不能带分号