I've solved this problem, The root cause is although the G1:G2:19 can be detected by "android list target" command, gradle still can't find this target until I put source.properties into my own addon folder.
This's solved after I put source.properties into the folder. Thanks a lot for all your great help. 在 2014年3月6日星期四UTC+8下午2时20分54秒,Eason Lee写道: > > Below is the more detailed information: > > eason@eason-PC:~/xxxx/android-sdk_linux-x86/add-ons$ ll > total 32 > drwxrwxr-x 8 eason eason 4096 2014-03-06 14:15 ./ > drwxrwxr-x 11 eason eason 4096 2014-03-04 18:45 ../ > drwxrwxr-x 6 eason eason 4096 2014-02-11 15:02 > addon-google_apis-google-16/ > drwxrwxr-x 6 eason eason 4096 2013-10-29 12:00 > addon-google_apis-google-17/ > drwxrwxr-x 6 eason eason 4096 2013-10-29 12:02 > addon-google_apis-google-18/ > drwxrwxr-x 5 eason eason 4096 2014-03-04 19:45 > addon-google_apis-google-19-1/ > drwxrwxr-x 5 eason eason 4096 2014-02-11 15:08 addon_test1_release/ > drwxrwxr-x 5 eason eason 4096 2014-03-06 14:18 addon_test2_release/ > eason@eason-PC:~/xxxx/android-sdk_linux-x86/add-ons$ cat > addon_test2_release/manifest.ini > # SDK Add-on Manifest > # File encoding is UTF-8 > > name=G2 > vendor=G1 > description=Android + Google APIs > > # version of the Android platform on which this add-on is built. > api=19 > > # revision of the add-on > revision=1 > > > 在 2014年3月6日星期四UTC+8下午2时10分15秒,Eason Lee写道: >> >> hello, >> >> Yes, I can see my addon when ./android list target, and the sdk indeed >> contains the addon.... >> >> id: 8 or "G1:G2:19" >> Name: G2 >> Type: Add-On >> Vendor: G1 >> Revision: 1 >> Description: Android + Google APIs >> Based on Android 4.4.2 (API level 19) >> Libraries: >> >> >> I stiil don't know which part that I forget to set up.... >> >> Again, I'm very thankful for your help.... >> >> 在 2014年3月6日星期四UTC+8下午12时52分23秒,Xavier Ducrohet写道: >>> >>> "Caused by: java.lang.IllegalStateException: failed to find target >>> G1:G2:19" >>> >>> Are you sure you are pointing Gradle to the right SDK that contains this >>> add-on? >>> >>> In that sdk if you run "tools/android list target" do you see your >>> add-on? >>> >>> >>> On Wed, Mar 5, 2014 at 7:07 PM, Eason Lee <[email protected]> wrote: >>> >>>> Hello Xavier, >>>> >>>> Thanks a lot your help. >>>> >>>> In first, I would like to inform that I created "own" directory in >>>> addon folder, which the manifest.ini is listed as previous described. >>>> >>>> Here comes the error msg that with --stracetrace option >>>> >>>> eason@eason-PC:~/xxx/xxxMapView$ ../gradlew assembleRelease >>>> --stacktrace > res.txt >>>> >>>> >>>> FAILURE: Build failed with an exception. >>>> >>>> * What went wrong: >>>> >>>> Could not determine the dependencies of task >>>> ':xxxMapView:compileReleaseJava'. >>>> > failed to find target G1:G2:19 >>>> >>>> * Try: >>>> Run with --info or --debug option to get more log output. >>>> >>>> * Exception is: >>>> >>>> org.gradle.api.GradleException: Could not determine the dependencies of >>>> task ':xxxMapView:compileReleaseJava'. >>>> at >>>> org.gradle.api.internal.tasks.CachingTaskDependencyResolveContext.resolve(CachingTaskDependencyResolveContext.java:65) >>>> at >>>> org.gradle.api.internal.tasks.CachingTaskDependencyResolveContext.getDependencies(CachingTaskDependencyResolveContext.java:53) >>>> at >>>> org.gradle.execution.taskgraph.DefaultTaskExecutionPlan.addToTaskGraph(DefaultTaskExecutionPlan.java:99) >>>> at >>>> org.gradle.execution.taskgraph.DefaultTaskGraphExecuter.addTasks(DefaultTaskGraphExecuter.java:74) >>>> at >>>> org.gradle.execution.TaskNameResolvingBuildConfigurationAction.configure(TaskNameResolvingBuildConfigurationAction.java:51) >>>> at >>>> org.gradle.execution.DefaultBuildExecuter.configure(DefaultBuildExecuter.java:42) >>>> at >>>> org.gradle.execution.DefaultBuildExecuter.access$100(DefaultBuildExecuter.java:23) >>>> at >>>> org.gradle.execution.DefaultBuildExecuter$1.proceed(DefaultBuildExecuter.java:48) >>>> at >>>> org.gradle.execution.ExcludedTaskFilteringBuildConfigurationAction.configure(ExcludedTaskFilteringBuildConfigurationAction.java:46) >>>> at >>>> org.gradle.execution.DefaultBuildExecuter.configure(DefaultBuildExecuter.java:42) >>>> at >>>> org.gradle.execution.DefaultBuildExecuter.access$100(DefaultBuildExecuter.java:23) >>>> at >>>> org.gradle.execution.DefaultBuildExecuter$1.proceed(DefaultBuildExecuter.java:48) >>>> at >>>> org.gradle.execution.DefaultTasksBuildExecutionAction.configure(DefaultTasksBuildExecutionAction.java:38) >>>> at >>>> org.gradle.execution.DefaultBuildExecuter.configure(DefaultBuildExecuter.java:42) >>>> at >>>> org.gradle.execution.DefaultBuildExecuter.select(DefaultBuildExecuter.java:35) >>>> at >>>> org.gradle.initialization.DefaultGradleLauncher.doBuildStages(DefaultGradleLauncher.java:155) >>>> at >>>> org.gradle.initialization.DefaultGradleLauncher.doBuild(DefaultGradleLauncher.java:113) >>>> at >>>> org.gradle.initialization.DefaultGradleLauncher.run(DefaultGradleLauncher.java:81) >>>> at >>>> org.gradle.launcher.exec.InProcessBuildActionExecuter$DefaultBuildController.run(InProcessBuildActionExecuter.java:64) >>>> at >>>> org.gradle.launcher.cli.ExecuteBuildAction.run(ExecuteBuildAction.java:33) >>>> at >>>> org.gradle.launcher.cli.ExecuteBuildAction.run(ExecuteBuildAction.java:24) >>>> at >>>> org.gradle.launcher.exec.InProcessBuildActionExecuter.execute(InProcessBuildActionExecuter.java:35) >>>> at >>>> org.gradle.launcher.exec.InProcessBuildActionExecuter.execute(InProcessBuildActionExecuter.java:26) >>>> at >>>> org.gradle.launcher.cli.RunBuildAction.run(RunBuildAction.java:50) >>>> at >>>> org.gradle.api.internal.Actions$RunnableActionAdapter.execute(Actions.java:171) >>>> at >>>> org.gradle.launcher.cli.CommandLineActionFactory$ParseAndBuildAction.execute(CommandLineActionFactory.java:201) >>>> at >>>> org.gradle.launcher.cli.CommandLineActionFactory$ParseAndBuildAction.execute(CommandLineActionFactory.java:174) >>>> at >>>> org.gradle.launcher.cli.CommandLineActionFactory$WithLogging.execute(CommandLineActionFactory.java:170) >>>> at >>>> org.gradle.launcher.cli.CommandLineActionFactory$WithLogging.execute(CommandLineActionFactory.java:139) >>>> at >>>> org.gradle.launcher.cli.ExceptionReportingAction.execute(ExceptionReportingAction.java:33) >>>> at >>>> org.gradle.launcher.cli.ExceptionReportingAction.execute(ExceptionReportingAction.java:22) >>>> at org.gradle.launcher.Main.doAction(Main.java:46) >>>> at org.gradle.launcher.bootstrap.EntryPoint.run(EntryPoint.java:45) >>>> at org.gradle.launcher.Main.main(Main.java:37) >>>> at >>>> org.gradle.launcher.bootstrap.ProcessBootstrap.runNoExit(ProcessBootstrap.java:50) >>>> at >>>> org.gradle.launcher.bootstrap.ProcessBootstrap.run(ProcessBootstrap.java:32) >>>> at org.gradle.launcher.GradleMain.main(GradleMain.java:23) >>>> at >>>> org.gradle.wrapper.BootstrapMainStarter.start(BootstrapMainStarter.java:33) >>>> at >>>> org.gradle.wrapper.WrapperExecutor.execute(WrapperExecutor.java:130) >>>> at >>>> org.gradle.wrapper.GradleWrapperMain.main(GradleWrapperMain.java:61) >>>> Caused by: java.lang.IllegalStateException: failed to find target >>>> G1:G2:19 >>>> at >>>> com.android.builder.DefaultSdkParser.initParser(DefaultSdkParser.java:85) >>>> at com.android.builder.SdkParser$initParser.call(Unknown Source) >>>> at com.android.build.gradle.internal.Sdk.loadParser(Sdk.groovy:126) >>>> at com.android.build.gradle.internal.Sdk$loadParser.call(Unknown >>>> Source) >>>> at >>>> com.android.build.gradle.BasePlugin.getLoadedSdkParser(BasePlugin.groovy:309) >>>> at >>>> com.android.build.gradle.BasePlugin.getAndroidBuilder(BasePlugin.groovy:336) >>>> at >>>> com.android.build.gradle.BasePlugin$_createCompileTask_closure63.doCall(BasePlugin.groovy:760) >>>> at >>>> org.gradle.api.internal.ConventionAwareHelper$1.getValue(ConventionAwareHelper.java:72) >>>> at >>>> org.gradle.api.internal.ConventionAwareHelper$MappedPropertyImpl.getValue(ConventionAwareHelper.java:136) >>>> at >>>> org.gradle.api.internal.ConventionAwareHelper.getConventionValue(ConventionAwareHelper.java:114) >>>> at >>>> org.gradle.api.tasks.compile.JavaCompile_Decorated.getClasspath(Unknown >>>> Source) >>>> at org.gradle.internal.reflect.JavaMethod.invoke(JavaMethod.java:63) >>>> at >>>> org.gradle.api.internal.project.taskfactory.AnnotationProcessingTaskFactory$PropertyInfo$4.create(AnnotationProcessingTaskFactory.java:453) >>>> at >>>> org.gradle.util.SingleMessageLogger.whileDisabled(SingleMessageLogger.java:168) >>>> at >>>> org.gradle.api.internal.project.taskfactory.AnnotationProcessingTaskFactory$PropertyInfo.getValue(AnnotationProcessingTaskFactory.java:451) >>>> at >>>> org.gradle.api.internal.project.taskfactory.AnnotationProcessingTaskFactory$Validator$1.call(AnnotationProcessingTaskFactory.java:255) >>>> at >>>> org.gradle.api.internal.file.collections.DefaultFileCollectionResolveContext.doResolve(DefaultFileCollectionResolveContext.java:120) >>>> at >>>> org.gradle.api.internal.file.collections.DefaultFileCollectionResolveContext.resolveAsFileTrees(DefaultFileCollectionResolveContext.java:75) >>>> at >>>> org.gradle.api.internal.file.collections.BuildDependenciesOnlyFileCollectionResolveContext$BuildableFileTreeInternalConverter.convertInto(BuildDependenciesOnlyFileCollectionResolveContext.java:50) >>>> at >>>> org.gradle.api.internal.file.collections.DefaultFileCollectionResolveContext.doResolve(DefaultFileCollectionResolveContext.java:98) >>>> at >>>> org.gradle.api.internal.file.collections.DefaultFileCollectionResolveContext.resolveAsFileCollections(DefaultFileCollectionResolveContext.java:82) >>>> at >>>> org.gradle.api.internal.file.collections.BuildDependenciesOnlyFileCollectionResolveContext.resolveAsBuildables(BuildDependenciesOnlyFileCollectionResolveContext.java:43) >>>> at >>>> org.gradle.api.internal.file.CompositeFileCollection.addDependencies(CompositeFileCollection.java:136) >>>> at >>>> org.gradle.api.internal.file.CompositeFileCollection$3.resolve(CompositeFileCollection.java:124) >>>> at >>>> org.gradle.api.internal.tasks.CachingTaskDependencyResolveContext$TaskGraphImpl.getNodeValues(CachingTaskDependencyResolveContext.java:86) >>>> at >>>> org.gradle.internal.graph.CachingDirectedGraphWalker$GraphWithEmpyEdges.getNodeValues(CachingDirectedGraphWalker.java:200) >>>> at >>>> org.gradle.internal.graph.CachingDirectedGraphWalker.doSearch(CachingDirectedGraphWalker.java:112) >>>> at >>>> org.gradle.internal.graph.CachingDirectedGraphWalker.findValues(CachingDirectedGraphWalker.java:64) >>>> at >>>> org.gradle.api.internal.tasks.CachingTaskDependencyResolveContext.doResolve(CachingTaskDependencyResolveContext.java:74) >>>> at >>>> org.gradle.api.internal.tasks.CachingTaskDependencyResolveContext.resolve(CachingTaskDependencyResolveContext.java:63) >>>> ... 39 more >>>> >>>> >>>> >>>> 在 2014年3月6日星期四UTC+8上午10时49分38秒,Xavier Ducrohet写道: >>>>> >>>>> can you launch it with --stacktrace and post the whole trace? >>>>> >>>>> >>>>> On Wed, Mar 5, 2014 at 6:43 PM, Eason Lee <[email protected]> wrote: >>>>> >>>>>> Hi all gradle experts. >>>>>> >>>>>> I've set the manifest.ini and build.gradle as below: >>>>>> >>>>>> <mainfest.ini> >>>>>> name=G2 >>>>>> vendor=G1 >>>>>> description=Android + Google APIs >>>>>> # version of the Android platform on which this add-on is built. >>>>>> api=19 >>>>>> # revision of the add-on >>>>>> revision=1 >>>>>> >>>>>> <build.gradle> >>>>>> android { >>>>>> compileSdkVersion "G1:G2:19" >>>>>> buildToolsVersion "19.0.1" >>>>>> etc. >>>>>> } >>>>>> >>>>>> and try to build, but got the same exception, could someone help me? >>>>>> Thanks a lot. >>>>>> >>>>>> eason@eason-PC:~/xxx/xxxMapView$ ../gradlew assembleRelease --debug >>>>>> 11:43:06.928 [ERROR] [org.gradle.BuildExceptionReporter] >>>>>> 11:43:06.930 [ERROR] [org.gradle.BuildExceptionReporter] FAILURE: >>>>>> Build failed with an exception. >>>>>> 11:43:06.931 [ERROR] [org.gradle.BuildExceptionReporter] >>>>>> 11:43:06.931 [ERROR] [org.gradle.BuildExceptionReporter] * What went >>>>>> wrong: >>>>>> 11:43:06.932 [ERROR] [org.gradle.BuildExceptionReporter] Could not >>>>>> determine the dependencies of task ':xxxMapView:compileReleaseJava'. >>>>>> 11:43:06.932 [ERROR] [org.gradle.BuildExceptionReporter] > failed to >>>>>> find target G1:G2:19 >>>>>> 11:43:06.973 [ERROR] [org.gradle.BuildExceptionReporter] >>>>>> 11:43:06.973 [ERROR] [org.gradle.BuildExceptionReporter] * Exception >>>>>> is: >>>>>> 11:43:06.973 [ERROR] [org.gradle.BuildExceptionReporter] >>>>>> org.gradle.api.GradleException: Could not determine the dependencies >>>>>> of task ':xxxMapView:compileReleaseJava'. >>>>>> >>>>>> >>>>>> 在 2013年12月11日星期三UTC+8上午9时42分55秒,Xavier Ducrohet写道: >>>>>>> >>>>>>> If your addon's manifest.ini file declares the library then this >>>>>>> should be done automatically when you set compileSdkVersion to be a >>>>>>> string >>>>>>> made up of your addon's properties. The format is "<vendor >>>>>>> name>:<name>:<api level>" >>>>>>> >>>>>>> >>>>>>> On Tue, Dec 10, 2013 at 4:27 PM, RB <[email protected]> wrote: >>>>>>> >>>>>>>> I have created an Android add-on that I am able to download from >>>>>>>> the SDK Manager and it appears in my sdk/add-ons folder. >>>>>>>> >>>>>>>> How do I add a dependency to this add-on in the build.gradle file >>>>>>>> without moving the .jar to a libs folder in my project? Basically, I >>>>>>>> would >>>>>>>> like to be able to reference apis in this .jar file which is located >>>>>>>> in the >>>>>>>> sdk/add-ons folder. I don't want to move the .jar file to a libs >>>>>>>> folder as >>>>>>>> that defeats the purpose of making this .jar file available through >>>>>>>> the SDK >>>>>>>> Manager. Another reason we want this distributed through the SDK >>>>>>>> Manager is >>>>>>>> the add-on will make new AVDs available for developers (we are >>>>>>>> manufacturing a new device). >>>>>>>> >>>>>>>> I appreciate any information on this topic! Thanks. >>>>>>>> >>>>>>>> -- >>>>>>>> You received this message because you are subscribed to the Google >>>>>>>> Groups "adt-dev" group. >>>>>>>> To unsubscribe from this group and stop receiving emails from it, >>>>>>>> send an email to [email protected]. >>>>>>>> >>>>>>>> For more options, visit https://groups.google.com/groups/opt_out. >>>>>>>> >>>>>>> >>>>>>> >>>>>>> >>>>>>> -- >>>>>>> Xavier Ducrohet >>>>>>> Android SDK Tech Lead >>>>>>> Google Inc. >>>>>>> http://developer.android.com | http://tools.android.com >>>>>>> >>>>>>> Please do not send me questions directly. Thanks! >>>>>>> >>>>>> -- >>>>>> You received this message because you are subscribed to the Google >>>>>> Groups "adt-dev" group. >>>>>> To unsubscribe from this group and stop receiving emails from it, >>>>>> send an email to [email protected]. >>>>>> For more options, visit https://groups.google.com/groups/opt_out. >>>>>> >>>>> >>>>> >>>>> >>>>> -- >>>>> Xavier Ducrohet >>>>> Android SDK Tech Lead >>>>> Google Inc. >>>>> http://developer.android.com | http://tools.android.com >>>>> >>>>> Please do not send me questions directly. Thanks! >>>>> >>>> -- >>>> You received this message because you are subscribed to the Google >>>> Groups "adt-dev" group. >>>> To unsubscribe from this group and stop receiving emails from it, send >>>> an email to [email protected]. >>>> For more options, visit https://groups.google.com/groups/opt_out. >>>> >>> >>> >>> >>> -- >>> Xavier Ducrohet >>> Android SDK Tech Lead >>> Google Inc. >>> http://developer.android.com | http://tools.android.com >>> >>> Please do not send me questions directly. Thanks! >>> >> -- You received this message because you are subscribed to the Google Groups "adt-dev" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. For more options, visit https://groups.google.com/d/optout.
