android-library

Kotlin AAR library w/ proguard: How to keep ONLY class and method names?

橙三吉。 提交于 2020-02-25 13:19:47
问题 I am building an android library (aar file) with Kotlin. I need to obfuscate the code in a way that the 3rd party user will see the class and method names, he must be able to use them (they are pubilc), but I need to hide/obfuscate the code itself. I tried using this file for the myLibrary\proguard-rules.pro file: https://github.com/mohitrajput987/android-utility/blob/master/preference/proguard-rules.pro but every class, method and var is changed, except for a directory that has both a Kotlin

Kotlin AAR library w/ proguard: How to keep ONLY class and method names?

不想你离开。 提交于 2020-02-25 13:18:06
问题 I am building an android library (aar file) with Kotlin. I need to obfuscate the code in a way that the 3rd party user will see the class and method names, he must be able to use them (they are pubilc), but I need to hide/obfuscate the code itself. I tried using this file for the myLibrary\proguard-rules.pro file: https://github.com/mohitrajput987/android-utility/blob/master/preference/proguard-rules.pro but every class, method and var is changed, except for a directory that has both a Kotlin

Android studio Aapt.exe finished with non zero exit value 1

ぃ、小莉子 提交于 2020-01-25 23:41:04
问题 In My app I am using google play services and some others and all are working fine as expected. but when I comes towards the design side , I was asked to used the segmented control as we have in IOS 7. so for this I tired using this library. But as i added this library and sync I got this error Error:Execution failed for task ':app:processDebugResources'. com.android.ide.common.process.ProcessException: org.gradle.process.internal.ExecException: Process 'command 'E:\Stacy Data\AndroidStudio

Activity inside library module starts but doesn't display layout

余生长醉 提交于 2020-01-25 21:39:32
问题 My code My main project public class MainActivity extends AppCompatActivity { @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); // --------- 0 way View v = new com.sohaeb.mylibrary.test(this); setContentView(v); // --------- 1 way startActivity(new Intent(this, com.sohaeb.mylibrary.MainActivity.class)); // --------- 2nd way Intent intent = new Intent(); startActivity(intent.setClass(getApplicationContext(), com.sohaeb.mylibrary.MainActivity

Android library project does not compile its (java project) dependencies into its jar

安稳与你 提交于 2020-01-24 23:59:07
问题 I have an android libary project - MonitoringModel - which depends on a regular java project - Helpers (the dependency was set in the java build path > Projects. The Helpers project was ticked in the "order and export" tab of the MonitoringModel ). MonitoringModel produces a jar which I drop to the libs folder of a servlet project as described here. All was fine till the servlet needed a method from the Helpers project : Caused by: java.lang.NoClassDefFoundError: gr/uoa/di/java/helpers/Utils

Android library proguard package obfuscation produces a.a.a.a.a collision

。_饼干妹妹 提交于 2020-01-23 16:43:09
问题 I'm writing 2 Android libraries. When I obfuscate both, the obfuscated code in both of them contains a class named a.a.a.a.a which causes the following error when trying to use both libraries in the same application: Duplicate class a.a.a.a.a found in modules classes.jar (lib1) and classes.jar (lib2) How can I prevent Proguard from obfuscating the first 3 packages to end up with: my.domain.lib1.a.a and my.domain.lib2.a.a ? Edit: The obfuscation is happening as part of building the libraries,

Android library proguard package obfuscation produces a.a.a.a.a collision

此生再无相见时 提交于 2020-01-23 16:42:25
问题 I'm writing 2 Android libraries. When I obfuscate both, the obfuscated code in both of them contains a class named a.a.a.a.a which causes the following error when trying to use both libraries in the same application: Duplicate class a.a.a.a.a found in modules classes.jar (lib1) and classes.jar (lib2) How can I prevent Proguard from obfuscating the first 3 packages to end up with: my.domain.lib1.a.a and my.domain.lib2.a.a ? Edit: The obfuscation is happening as part of building the libraries,

Library Project in Android Studio

若如初见. 提交于 2020-01-23 02:46:10
问题 I just installed Android Studio and wondering how I could create an Android Library project. The solution shared in this post does not work anymore. Update: I am not sure if this is enough to create a library project, but this are the steps I have done: Create a normal Android Project without an Activity Change apply plugin: 'com.android.application' to apply plugin: 'com.android.library' from build.gradle Delete the line applicationId "..." from build.gradle If you would like to create a

Gradle only downloads .aar.asc from Maven Central

守給你的承諾、 提交于 2020-01-22 03:27:06
问题 I freshly deployed an Android library named TypedPreferences. I used it in another Android project for some days. Suddenly, it stopped working - dependencies cannot be found any longer. I noticed that Gradle only downloads one file when I clean the project: Download http://repo1.maven.org/maven2/info/metadude/android/typed-preferences/ \ 1.0.0/typed-preferences-1.0.0.aar.asc These are build files of my pet project: build.gradle : // Top-level build file where you can add configuration //

Android library not resolve dependencies after publish

不想你离开。 提交于 2020-01-16 18:52:27
问题 I have created android library which use android-async dependency. This library project showing everything is fine. But when i publish this library into local nexus and then try to use it in some other project then in a class where this async library is using show error like this: java.lang.NoClassDefFoundError: Failed resolution of: Lcom/loopj/android/http/SyncHttpClient; at com.myproject.installer.InstallerService.onHandleIntent(InstallerService.java:46) Here is a gradle file of library: