I read alot of posts similar to this topic, but cant solve it anyway.
Everytime I try to export my signed application with the obfuscator enabled, I get the following:
[2011-12-23 13:26:35 - AppName] Proguard returned with error code 1. See console
[2011-12-23 13:26:35 - AppName] proguard.ParseException: Unknown option 'android\AppName\proguard\dump.txt' in argument number 9
[2011-12-23 13:26:35 - AppName] at proguard.ConfigurationParser.parse(ConfigurationParser.java:170)
[2011-12-23 13:26:35 - AppName] at proguard.ProGuard.main(ProGuard.java:491)
I use the Google APIs Version 2.3.3 and the standard configuration and just added the proguard.config=proguard.cfg to the projects.properties.
I use "Progra~1" in the SDK path and tried clean already.
As far as I know, the dump.txt is generated in a successfully run of the obfuscator.
Can someone give me a hint?
It is because of the space in the project folder path. There is a duplicate question here Proguard ParseException with Default proguard.cfg on Android and the answer is step 2,3,4 and 5 of the accepted answer.
Related
I have an android project named SimpleVideoEditor, and I would like to submit it into F-Droid. So I was following this CONTRIBUTING.md tutorial by F-Droid. Now in the building-it subsection, they say
Make sure that `fdroid lint app.id` doesn't report any warnings. If it does, fix them.
So I tried $ fdroid lint com.fahimfarhan.simplevideoeditor and it gave me this error:
Error
com.fahimfarhan.simplevideoeditor: Build generated by `fdroid import` - remove disable line once ready
At first I didnot even know that this is an error and so I submitted my app. But later I got an Email that says my build failed. So I am trying to fix it.
What does this error even mean? I don't understand how to fix this issue. I did Google but the search result doesnot make any sense. Sorry for not including anything else because this is all I have. I am confused.
Could anyone help me?
I found the fix to this problem.
Their must be a line inside build in your yaml file which might be something like this.
disable: Generated by import.py - check/set version fields and commit id
You have to remove this line and then you will pass all the lint errors. Your builds list should look something like this.
Builds:
- versionName: '2.0'
versionCode: 2
commit: commitId
subdir: app
gradle:
- yes
The auto generated looks something like this -
Builds:
- versionName: '2.0'
versionCode: 2
disable: Generated by import.py - check/set version fields and commit id
commit: '?'
subdir: app
gradle:
- yes
Remove the disable line and add the commit and you will be good to go.
Hi everybody I'm in a dead end!
Develop a PCL application using VisualStudio 2015, Xamarin and MvvmCross.
The Android app exceeds the 65K limit. I need to use Multidex!
For its implementation I have undertaken these guidelines:
Enabled checkbox for MultiDex
Extended MultiDexApplication class
General considerations:
Debug mode
MinSdk: 21
TargetSdk: 25
BuildTools: 23.0.3
Jdk 1.8.0_121
Xamarin.Android 7.3
Results:
"java.exe" exited with code 2. C:\Program Files (x86)\MSBuild\Xamarin \Android\Xamarin.Android.Common.targets 1965
<!-- Compile java code to dalvik -->
<CompileToDalvik
DxJarPath="$(DxJarPath)"
JavaToolPath="$(JavaToolPath)"
JavaMaximumHeapSize="$(JavaMaximumHeapSize)"
JavaOptions="$(JavaOptions)"
ClassesOutputDirectory="$(IntermediateOutputPath)android\bin\classes"
ToolPath="$(DxToolPath)"
ToolExe="$(DxToolExe)"
UseDx="$(UseDx)"
MultiDexEnabled="$(AndroidEnableMultiDex)"
MultiDexMainDexListFile="$(_AndroidMainDexListFile)"
JavaLibrariesToCompile="#(_JavaLibrariesToCompileForAppDx)"
OptionalObfuscatedJarFile="$(IntermediateOutputPath)proguard\__proguard_output__.jar"
/>
The error occurs during the compilation process.
I have consulted these sources:
"https://developer.android.com/studio/build/multidex.html"
"http://www.jon-douglas.com/2016/09/05/xamarin-android-multidex/"
"http://www.jon-douglas.com/2016/09/23/xamarin-android-multidex-keep/"
"https://przemekraciborski.eu/"
"https://forums.xamarin.com/discussion/64234/multi-dex-app-with-a-custom-application-class-that-runs-on-pre-lollipop"
"http://frogermcs.github.io/MultiDex-solution-for-64k-limit-in-Dalvik/"
I also have the ClassyShark.jar tool, but no dex or apk file is generated to explore it. Only the mono.android.jar file exists
Please I need help.
Thank you very much.
Responding to answer 1 and Luke Pothier's commentary are the results:
Setting output verbosity = Diagnostic
Case 1:
Using Android Sdk Location: C:\Program Files (x86)\Android\android-sdk installed with Visual Studio 2015.
4>_CompileToDalvikWithDx:
4> Creating directory "obj\Debug\proguard".
4> C:\Program Files\Java\jdk1.8.0_121\\bin\java.exe -Xmx1G -jar "C:\Program Files (x86)\Android\android-sdk\build-tools\25.0.3\\lib\dx.jar" --no-strict --dex --output= ...
4> trouble writing output: Too many field references: 68102; max is 65536.
4> You may try using --multi-dex option.
4> References by package:
(list of references by packages)
4>C:\Program Files (x86)\MSBuild\Xamarin\Android\Xamarin.Android.Common.targets(1965,3): error MSB6006: "java.exe" exited with code 2.
Case 2:
Using Android Sdk Location: c:\android\sdk with last proguard version 5.3.3 installed with Android Studio.
4>_CompileToDalvikWithDx:
4> Creating directory "obj\Debug\proguard".
4> C:\Program Files\Java\jdk1.8.0_121\\bin\java.exe -Xmx1G -jar C:\Android\sdk\build-tools\25.0.0\\lib\dx.jar --no-strict --dex --output=
4> trouble writing output: Too many field references: 68102; max is 65536.
4> You may try using --multi-dex option.
4> References by package:
(list of references by packages)
4>C:\Program Files (x86)\MSBuild\Xamarin\Android\Xamarin.Android.Common.targets(1965,3): error MSB6006: "java.exe" exited with code 2.
This is likely to be caused by an issue between Xamarin and ProGuard, the fix to which is detailed here. Essentially, you need to replace the proguard.jar file that is in your Android SDK directory with the latest one from SourceForge (v5.3.3 currently).
EDIT: Per the error messages in your edits, the --multi-dex option isn't being passed during compilation. I would check your Android .csproj to make sure that the <AndroidEnableMultiDex> option is set to True for all build configurations. If that doesn't help, you may need to upload a reproducible sample somewhere.
EDIT 2: Per the comments, your Android SDK location needs to be somewhere where the path does not contain spaces. Program Files is no good. Personally I put mine in C:\Android\android-sdk.
After adjusting the path to the android sdk, removing the spaces and setting in the project file for the Droid platform the property AndroidEnableMultiDex in all configurations (appeared AndroidEnableMultipleDex) in true, I was able to compile without errors. Also, I have been able to check the contents of the generated dex files and both have references to Mvvmcross.
When I execute the application, it shows the splash view (ok!!!), but, an exception occurs when processing the view (activity) that has a binded viewmodel. Now, the viewmodel has null value. (Until the moment of having to activate the multidex, the application executed without any incidence)
My challenge now is to know if all the reference to Mvvmcross should be in the main dex, or is it due to another problem that I have overlooked?
Thanks in advance for his time to #LukePothier.
My self response:
After compiling and generate dex classes:
use dex2jar & jd-gui tools following Jon Douglas' hints in http://www.jon-douglas.com/2016/09/23/xamarin-android-multidex-keep/.
be very patient and persevere.
remove innesesary code and plugin if you can do it yourself.
I already have the application running !!!
The issue is when trying to build a signed APK, it errors at the last step with this:
[2013-06-20 11:39:34 - MyApp] Proguard returned with error code 1. See console
[2013-06-20 11:39:34 - MyApp] Unable to access jarfile /Users/rob/Android
I am using the latest Eclipse ADT v22.0.1-685705 (just installed this morning) and it seems like this issue has been around for at least a month now according to Google.
In order to fix this,
Change:
java -jar $PROGUARD_HOME/lib/proguard.jar "$#"
To:
java -jar "$PROGUARD_HOME/lib/proguard.jar" "$#"
in this file <Android SDK Location Here>/sdk/tools/proguard/bin/proguard.sh
Credit here
I trying to compile CM10 with AOSCompiler(using ubuntu). And i got 2 questions:
1.It's Saying me that it's can't find my device:
elichai#elichai-MT6840:~/.aoscompiler/build$ . build/envsetup.sh
including device/generic/armv7-a-neon/vendorsetup.sh
including device/generic/armv7-a/vendorsetup.sh
including device/ti/panda/vendorsetup.sh
including vendor/cm/vendorsetup.sh
including sdk/bash_completion/adb.bash
elichai#elichai-MT6840:~/.aoscompiler/build$ lunch cm_maguro-userdebug
build/core/product_config.mk:189: *** _nic.PRODUCTS.[[device/*/maguro/cm.mk]]: "device/samsung/tuna/device.mk" does not exist. Stop.
Device maguro not found. Attempting to retrieve device repository from CyanogenMod Github (http://github.com/CyanogenMod).
Found repository: android_device_samsung_maguro
CyanogenMod/android_device_samsung_maguro already exists
Syncing repository to retrieve project.
Fetching projects: 100% (1/1), done.
Repository synced!
Looking for dependencies
Done
build/core/product_config.mk:189: *** _nic.PRODUCTS.[[device/*/maguro/cm.mk]]: "device/samsung/tuna/device.mk" does not exist. Stop.
** Don't have a product spec for: 'cm_maguro'
** Do you have the right repo manifest?
I tried to do just 'lunch' and choose my device from the list and it's gave me the same error.
I tried to use 'breakfast' and it's gave me the same error too.
2.The AOSCOmpiler Saying that:
Adb isn't running
Need adb to setup vendor files.
Is this something you are going to do yourself?
Please try again.
Even i added to the file '/etc/bash.bashrc this line:
export PATH=${PATH}:/home/elichai/Downloads/SDK/tools:/home/elichai/Downloads/SDK/platform-tools
(this is my SDK location) and now i can use 'adb' without going to the SDK folder. but it's still not working(the AOSCompiler).
Sorry, I know it's getting old, but, to to the export PATH=${PATH}:/home/elichai/Downloads/SDK/tools:/home/elichai/Downloads/SDK/platform-tools you should remove {}s
export PATH=$PATH:/home/elichai/Downloads/SDK/tools:/home/elichai/Downloads/SDK/platform-tools
That's what I did. I'm on Ubuntu 10.04
Also, you could add the paths to your .bashrc, assuming you are using bach as you shell.
I'm sure someone will correct me if I'm wrong.
I have updated software and ADT in my Eclipse a number of times. I am unable to run projects above than 1.5.I have the following errors showing up in my console window after i create a HelloWorld project with API Level 4 (1.6):
[2010-04-04 22:21:53 - Framework Resource Parser] Collect resource IDs failed, class android.R not found in E:\Android\android-sdk_r04-windows\android-sdk-windows\platforms\android-1.6\android.jar
[2010-04-04 22:21:53 - Framework Resource Parser] Collect permissions failed, class android.Manifest$permission not found in E:\Android\android-sdk_r04-windows\android-sdk-windows\platforms\android-1.6\android.jar
[2010-04-04 22:21:54 - Android Framework Parser] failed to collect preference classes
How to resolve this issue?
I had this error and I did the next steps in order to solve:
Make a clean.
Restart the machine (Probably not necessary)
Delete a string in the strings.xml that I did not use any more.
After that, doing a build, the R class was regenerated and the project builded without errors.