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.
Related
I want to build my xamarin android application with android 12 target framework on release mode. The build fails with the following
"Xamarin.Android.D8.targets(51,5): error MSB6006:"java.exe" exited
with code 1."
error.
Solutions I've tried so far are :
1 - Download the latest proguard version and replace the files inside /android-sdk/tools/proguard and create a proguard config file under android project making sure the file is saved with UTF-8.
2 - Make sure all the nuget packages are compatible by creating a blank sample project and adding each nuget from my original project and make sure it builds.
3 - Delete bin and object files and rebuild the project.
Doing some online research that I've found out that this particular version (Xamarin.Android.D8.targets(51,5)) of the 'java.exe exited with code 1' error type is mostly associated with either proguard or incompability however I am unable to locate the source of the problem, any kind of help is appreciated.
Here are some relevant information:
I do have the msbuild output level set to diagnostics but i don't think i can share the whole 260k line output file. Linking is set to "Sdk assemblies only".
SDK
JDK
Android Options
6 > Done executing task "WriteLinesToFile".
6 > Done building target"_CleanRecordFileWrites" in project "TestApp1.Android.csproj".
6 > Build FAILED.
6 >
"C:\Users\TestUser\source\Workspaces\TestApp1\TestApp1.Android\TestApp1.Android.csproj"
(Rebuild;BuiltProjectOutputGroup;BuiltProjectOutputGroupDependencies;DebugSymbolsProjectOutputGroup;DebugSymbolsProjectOutputGroupDependencies;DocumentationProjectOutputGroup;DocumentationProjectOutputGroupDependencies;SatelliteDllsProjectOutputGroup;SatelliteDllsProjectOutputGroupDependencies;SGenFilesOutputGroup;SGenFilesOutputGroupDependencies
target) (1) ->
6 > (_CompileToDalvik target) ->
6 > C:\Program Files (x86)\Microsoft Visual
Studio\2019\Community\MSBuild\Xamarin\Android\Xamarin.Android.D8.targets(51,5):
error MSB6006: "java.exe" exited with code 1.
11 Warning(s)
1 Error(s)
6>Time Elapsed 00:00:58.23
========== Rebuild All: 5 succeeded, 1 failed, 0 skipped ==========
There is no output from proguard inside the build output.
I've found the problem. The project was developed on android 11 and could build without a problem, the problem began when the target framework version was changed android 12, first the build error was:
'Xamarin.Android.Support.v4' is using '[assembly:
Java.Interop.JavaLibraryReferenceAttribute]' , which is no longer
supported. Use a newer version of this NuGet package or notify the
library author.
So we made sure that all nuget packages could run on android 12 than the build error changed to:
is also present at androidmanifest.xml:22:18-91 value (android.support.v4.app.corecomponentfactory)
this is was just one of the several java errors and all the errors were related to android.support.v4.app library. So during my first research I've found from the in xamarin community that some were able to solve their problem by adding the code :
tools:node="replace"
to their AndroidManifest.xml file under the <application> tag. So I did just that to see the results and the error than changed to:
"java.exe" exited with code 1
after going back to the first "android.support.v4.app" error and doing some more research about it online I've found that android studio users could solve these type of errors by setting the "useAndroidX = true" in their build.gradle file. Not having a build.gradle file in my project I've just decided delete the code I previously added to my AndroidManifest.xml and to add the "Xamarin.AndroidX.Core" Nuget package to my android project, after doing so the error changed to:
Could not find Jetbrains.Annotations
So after also adding the "Xamarin.Jetbrains.Annotations" nuget package to my project ,it now builds without an error.
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.
I was developing an android app (using Eclipse, not Studio) following some example, which makes use of Github/CircleImageView. Hence, I wanted to compile that first into a jar library.
So on my Linux machine I installed gradle and since its my first time with gradle, I followed the tutorial on gradle. So, in the root directory of the project ~/Downloads/CircleImageView-master/, I :
Run gradle wrapper. Got Build Success
Run ./gradlew build, gives the following error
CircleImageView.java:21: error: package com.nineoldandroids.animation does not exist
import com.nineoldandroids.animation.ObjectAnimator;
Though, I can see that there is one jar file in the project ~/Downloads/CircleImageView-master/circleimageview/libs/nineoldandroid-library-2.4.0.jar. Can anyone please help in resolving the issue. I am trying since past 10 hours and reached so far here after resolving all the issues, and stuck just at the last point.
I opened the jar in a package manager and the required classes are there, including ObjectAnimator.
In my app, I have to have two version: Full and Lite.
I am following these tutorials:
http://bitowl.wordpress.com/2011/07/06/tutorial-how-to-make-full-and-lite-versions/
http://blog.donnfelker.com/2010/08/05/howto-android-full-and-lite-versions/
So, I build my full version, and make it a library. This full version uses some other libs, needed to some components.
Then, I create a new project and added the lib created. The problem is when I try to run my lite version, eclipse gives this error:
[2012-12-13 13:58:13 - <app> Lite] Dx
UNEXPECTED TOP-LEVEL EXCEPTION:
java.lang.IllegalArgumentException: already added: Lnet/simonvt/timepicker/R$attr;
Conversion to Dalvik format failed with error 1
The simonvt/timepicker is one of the libs that I use in my full version.
How can I fix this?
Thank you!
Do the following:
Right-click on your project and choose Build Path -> Configure Build Path,
then go to order and export section
If simonvt/timepicker has a checkmark against it, then deselect it.
I believe that the problem is that the library project is already added and you might be trying to add it again.
I've been trying to install the C2dm module for titanium studio found here: https://github.com/Kuraturpa/titanium-c2dm
I keep having issues. When I set it up as outlined here: http://developer.appcelerator.com/question/38451/c2dm-in-titanium
I keep getting an error that it can't find the module (at runtime). The error reads:
Location: [357, 0] /tmp/module.js Message: Error: Requested module not
found: com.findlaw.titanium.cd2m (/tmp/module.js#357)
I indeed can't find this file anywhere in my stuff, because I don't have a tmp folder in my project. I originally put the xml code from that above forum post in the timodule.xml file and it got me to this runtime error. When I switch it to the tiapp.xml file I get this error:
[ERROR] The 'apiversion' for 'com.findlaw.titanium.c2dm' in the module
manifest is not a valid value. Please use a version of the module that
has an 'apiversion' value of 2 or greater set in it's manifest file
When I try to manually build the module myself using ant, I get:
BUILD FAILED /Users/sammy/Downloads/IGx89-titanium-c2dm-3b05b8a
2/build.xml:9: Cannot find /Library/Application
Support/Titanium/mobilesdk/osx/1.8.0.1/module/android/build.xml
imported from /Users/sammy/Downloads/IGx89-titanium-c2dm-3b05b8a
2/build.xml
I checked, and the build.xml file is in the folder shown in the error. I'm kind of at a loss as to what to do here...
That module does not support the version of Titanium Mobile you are using (1.8.0.1 or higher). You must either update it yourself, or find another C2DM module.
The guide for porting to 1.8.0.1 is available here:
http://docs.appcelerator.com/titanium/2.0/index.html#!/guide/Android_Module_Porting_Guide_for_1.8.0.1