export android project add facebook sdk get error convert to dalvik format failed with error 1 - facebook

i am doing a small project on android and it using facebook sdk 3.0. everything is ok until i export to upload android market, i got error "error convert to dalvik format failed with error 1" and i try export 2 sample projects in sdk, i got same error. i research on google ,the cause is the projects and facebook sdk have same name file R.java in com.facebook.android. But because it file R.java so i cannot rename it. i try other way, i turn off "build automatically" and delete R.java file in facebook sdk, it can export keystore and apk file but apk file don not work. So what can i do to fix it?
thanks

I was having this problem too with an app that used Facebook SDK. I was trying all sorts of stuff, so I'm not sure what exactly fixed but here's settings that worked for me:
FacebookSDK > Properties > Java Build Path > Order and Export
Android 2.2 - NOT CHECKED
Android Private Libraries - CHECKED
Android Dependencies - CHECKED
MyApp > Properties > Java Build Path > Order and Export
Android 4.2.2 - CHECKED
Android Private Libraries - CHECKED
Android Dependencies - CHECKED
In addition, I had done this before, not sure it mattered. Reverted to Facebook SDK version 3.5 from 3.5.2. Updated to latest ADT 22.2.1. Changed Facebook SDK to use Android 2.2 from 4.2.2.

Related

No valid Android SDK platforms

When I write flutter doctor command in cmd I get this error.
No valid Android SDK platforms found in G:\SdkManager\platforms. Candidates were:
- android-21
- android-27
- android-28
- android-8.0.0
flutter doctor
env
path
flutter sdk
platforms
plugins
It appears as though this message shows up when you don't have any build-tools packages installed. At the time of writing, to install the minimum required versions, you can fix this issue with:
sdkmanager "platform-tools" "platforms;android-30" "build-tools;30.0.3"
I've set up my Android SDK manually on Windows 10 with the command line and I was able to solve this kind of errors while I tried to set up my development environment, if you want to solve it as I did, just follow the next steps that I posted in a GitHub Comment in a related issue:
https://github.com/flutter/flutter/issues/19805#issuecomment-478306166
You should download and install Android build tools for the respective platform versions. This can be done via the Android SDK Manager.
In AndroidStudio go to menu Tool > Android > SDK Manager
On the tab "SDK Platforms" select one or more platforms and click the OK button.
Wait until the download completed and try again.
Try to download all sdk from file-> settings -> sdkmanager.
And do not download manually.
Find your sdk path and execute the code.
$ flutter config --android-sdk <path-to-your-android-sdk-path>
see here
I think your path is incorrect in environment variable.
You should change it to G:/Sdkmanager/platforms

Error android:layout_marginEnd with appcompat v7 library

