Click here to Skip to main content
15,881,898 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
After i fixed problems gradle,and gradle synced correctly.now i want to to build apk for telegram,it returns:
Error:(372, 34) error: cannot find symbol method sqrt(float)
Error:(389, 35) error: cannot find symbol method sqrt(int)

i want to build for API 23.i used android studi1.5.1 too.my friend please help me to solve building apk for telegram4android.

Information:Gradle tasks [:TMessagesProj:assembleDebug]
:TMessagesProj:preBuild UP-TO-DATE
:TMessagesProj:preDebugBuild UP-TO-DATE
:TMessagesProj:checkDebugManifest
:TMessagesProj:preFossBuild UP-TO-DATE
:TMessagesProj:preReleaseBuild UP-TO-DATE
:TMessagesProj:prepareComAndroidSupportSupportV42210Library UP-TO-DATE
:TMessagesProj:prepareComGoogleAndroidGmsPlayServices3265Library UP-TO-DATE
:TMessagesProj:prepareDebugDependencies
:TMessagesProj:compileDebugAidl UP-TO-DATE
:TMessagesProj:compileDebugRenderscript UP-TO-DATE
:TMessagesProj:generateDebugBuildConfig UP-TO-DATE
:TMessagesProj:generateDebugAssets UP-TO-DATE
:TMessagesProj:mergeDebugAssets UP-TO-DATE
:TMessagesProj:generateDebugResValues UP-TO-DATE
:TMessagesProj:generateDebugResources UP-TO-DATE
:TMessagesProj:mergeDebugResources UP-TO-DATE
:TMessagesProj:processDebugManifest UP-TO-DATE
:TMessagesProj:processDebugResources UP-TO-DATE
:TMessagesProj:generateDebugSources UP-TO-DATE
:TMessagesProj:processDebugJavaRes UP-TO-DATE
:TMessagesProj:compileDebugJavaWithJavac
C:\Users\root\Documents\Android\Telegram-dev\TMessagesProj\src\main\java\org\telegram\ui\Components\Scroller.java
Error:(372, 34) error: cannot find symbol method sqrt(float)
Error:(389, 35) error: cannot find symbol method sqrt(int)
Note: Some input files use or override a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
Note: Some input files use unchecked or unsafe operations.
Note: Recompile with -Xlint:unchecked for details.
Error:Execution failed for task ':TMessagesProj:compileDebugJavaWithJavac'.
> Compilation failed; see the compiler error output for details.
Information:BUILD FAILED
Information:Total time: 25 mins 36.812 secs
Information:3 errors
Information:0 warnings
Information:See complete output in console

thanks for attention

What I have tried:

i searched but it is not solved for me.
Posted
Updated 14-Oct-18 23:04pm
v2

1 solution

You need to import the Math library Math (Java Platform SE 7 )[^].
 
Share this answer
 
Comments
stackprogramer 3-Apr-16 12:11pm    
thanks for reply but this source is on github .
i think telegram should not have these Goofs!
telegram talked it is compiled successfully in android studio without change!
Richard MacCutchan 3-Apr-16 13:36pm    
Fine, but that is not an issue for CodeProject.
stackprogramer 3-Apr-16 14:10pm    
thanks for reply Richard MacCutchan,
i did know where for asking.where is best place for this question?
in github wiki and issue is closed for telegram.programmer of it has not any email.
we have not any guide for it.
stackprogramer 5-Apr-16 0:51am    
Yes , i think sqrt(float) function is depreciated. replace it with sqrt(int) may it works .so for solve i change api 23 to api 19 thanks Richard MacCutchan

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900