A library uses the same package as this project - android-studio

For 2 days, I have been trying to fix my Android Studio setup, but despite a lot of googling have had no luck fixing this problem. Gradle keeps giving me the error
Error:Execution failed for task ':Android-Tabbedout-30:processQaReleaseResources'.
Error: A library uses the same package as this project
You can temporarily disable this error with android.enforceUniquePackageName=false
However, this is temporary and will be enforced in 1.0
If I add in the enforceUniquePackageName=false to the gradle file, then the project can be successively refreshed by Gradle, but once I try to run it I get this error:
Error Code:
2
Output:
UNEXPECTED TOP-LEVEL EXCEPTION:
com.android.dex.DexException: Multiple dex files define
Any ideas on how to fix this?

I was searching for that same problem and i find this on github
https://github.com/DWorkS/AStickyHeader/issues/12
And this solved my problem.
All this says is to rename the package name on the AndroidManifast.xml file.
And its done.

Related

Android Studio 3.6.3 How to get rid of ERROR: Unable to resolve dependency for ':app#debug/compileClasspath' (androidx.fragment:fragment)

I'm tired of getting this error every third/fourth time I try to build project:
ERROR: Unable to resolve dependency for ':app#debug/compileClasspath': Could not resolve androidx.fragment:fragment:[1.2.0].
Show Details
Affected Modules: app
It also effects ':app#debugUnitTest/compileClasspath' and ':app#debugAndroidTest/compileClasspath' (shows the same error for them).
Also sometimes it goes after the following build error (internet connection is surely stable):
Unknown host 'repo.maven.apache.org: nodename nor servname provided, or not known'. You may need to adjust the proxy settings in Gradle.
Enable Gradle 'offline mode' and sync project
Learn about configuring HTTP proxies in Gradle
There were no changes in build.gradle files or any other gradle files before this error came.
It would be nice if you help to get rid of it. Gradle-plugin version = "1.3.71".

Android Studio cant find or install play-services 7 /wearable

I have a new windows 8.1 machine, and am trying to get my android IDE environment installed. But there seems to be some issues that i have never encountered before. my existing projects are not compiling because the system can not find or even download the proper play services libs..
Error:A problem occurred configuring project ':mobile'.
Could not resolve all dependencies for configuration ':mobile:_debugCompile'.
A problem occurred configuring project ':wear'.
Could not resolve all dependencies for configuration ':wear:_debugCompile'.
Could not find com.google.android.gms:play-services-wearable:7.0.0.
Searched in the following locations:
https://jcenter.bintray.com/com/google/android/gms/play-services-wearable/7.0.0/play-services-wearable-7.0.0.pom
https://jcenter.bintray.com/com/google/android/gms/play-services-wearable/7.0.0/play-services-wearable-7.0.0.jar
file:/C:/Users/Erik/AppData/Local/Android/sdk/extras/android/m2repository/com/google/android/gms/play-services-wearable/7.0.0/play-services-wearable-7.0.0.pom
file:/C:/Users/Erik/AppData/Local/Android/sdk/extras/android/m2repository/com/google/android/gms/play-services-wearable/7.0.0/play-services-wearable-7.0.0.jar
file:/C:/Users/Erik/AppData/Local/Android/sdk/extras/google/m2repository/com/google/android/gms/play-services-wearable/7.0.0/play-services-wearable-7.0.0.pom
file:/C:/Users/Erik/AppData/Local/Android/sdk/extras/google/m2repository/com/google/android/gms/play-services-wearable/7.0.0/play-services-wearable-7.0.0.jar
Required by:
AndroidClickDogTrainer:wear:unspecified
So i tried using the SDK manager to insure i had the proper play services but
I keep getting the following error from my SDK manager in Android Studio on my Windows 8.1 machine.
This is a clean install, and i thought it may be my firewall settings but after turning off my firewall completely it is still happening:
Refresh Sources: Fetched Add-ons List successfully Refresh Sources
Failed to fetch URL
https://dl.google.com/android/repository/addon.xml, reason: File not
found Failed to fetch URL
https://dl.google.com/android/repository/sys-img/android-wear/sys-img.xml,
reason: File not found Failed to fetch URL
https://dl.google.com/android/repository/sys-img/google_apis/sys-img.xml,
reason: File not found Failed to fetch URL
https://dl.google.com/android/repository/sys-img/x86/addon-x86.xml/addon.xml,
reason: File not found Refresh Sources: Failed to fetch URL
https://dl.google.com/android/repository/addon.xml, reason: File not
found Failed to fetch URL
https://dl.google.com/android/repository/sys-img/android-wear/sys-img.xml,
reason: File not found Failed to fetch URL
https://dl.google.com/android/repository/sys-img/google_apis/sys-img.xml,
reason: File not found Failed to fetch URL
https://dl.google.com/android/repository/sys-img/x86/addon-x86.xml/addon.xml,
reason: File not found Ignoring unknown package filter
'extra-google-m2repository'Warning: The package filter removed all
packages. There is nothing to install.
Please consider trying to update again without a package filter.
No matter what i do.. TURN OFF FIRE WALL, RUN AS ADMIN.. etc etc.. it just won't install the play services libs..
please help
So I searched high and low for an answer to this, and it seems a lot of people are having this and similar issues and creating really cumbersome workarounds that include everything from re-writing parts of the android.bat file to uninstalling the SDK and re-installing it from scratch.. for me none of those solutions worked.. but what seems to have fixed the problem was actually quite simple.
hope this helps others..
open the Android SDK Manager.. click on TOOLS>Options and check "Force https://.. sources to be fetched using http://.."

