AAR has a placeholder when confused by ProGuard, resulting in failure
.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty{ height:90px;width:728px;box-sizing:border-box;
}
An Android library project, environment:
apply plugin: 'com.android.library'
classpath 'com.android.tools.build:gradle:3.2.1'
Gradle 4.9
AndroidManifest.xml
<activity
android:name="${applicationId}.PayloadActivity" />
When I use ProGuard to obfuscate code:
Caused by: proguard.ParseException: Expecting class member name before '}' in line 2 of file 'Y:projectbuildintermediatesproguard-rulesreleaseaapt_rules.txt'
at proguard.ConfigurationParser.checkJavaIdentifier(ConfigurationParser.java:1486)
at proguard.ConfigurationParser.checkJavaIdentifier(ConfigurationParser.java:1472)
at proguard.ConfigurationParser.parseMemberSpecificationArguments(ConfigurationParser.java:1049)
at proguard.ConfigurationParser.parseClassSpecificationArguments(ConfigurationParser.java:876)
at proguard.ConfigurationParser.parseKeepClassSpecificationArguments(ConfigurationParser.java:659)
at proguard.ConfigurationParser.parseKeepClassSpecificationArguments(ConfigurationParser.java:588)
at proguard.ConfigurationParser.parse(ConfigurationParser.java:165)
at com.android.build.gradle.internal.transforms.BaseProguardAction.applyConfigurationFile(BaseProguardAction.java:145)
at com.android.build.gradle.internal.transforms.ProGuardTransform.doMinification(ProGuardTransform.java:254)
... 5 more
buildintermediatesproguard-rulesreleaseaapt_rules.txt:
# Generated by the gradle plugin
-keep class ${applicationId}.PayloadActivity { <init>(...); }
Confusion failed because there was no placeholder assignment when compiling into AAR. Although confusion can be delayed until it is compiled into APK. However, because of this part of the content, I do not want to be seen by APK users with such simple decompilation. Is it possible to get confused when compiling AAR?
android gradle android-gradle android-proguard
add a comment |
An Android library project, environment:
apply plugin: 'com.android.library'
classpath 'com.android.tools.build:gradle:3.2.1'
Gradle 4.9
AndroidManifest.xml
<activity
android:name="${applicationId}.PayloadActivity" />
When I use ProGuard to obfuscate code:
Caused by: proguard.ParseException: Expecting class member name before '}' in line 2 of file 'Y:projectbuildintermediatesproguard-rulesreleaseaapt_rules.txt'
at proguard.ConfigurationParser.checkJavaIdentifier(ConfigurationParser.java:1486)
at proguard.ConfigurationParser.checkJavaIdentifier(ConfigurationParser.java:1472)
at proguard.ConfigurationParser.parseMemberSpecificationArguments(ConfigurationParser.java:1049)
at proguard.ConfigurationParser.parseClassSpecificationArguments(ConfigurationParser.java:876)
at proguard.ConfigurationParser.parseKeepClassSpecificationArguments(ConfigurationParser.java:659)
at proguard.ConfigurationParser.parseKeepClassSpecificationArguments(ConfigurationParser.java:588)
at proguard.ConfigurationParser.parse(ConfigurationParser.java:165)
at com.android.build.gradle.internal.transforms.BaseProguardAction.applyConfigurationFile(BaseProguardAction.java:145)
at com.android.build.gradle.internal.transforms.ProGuardTransform.doMinification(ProGuardTransform.java:254)
... 5 more
buildintermediatesproguard-rulesreleaseaapt_rules.txt:
# Generated by the gradle plugin
-keep class ${applicationId}.PayloadActivity { <init>(...); }
Confusion failed because there was no placeholder assignment when compiling into AAR. Although confusion can be delayed until it is compiled into APK. However, because of this part of the content, I do not want to be seen by APK users with such simple decompilation. Is it possible to get confused when compiling AAR?
android gradle android-gradle android-proguard
there should be no<activity android:name="${applicationId}.PayloadActivity" />
for aar project.
– shizhen
Nov 27 '18 at 5:06
add a comment |
An Android library project, environment:
apply plugin: 'com.android.library'
classpath 'com.android.tools.build:gradle:3.2.1'
Gradle 4.9
AndroidManifest.xml
<activity
android:name="${applicationId}.PayloadActivity" />
When I use ProGuard to obfuscate code:
Caused by: proguard.ParseException: Expecting class member name before '}' in line 2 of file 'Y:projectbuildintermediatesproguard-rulesreleaseaapt_rules.txt'
at proguard.ConfigurationParser.checkJavaIdentifier(ConfigurationParser.java:1486)
at proguard.ConfigurationParser.checkJavaIdentifier(ConfigurationParser.java:1472)
at proguard.ConfigurationParser.parseMemberSpecificationArguments(ConfigurationParser.java:1049)
at proguard.ConfigurationParser.parseClassSpecificationArguments(ConfigurationParser.java:876)
at proguard.ConfigurationParser.parseKeepClassSpecificationArguments(ConfigurationParser.java:659)
at proguard.ConfigurationParser.parseKeepClassSpecificationArguments(ConfigurationParser.java:588)
at proguard.ConfigurationParser.parse(ConfigurationParser.java:165)
at com.android.build.gradle.internal.transforms.BaseProguardAction.applyConfigurationFile(BaseProguardAction.java:145)
at com.android.build.gradle.internal.transforms.ProGuardTransform.doMinification(ProGuardTransform.java:254)
... 5 more
buildintermediatesproguard-rulesreleaseaapt_rules.txt:
# Generated by the gradle plugin
-keep class ${applicationId}.PayloadActivity { <init>(...); }
Confusion failed because there was no placeholder assignment when compiling into AAR. Although confusion can be delayed until it is compiled into APK. However, because of this part of the content, I do not want to be seen by APK users with such simple decompilation. Is it possible to get confused when compiling AAR?
android gradle android-gradle android-proguard
An Android library project, environment:
apply plugin: 'com.android.library'
classpath 'com.android.tools.build:gradle:3.2.1'
Gradle 4.9
AndroidManifest.xml
<activity
android:name="${applicationId}.PayloadActivity" />
When I use ProGuard to obfuscate code:
Caused by: proguard.ParseException: Expecting class member name before '}' in line 2 of file 'Y:projectbuildintermediatesproguard-rulesreleaseaapt_rules.txt'
at proguard.ConfigurationParser.checkJavaIdentifier(ConfigurationParser.java:1486)
at proguard.ConfigurationParser.checkJavaIdentifier(ConfigurationParser.java:1472)
at proguard.ConfigurationParser.parseMemberSpecificationArguments(ConfigurationParser.java:1049)
at proguard.ConfigurationParser.parseClassSpecificationArguments(ConfigurationParser.java:876)
at proguard.ConfigurationParser.parseKeepClassSpecificationArguments(ConfigurationParser.java:659)
at proguard.ConfigurationParser.parseKeepClassSpecificationArguments(ConfigurationParser.java:588)
at proguard.ConfigurationParser.parse(ConfigurationParser.java:165)
at com.android.build.gradle.internal.transforms.BaseProguardAction.applyConfigurationFile(BaseProguardAction.java:145)
at com.android.build.gradle.internal.transforms.ProGuardTransform.doMinification(ProGuardTransform.java:254)
... 5 more
buildintermediatesproguard-rulesreleaseaapt_rules.txt:
# Generated by the gradle plugin
-keep class ${applicationId}.PayloadActivity { <init>(...); }
Confusion failed because there was no placeholder assignment when compiling into AAR. Although confusion can be delayed until it is compiled into APK. However, because of this part of the content, I do not want to be seen by APK users with such simple decompilation. Is it possible to get confused when compiling AAR?
android gradle android-gradle android-proguard
android gradle android-gradle android-proguard
asked Nov 27 '18 at 1:59
forDreamforDream
89310
89310
there should be no<activity android:name="${applicationId}.PayloadActivity" />
for aar project.
– shizhen
Nov 27 '18 at 5:06
add a comment |
there should be no<activity android:name="${applicationId}.PayloadActivity" />
for aar project.
– shizhen
Nov 27 '18 at 5:06
there should be no
<activity android:name="${applicationId}.PayloadActivity" />
for aar project.– shizhen
Nov 27 '18 at 5:06
there should be no
<activity android:name="${applicationId}.PayloadActivity" />
for aar project.– shizhen
Nov 27 '18 at 5:06
add a comment |
1 Answer
1
active
oldest
votes
Just remove
<activity android:name="${applicationId}.PayloadActivity" />
from your manifest.xml
file.
add a comment |
Your Answer
StackExchange.ifUsing("editor", function () {
StackExchange.using("externalEditor", function () {
StackExchange.using("snippets", function () {
StackExchange.snippets.init();
});
});
}, "code-snippets");
StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "1"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});
function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});
}
});
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53491696%2faar-has-a-placeholder-when-confused-by-proguard-resulting-in-failure%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
Just remove
<activity android:name="${applicationId}.PayloadActivity" />
from your manifest.xml
file.
add a comment |
Just remove
<activity android:name="${applicationId}.PayloadActivity" />
from your manifest.xml
file.
add a comment |
Just remove
<activity android:name="${applicationId}.PayloadActivity" />
from your manifest.xml
file.
Just remove
<activity android:name="${applicationId}.PayloadActivity" />
from your manifest.xml
file.
answered Nov 27 '18 at 5:07
shizhenshizhen
4,24941337
4,24941337
add a comment |
add a comment |
Thanks for contributing an answer to Stack Overflow!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53491696%2faar-has-a-placeholder-when-confused-by-proguard-resulting-in-failure%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
there should be no
<activity android:name="${applicationId}.PayloadActivity" />
for aar project.– shizhen
Nov 27 '18 at 5:06