I have the same issue as is described in this post: AndroidStudio Failed to Sync Gradle project, Failed to find target Google Inc
My exact error in Gradle Sync is "Failed to find target Google Inc.: Google APIs:19 : C:\Users\Steve_Android\AppData\Local\Android\Sdk"
The code is here:FtcRobotControllerActivity. I did not write this code myself, I am trying to use it with a robotics application.
I cannot comment yet so I need to ask another question here. Is that answer sufficient and, if so, where does that script go? I do not have that anywhere in the app code that I am working with.
Related
I have downloaded the Osmdroid project from Github, from here https://github.com/osmdroid/osmdroid
When I open the osmdroid-master directory in Android Studio it attempts to sync but fails with the following error: Gradle Project sync failed.
Cause: startup failed:
script 'https://raw.githubusercontent.com/gradle-fury/gradle-fury/v1.1.4/gradle/maven-support.gradle': 1453: unable to resolve class org.gradle.api.internal.ClosureBackedAction
# line 1453, column 13.
new org.gradle.api.internal.ClosureBackedAction({
^
1 error
In idea.log there is:
2020-01-31 14:10:04,272 [entQueue-0] WARN - un.AndroidRunConfigurationBase - Can't get application ID: Android module missing
2020-01-31 14:10:04,402 [Alarm Pool] INFO - mponents.impl.stores.StoreUtil - saveProjectsAndApp took 34 ms
I am on Ubuntu 19.04.
How can I see which Android module it's referring to as missing?
The original question was based on a misunderstand on my behalf. The Osmdroid from Github cannot be compiled into an APK.
The correct approach is to create a new empty project in Android Studio, add org.osmdroid:osmdroid-android:6.1.5 to the dependencies in build.grade, then following the examples given here: https://github.com/osmdroid/osmdroid/wiki/How-to-use-the-osmdroid-library add uses-permission, layout and then the actual code to the Main Activity. I now have a working mapping app which downloads tiles as it needs them. If I have further questions I will post separately.
Thanks to everybody who contributed.
I have imported an Google Speech API example from Google.
https://github.com/GoogleCloudPlatform/android-docs-samples/tree/master/speech/Speech
It is unable to resolve R.layout
I have cleaned & rebuilt the project
Attempted to change the gradle 4.1 to gradle 2.9. Which it did not
allow me because the minimum gradle required is gradle 4.1
The xml files are from Google, so I assumed they were okay. Still checked them anyway
I also inserted the credential.json inside the project. This is taken from the Google Cloud Platform, if anyone is thinking of using this example. This is very important
The catlog is also giving me this error :
Error:Could not determine the dependencies of task ':app:extractIncludeDebugProto'.
> Resolving configuration 'debugCompile' directly is not allowed
Did anyone have this issue when the trying out this sample code?
Any input is greatly appreciated thanks :)
Problem solved, really stupid really.
Just redownloaded the sample , imported it into Android studio.
changed the gradle 3.0 from the initial stage instead of after
hope this helps :)
I'm trying to convert an existing app into an instant app and have been following the tutorials at: Google codelabs
and
Building Android Instant App Tutorial - 1
I am getting stuck at step 5 of the codelabs tutorial/ 10 minute mark in the youtube video where you have to put your base feature as a dependency of a new feature/apk module:
When I put "implementation project(':blah-blah')" I get the error: Failed to resolve: Could not resolve project :blah-blah.
I believe this is because :blah-blah is my root module so I think the child module might be having trouble accepting it as a dependency. I think this might be the problem because I also cannot rename :blah-blah for that reason as is recommended in both tutorials. I have also tried to explicitly declare :blah-blah in the settings.gradle file as was recommended online but to no luck. Any help would be greatly appreciated!
I'm trying to use Firebase for my project but when i included the gradle files and sync them,i get this error
Error:Execution failed for task ':app:prepareComGoogleFirebaseFirebaseAnalyticsImpl1021Library'.
Unable to unzip 'E:\android-sdk-windows\extras\google\m2repository\com\google\firebase\firebase-analytics-impl\10.2.1\firebase-analytics-impl-10.2.1.aar' to 'C:\Users\lkhawlhing.android\build-cache\1d784cfc1bd0c2cb2e5ff993c4056bba42a118c8\output'
I Googled for a solution but the didn't find anything related to the error, can anyone help me with this problem.
Here's a Screenshot of the Log
log
Note : Everything was working fine until i made a new user and once i log into the new user and install the android studio.I got the sdk files from a friend who is still currently using those without any problems.
I am using facebook-unity-sdk-7.3.0 and GooglePlayGamesPlugin-0.9.32 in my project. it does not let me build for android and fails with error 'Unable to convert classes into dex format. See the Console for details.'. It starts working again when I delete any of the sdk fb or googleplay from my project.
Console error
CommandInvokationFailure: Unable to convert classes into dex format.
See the Console for details.
/Library/Java/JavaVirtualMachines/jdk1.7.0_79.jdk/Contents/Home/bin/java
-Xmx2048M -Dcom.android.sdkmanager.toolsdir="/Users/shoaib/Library/Android/sdk/tools"
-Dfile.encoding=UTF8 -jar "/Applications/Unity/PlaybackEngines/AndroidPlayer/Tools/sdktools.jar"
and
Error building Player: CommandInvokationFailure: Unable to convert
classes into dex format. See the Console for details.
/Library/Java/JavaVirtualMachines/jdk1.7.0_79.jdk/Contents/Home/bin/java
-Xmx2048M -Dcom.android.sdkmanager.toolsdir="/Users/shoaib/Library/Android/sdk/tools"
-Dfile.encoding=UTF8 -jar "/Applications/Unity/PlaybackEngines/AndroidPlayer/Tools/sdktools.jar"
I did some research on it and found that this issue is related to two same jar files in the project but in my project, I unable find any duplicate jar file.
Edited
for reproducing the issue, I have made a sample project which can be downloaded from here http://wikisend.com/download/966354/LeaderboardTest.zip
Go to Assets->FacebookSDK->Plugins->Android->libs then delete android-support-v4.jar. There is a conflict there because it contains a class from another jar or aar file.
'Unable to convert classes into dex format. See the Console for details.'.
this one shows up when a class/dll exists twice in the project.
Often it happens when updating framework, if you do not remove the old version properly, then some classes may appear twice.
Since they are stored in plugins folder, Unity does not check them and they only show up in build process.
Best could be to remove everything related to both plugins and reimport them. That solved it for me when using UniWebView and Vuforia in same app. One of those was not properly updated.
In my case I could solve this problem by removing Android SDK Build-Tools version 24 and replacing it with version 23.
Maybe it's too late to answer, I was facing the same issue, I created a plugin this plugin contains Facebook SDK+Admob+unityads +unity IAP, all of them work together, I've created this plugin in unity 5.6.0, but I've checked it, it is working fine in unity 2017 as well, there is a scene "DemoScene", just open it everything is implemented, unity ads, admob, facebook share with callback, unityIAP.
Note: before importing the plugin kindly delete all the old plugins, also go to services and turn on unity ads.
http://www.mediafire.com/file/ccvj7ixir8ive25/FB_ADMOB_UnityIAP_UnityAds_Plugin_Hameed_Ullah_jan.unitypackage