IntelliJ Haskell plugin: ghc-modi failed with error

I just installed IntelliJ idea and the official Haskell plugin.
IntelliJ couldn't find ghc-modi.exe, so I installed ghc-mod through cabal.
However, after importing my cabal project, I am still receiving the following error:
ghc-modi failed with error: NG BUG: GMECabalFlags (GMEString "extractField: failed extracting configFlags from input, input contained `configFlags'? False")
How can I solve or get more information on this error?
Thanks in advance.
This question has been answered by Atsky on GitHub:
This is internal problem of ghc-mod. It fails to read file dist/setup-config for some reason.
Try to remove dist folder from your project and then run cabal config.

Issues cleaning my project and importing R after update

I just updated Android Studio (0.8.14) and got bombarded with various errors.
When I try to clean my project, I get this:
Error:Execution failed for task ':app:clean'.
> Unable to delete directory: C:\Users\----\Documents\Android Projects\----\app\build\intermediates
Every class that imports com.myorg.myproject.R says:
Cannot resolve symbol 'R'.
I checked my androidmanifest and it's referencing the package correctly. Any idea how to fix this?
gradlew clean in the terminal works without error, but the clean function from the Build menu throws this error.
C:\Users\----\Documents\Android Projects\---->gradlew clean
:app:clean
BUILD SUCCESSFUL
Total time: 5.43 secs
Thanks

Error rebuilding ATMHud.DLL for Monotouch

After updating to the latest versions of Xamarin Studio this morning the ZBar and ATMHud references in our project started throwing a bunch of errors, all of which were:
The type 'MonoTouch.UIKit.UIViewController' is defined in an assembly that is not referenced. Consider adding a reference to assembly 'monotouch, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null' (CS0012)'
I did some reading and found out that I needed to rebuild both of the libraries because of something to do with "assembly strong names" in Xamarin. I was able to muddle my way through rebuilding the ZBar library, but the ATMHud rebuild has given me some trouble and I'm not familiar enough with what I'm doing to fix the problem.
I downloaded the ATMHud project from github and followed the instructions in the readme which state "Run 'make' in the binding directory to build ATMHud.dll", but when I do that I get errors.
Teds-Mac:binding ted$ make
/Developer/MonoTouch/usr/bin/btouch -e atmhud.cs enums.cs AssemblyInfo.cs --out=ATMHud.dll --link-with=libATMHudSDK.a,libATMHudSDK.a
/var/folders/75/vl_6zkyx03sc4tymnp41lsgw0000gn/T/09x9yx7m.nz9/AtmHud/AtmHud.g.cs(751,86): error CS0103: The name class_ptr' does not exist in the current context
/var/folders/75/vl_6zkyx03sc4tymnp41lsgw0000gn/T/09x9yx7m.nz9/AtmHud/AtmSoundFX.g.cs(75,104): error CS0103: The nameclass_ptr' does not exist in the current context
Compilation failed: 2 error(s), 0 warnings
btouch: API binding contains errors.
make: * [ATMHud.dll] Error 1
I've scanned through the files in the folders but can't seem to track down any references to "class_ptr".
Can anyone help with what might be the cause of the problem I'm seeing, and can you confirm that this will get me past the original "assembly strong names" problem I'm seeing?
As a temporary measure you can fix your old assemblies with this tool: https://github.com/rolfbjarne/iOSRefUpdater
Update
I've fixed the ATMHud bindings, now they should compile with newer versions of Xamarin.iOS installed as well.

Resources