I got this error:
removing attribute http://schemas.android.com/apk/res/android:layout_marginEnd from <ImageView>
from the abc_activity_chooser_view.xml XML file when compiling the appcompat v7 library in my Android project.
Things I have tried:
Uninstall Eclipse Luna and Android SDK completely.
Re-install Eclipse Luna and Android SDK.
Install the require Android components via Android SDK Manager.
In Eclipse, ask Android Lint to ignore the error in Preferences and Skip Library Project Dependencies.
Clean and build all projects.
Add -clean directive to eclipse.ini file.
But without any success.
Tools I used are:
OS: Window 7 64-bit
IDE: Eclipse Luna Service Release 2 (v4.4.2) Build 20150219-0600
64-bit
Android SDK: Android v5.1.1 (API Level 22)
ADT: v23.0.6.1720515
Android SDK Tools: v24.1.2
Android SDK Platform Tools: v22
Android SDK Build Tools: v22.0.1
Android Support Repository: v12
Android Support Library: v22
Does anyone have any suggestion on how to fix, or workaround this error till Google fix this error?
I can't deploy my Android package until this error is fixed.
Thanks for any help.
To fix the android:layout_marginEnd error, within Eclipse, open the project.properties file within the appcompat v7 library and add the following directives:
target=android-21
sdk.buildtools=21.1.2
Note: You may need to install the Android SDK Build Tools v21.1.2 [if you haven't already] via the Android SDK Manager.
For those wishing to support Android 5.1+ (API 22) in your Android apps, you can add the following directives to the project.properties file of each of your Android project:
target=android-22
sdk.buildtools=22.0.1
Note: You may need to install the Android SDK Build Tools v22.0.1 [if you haven't already] via the Android SDK Manager.
So, in essence, you're using one version of the Android SDK Build Tools to build your Android apps, and another to fix the android:layout_marginEnd error in the appcompat v7 library.
The documentation for the sdk.buildtools directive is here. The documentation also include info on how to setup the buildToolsVersion directive in the build.gradle file for those using Android Studio and Gradle.

cordova build error: SDK "iphoneos6.0" cannot be located

i developing a html5-App for Android and iOS. Building for Android and iOS-Simulator works like a charm. But if i want to build the app for iOS-Device the build process stops with following error:
update-ios:
cordova prepare ios
build-ios-xcodebuild:
xcodebuild: error: SDK "iphoneos6.0" cannot be located.
/Users/.../nbproject/build.xml:178: exec returned: 64
For development i using netbeansIDE, xcode 5.1.1 and cordova 3.5.
Also i downloaded the iOS 6.1 sdk and copied into sdk folder of xcode, but that don't work for me. May i have to set an environment variable?
Is there someone, who could give me a hint?
In advance

Android studio:import NDK project from eclipse

I exported project from Eclipse(windows) and imported it to android studio V 0.4.2(ubuntu).
The project include working NDK library.
I get this error when try to run my app:
Execution failed for task ':app:compileDebugNdk'.
NDK not configured
From others stackoverflow posts, I understand that it is an issue.
But get no workaround for this.
Should i proceed the development with eclipse for now, or is that the a lazy option ?
EDIT :
I run this command:
export NDK=~/Downloads/android-ndk-r9c
and then :
and then go to my app directory and run this:
ndk-build
And i get this:
yarinkos-u#yarinkosu-MSI-Notebook-EX600:~/AndroidStudioProjects/AndEngineEXperimental$ ndk-build
/home/yarinkos-u/Downloads/android-ndk-r9c/ndk-build: 1: /home/yarinkos-u/Downloads/android-ndk-r9c/ndk-build: dirname: not found
/home/yarinkos-u/Downloads/android-ndk-r9c/ndk-build: 132: /home/yarinkos-u/Downloads/android-ndk-r9c/ndk-build: uname: not found
ERROR: Unknown host operating system:
What i did wrong?
It seems that the script running,but i miss something there.
EDIT 2:
i mistakenly runing this also :
export PATH=~/Downloads/android-ndk-r9c
so i get the error above.
If i running onlt this :
export NDK=~/Downloads/android-ndk-r9c
I get ndk-build not found error.
NDK Support is introduced from Android Studio 0.4.1 only, so make sure you are running AS 0.4.1 or above.
Android gradle plugin must be 0.7.+ in build.gradle file and also new NDK integration requires NDK r9c .
Lines from Developer tools blog under Release 0.4.1
Supports importing NDK projects. If the imported project contains NDK
sources, these are imported into the jni/ source set of the project,
the module name is inferred from the Makefile and stored in the Gradle
file, and the ndk.dir property is defined in local.properties.
Check more about it here :
http://tools.android.com/recent
you need to download the NDK for your operatings system # https://developer.android.com/tools/sdk/ndk/index.html once it's downloaded, install it it'll extract the contents to the correct file system it needs to be in it'll take some time, also make sure you are running the latest android studio. it worked for me. good luck.

Upgrading cordova 1.9.0 (iOS) to cordova 2.1.0 and updating existing projects to use 2.1.0

I have uninstalled cordova 1.9.0 by doing:
To uninstall:
Remove the PHONEGAPLIB value in Xcode Preferences -> Source Trees
Delete the ~/Documents/PhoneGapLib folder
Delete the ~/Library/Application Support/Developer/Shared/Xcode/Project Templates/PhoneGap folder
Delete the "~/Library/Application Support/Developer/Shared/Xcode/Templates/Project Templates/Application/PhoneGap-based Application.xctemplate" or the "~/Library/Developer/Xcode/Templates/Project\ Templates/Application/PhoneGap-based\ Application.xctemplate" folder
Delete the /Users/Shared/PhoneGap/Frameworks/PhoneGap.framework folder
Delete the ~/Library/Frameworks/PhoneGap.framework symlink
I then followed the upgrade guides:
http://github.com/apache/incubator-cordova ios/blob/master/guides/Cordova%20Plugin%20Upgrade%20Guide.md
and http://docs.phonegap.com/en/2.1.0/guide_upgrading_ios_index.md.html
The project builds with no errors, but when I try to run:
On an iPhone with iOS 5.1.1 I get this error:
ERROR: Start Page at 'www/index.html' was not found.
and on an iPhone with iOS 6.0 I get this error:
Failed to load webpage with error: The requested URL was not found on this server.
Whether I remove the only external link or all javascript sources, whether I manually add the www folder, or anything at all that can be found on the internet, these errors are persistent.
Apparently this problem was first noticed in cordova 1.4 and I followed this solution http://www.tricedesigns.com/2012/02/16/linked-source-files-across-phonegap-projects-on-osx/
The problem was that Xcode could not see the www folder.